diff --git a/.gitignore b/.gitignore index ec6d08138..35bb4b836 100644 --- a/.gitignore +++ b/.gitignore @@ -77,10 +77,12 @@ releases/* keys/* .hemtt/local .hemttout +.hemttprivatekey #### hemtt.exe ArmaScriptCompiler.exe #SQF-VM Server .vscode\sqfvm-lsp -.vscode \ No newline at end of file +.vscode + diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml index d50424f4c..c9f15ef30 100644 --- a/.hemtt/launch.toml +++ b/.hemtt/launch.toml @@ -2,7 +2,8 @@ workshop = [ "450814997", # CBA_A3's Workshop ID "463939057", # ACE3's Workshop ID - "3499977893" # Advanced Developer Tools's Workshop ID + "3499977893", # Advanced Developer Tools's Workshop ID + "1779063631", # ZEN ] [rhs] diff --git a/KAMLogoHighRes.paa b/KAMLogoHighRes.paa index 817e1d53b..e756f9ad8 100644 Binary files a/KAMLogoHighRes.paa and b/KAMLogoHighRes.paa differ diff --git a/KAMLogoLowRes.paa b/KAMLogoLowRes.paa index c23510ed2..1a72be552 100644 Binary files a/KAMLogoLowRes.paa and b/KAMLogoLowRes.paa differ diff --git a/README.md b/README.md index 978ec32de..34f389da2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# KAT Medical +# KAM - REDUX

diff --git a/addons/airway/ACE_Medical_Treatment_Actions.hpp b/addons/airway/ACE_Medical_Treatment_Actions.hpp index 922185fa2..ed74109ef 100644 --- a/addons/airway/ACE_Medical_Treatment_Actions.hpp +++ b/addons/airway/ACE_Medical_Treatment_Actions.hpp @@ -1,4 +1,5 @@ class ACE_Medical_Treatment_Actions { + class BasicBandage; class Larynxtubus { displayName = CSTRING(Larynxtubus_Display); displayNameProgress = CSTRING(action_placing); @@ -9,8 +10,8 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_Larynxtubus); treatmentTime = QGVAR(Larynxtubus_time); items[] = {"kat_larynx"}; - condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !([_patient] call FUNC(checkMask))); - callbackSuccess = QUOTE([ARR_3(_medic,_patient,(_patient getVariable [ARR_2(QQGVAR(occluded),false)]))] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == '') && !([_patient] call FUNC(checkMask)) && [ARR_4(_medic,_patient,_bodyPart,_className)] call FUNC(airwayPlacementCheck);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); callbackFailure = ""; callbackProgress = ""; callbackCondition = "useCondition"; @@ -41,7 +42,42 @@ class ACE_Medical_Treatment_Actions { treatmentTime = QGVAR(Guedeltubus_time); items[] = {"kat_guedel"}; icon = QPATHTOF(ui\guedel.paa); - callbackSuccess = QUOTE([ARR_3(_medic,_patient,(_patient getVariable [ARR_2(QQGVAR(occluded),false)]))] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); + }; + class NPA: Larynxtubus { + displayName = CSTRING(NPA_Display); + medicRequired = QGVAR(medLvl_NPA); + treatmentTime = QGVAR(NPA_time); + items[] = {"kat_NPA"}; + icon = QPATHTOF(ui\npa.paa); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); + }; + class IGEL: Larynxtubus { + displayName = CSTRING(IGEL_Display); + medicRequired = QGVAR(medLvl_IGEL); + treatmentTime = QGVAR(IGEL_time); + items[] = {"kat_IGEL"}; + icon = QPATHTOF(ui\igel.paa); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); + }; + class ETT: Larynxtubus { + displayName = CSTRING(ETT_Display); + medicRequired = QGVAR(medLvl_ETT); + treatmentTime = QGVAR(ETT_time); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(isVisualized),false)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == '') && !([_patient] call FUNC(checkMask))); + items[] = {"kat_ETT"}; + icon = QPATHTOF(ui\ETT.paa); + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); + }; + class Visualization: Larynxtubus { + displayName = CSTRING(Visualization_Display); + medicRequired = QGVAR(medLvl_ETT); + treatmentTime = QGVAR(Visualization_time); + consumeItem = 0; + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == '') && !([_patient] call FUNC(checkMask)) && [ARR_4(_medic,_patient,_bodyPart,_className)] call FUNC(airwayPlacementCheck);); + items[] = {"kat_laryngoscope"}; + icon = QPATHTOF(ui\Laryngoscope.paa); + callbackSuccess = QFUNC(treatmentAdvanced_Visualization); }; class RemoveGuedeltubus: RemoveLarynxtubus { displayName = CSTRING(Cancel_Guedeltubus); @@ -53,16 +89,45 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus')); callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem); }; + class RemoveETT: RemoveLarynxtubus { + displayName = CSTRING(Cancel_ETT); + displayNameProgress = CSTRING(action_removing); + medicRequired = QGVAR(medLvl_ETT); + treatmentTime = QGVAR(ETT_time); + items[] = {}; + icon = QPATHTOF(ui\ETT.paa); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'ETT')); + callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem); + }; + class RemoveNPA: RemoveLarynxtubus { + displayName = CSTRING(Cancel_NPA); + displayNameProgress = CSTRING(action_removing); + medicRequired = QGVAR(medLvl_NPA); + treatmentTime = QGVAR(NPA_time); + items[] = {}; + icon = QPATHTOF(ui\npa.paa); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'NPA')); + callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem); + }; + class RemoveIGEL: RemoveLarynxtubus { + displayName = CSTRING(Cancel_IGEL); + displayNameProgress = CSTRING(action_removing); + medicRequired = QGVAR(medLvl_IGEL); + treatmentTime = QGVAR(IGEL_time); + items[] = {}; + icon = QPATHTOF(ui\igel.paa); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'IGEL')); + callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem); + }; class Accuvac: Larynxtubus { displayName = CSTRING(AccuvacTreatment_displayName); treatmentTime = QGVAR(Accuvac_time); items[] = {"kat_accuvac"}; - condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !([_patient] call FUNC(checkMask))); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !([_patient] call FUNC(checkMask))); icon = QPATHTOF(ui\accuvac.paa); consumeItem = 0; medicRequired = QGVAR(medLvl_Accuvac); - callbackStart = QFUNC(treatmentAdvanced_AccuvacStart); - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,'Accuvac','','kat_accuvac')] call FUNC(treatmentAdvanced_accuvac)); //Need to manuelly call fnc due to ACE not providing _itemName when consumeItem == 0 + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,'Accuvac','','kat_accuvac')] call FUNC(treatmentAdvanced_AccuvacStart)); //Need to manuelly call fnc due to ACE not providing _itemName when consumeItem == 0 callbackProgress = ""; sounds[] = {{QPATHTO_R(sounds\accuvac_start.wav),6,1,15}}; }; @@ -73,7 +138,7 @@ class ACE_Medical_Treatment_Actions { icon = QPATHTOF(ui\suction.paa); consumeItem = 1; medicRequired = QGVAR(medLvl_Suction); - callbackSuccess = QFUNC(treatmentAdvanced_accuvac); + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,'Suction','','kat_suction')] call FUNC(treatmentAdvanced_AccuvacStart)); sounds[] = {{QPATHTO_R(sounds\manualpump_start.wav),6,1,15}}; }; class HyperextendHead: Larynxtubus { @@ -105,7 +170,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(RecoveryPosition_displayNameProgress); category="advanced"; treatmentTime = QGVAR(RecoveryPosition_Time); - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest", "Body"}; medicRequired = 0; items[] = {}; condition = QUOTE((!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)])) && [ARR_2(_medic,_patient)] call FUNC(checkRecovery)); @@ -120,7 +185,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(CancelRecoveryPosition_displayNameProgress); category="advanced"; treatmentTime = QGVAR(CancelRecoveryPosition_Time); - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest", "Body"}; medicRequired = 0; items[] = {}; condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(recovery),false)])); @@ -144,4 +209,88 @@ class ACE_Medical_Treatment_Actions { animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; }; + class Secure: CheckPulse { + displayName = CSTRING(Surgical_Airway_Use); + displayNameProgress = CSTRING(Surgical_Airway_Action); + category = "surgery"; + treatmentLocations = QEGVAR(surgery,surgicalLocationn); + allowedSelections[] = {"Neck"}; + allowSelfTreatment = 0; + medicRequired = QEGVAR(surgery,surgicalAction_MedLevel); + treatmentTime = QGVAR(cricothyrotomySecureTime); + items[] = {"kat_airwayStrap"}; + consumeItem = 1; + condition = QUOTE([ARR_3(_medic,_patient,0.5)] call FUNC(treatmentAdvanced_cricothyrotomyCheck)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(treatmentAdvanced_cricothyrotomy)); + }; + class PrepArea: BasicBandage { + displayName = CSTRING(Scalpel_Use); + displayNameProgress = CSTRING(Scalpel_Action); + category = "surgery"; + treatmentLocations = QGVAR(CrikeLocation); + allowedSelections[] = {"Neck"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(CrikeAction_MedLevel); + treatmentTime = QGVAR(incisionTime); + items[] = {"kat_scalpel"}; + consumeItem = 1; + condition = QUOTE([ARR_3(_medic,_patient,0.1)] call FUNC(treatmentAdvanced_cricothyrotomyCheck)); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0.1)] call FUNC(treatmentAdvanced_cricothyrotomyProgress)); + }; + class Guide: BasicBandage { + displayName = CSTRING(Guide_Use); + displayNameProgress = CSTRING(Guide_Action); + category = "surgery"; + treatmentLocations = QGVAR(CrikeLocation); + treatmentTime = QGVAR(cricothyrotomyGuideTime); + allowedSelections[] = {"Neck"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(CrikeAction_MedLevel); + items[] = {"kat_surgAirway"}; + consumeItem = 0; + condition = QUOTE([ARR_3(_medic,_patient,5)] call FUNC(treatmentAdvanced_cricothyrotomyCheck)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(treatmentAdvanced_cricothyrotomyIncision)); + }; + class Place: BasicBandage { + displayName = CSTRING(Place_Use); + displayNameProgress = CSTRING(Place_Action); + category = "surgery"; + treatmentLocations = QGVAR(CrikeLocation); + treatmentTime = QGVAR(cricothyrotomyPlaceTime); + allowedSelections[] = {"Neck"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(CrikeAction_MedLevel); + items[] = {"kat_surgAirway"}; + consumeItem = 1; + condition = QUOTE([ARR_3(_medic,_patient,0.3)] call FUNC(treatmentAdvanced_cricothyrotomyCheck)); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0.3)] call FUNC(treatmentAdvanced_cricothyrotomyProgress)); + }; + class OpenCrike: CheckPulse { + displayName = CSTRING(Open_Crike_Kit); + displayNameProgress = CSTRING(Open_Crike_Kit_Action); + category = "surgery"; + treatmentLocations = QGVAR(CrikeLocation); + allowedSelections[] = {"all"}; + allowSelfTreatment = 1; + medicRequired = QGVAR(CrikeAction_MedLevel); + treatmentTime = 5; + items[] = {"kat_crikeKit"}; + consumeItem = 1; + callbackSuccess = QFUNC(treatmentAdvanced_cricothyrotomyKit); + condition = "true"; + }; + class ResetCrike: BasicBandage { + displayName = CSTRING(Reset_Crike); + displayNameProgress = CSTRING(Reset_Crike_action); + category = "surgery"; + treatmentLocations = QGVAR(CrikeLocation); + treatmentTime = QGVAR(cricothyrotomyPlaceTime); + allowedSelections[] = {"Neck"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(CrikeAction_MedLevel); + items[] = {"kat_stitchKit"}; + consumeItem = 1; + condition = QUOTE([ARR_3(_medic,_patient,0.9)] call FUNC(treatmentAdvanced_cricothyrotomyCheck)); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0.9)] call FUNC(treatmentAdvanced_cricothyrotomyProgress)); + }; }; diff --git a/addons/airway/CfgSounds.hpp b/addons/airway/CfgSounds.hpp index 22db6c380..53c428fda 100644 --- a/addons/airway/CfgSounds.hpp +++ b/addons/airway/CfgSounds.hpp @@ -17,7 +17,7 @@ class CfgSounds { }; class GVAR(suction) { name = QGVAR(suction); - sound[] = {QPATHTOF_SOUND(sounds\suction.wav), "db + 2", 1, 15}; + sound[] = {QPATHTOF_SOUND(sounds\accuvac_suction.wav), "db + 2", 1, 15}; titles[] = {}; }; -}; +}; \ No newline at end of file diff --git a/addons/airway/CfgVehicles.hpp b/addons/airway/CfgVehicles.hpp index 89b434d3d..1e13983be 100644 --- a/addons/airway/CfgVehicles.hpp +++ b/addons/airway/CfgVehicles.hpp @@ -52,6 +52,11 @@ class CfgVehicles { class TransportItems { MACRO_ADDITEM(kat_larynx,15); MACRO_ADDITEM(kat_guedel,15); + MACRO_ADDITEM(kat_NPA,15); + MACRO_ADDITEM(kat_IGEL,15); + MACRO_ADDITEM(kat_laryngoscope,2); + MACRO_ADDITEM(kat_ETT,15); + MACRO_ADDITEM(kat_crikeKit,15); MACRO_ADDITEM(kat_accuvac,1); MACRO_ADDITEM(kat_suction,10); }; diff --git a/addons/airway/CfgWeapons.hpp b/addons/airway/CfgWeapons.hpp index bc3f9b3b0..affa15154 100644 --- a/addons/airway/CfgWeapons.hpp +++ b/addons/airway/CfgWeapons.hpp @@ -11,7 +11,7 @@ class CfgWeapons { model = QPATHTOF(models\larynx_tube\tube.p3d); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0.5; + mass = 1.5; }; }; class kat_guedel: ACE_ItemCore { @@ -22,10 +22,54 @@ class CfgWeapons { picture = QPATHTOF(ui\guedel_normal.paa); model = QPATHTOF(models\guedel\guedel.p3d); ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_NPA: ACE_ItemCore { + scope = 2; + author = "Katalam"; + displayName= CSTRING(NPA_Display); + descriptionShort = CSTRING(NPA_Desc_Short); + picture = QPATHTOF(ui\npa.paa); + ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { mass = 0.5; }; }; + class kat_IGEL: ACE_ItemCore { + scope = 2; + author = "Katalam"; + displayName= CSTRING(IGEL_Display); + descriptionShort = CSTRING(IGEL_Desc_Short); + picture = QPATHTOF(ui\igel.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_laryngoscope: ACE_ItemCore { + scope = 2; + author = "Katalam"; + displayName= CSTRING(laryngoscope_Display); + descriptionShort = CSTRING(laryngoscope_Desc_Short); + picture = QPATHTOF(ui\Laryngoscope.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + }; + class kat_ETT: ACE_ItemCore { + scope = 2; + author = "Katalam"; + displayName= CSTRING(ETT_Display); + descriptionShort = CSTRING(ETT_Desc_Short); + picture = QPATHTOF(ui\ETT.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; class kat_accuvac: ACE_ItemCore { scope = 2; author = "Katalam"; @@ -35,7 +79,7 @@ class CfgWeapons { model = QPATHTOF(models\accuvac\accuvac.p3d); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 7; + mass = 30; }; }; class kat_suction: ACE_ItemCore { @@ -45,6 +89,39 @@ class CfgWeapons { descriptionShort = CSTRING(Suction_Desc_Short); picture = QPATHTOF(ui\suction_normal.paa); ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2; + }; + }; + class kat_crikeKit: ACE_ItemCore { + scope = 2; + author = "Katalam"; + displayName= CSTRING(CrikeKit_Display); + descriptionShort = CSTRING(CrikeKit_Desc_Short); + picture = QPATHTOF(ui\CrikeKit.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; + class kat_surgAirway: ACE_ItemCore { + scope = 1; + author = "Katalam"; + displayName= CSTRING(SurgAirway_Display); + descriptionShort = CSTRING(SurgAirway_Desc_Short); + picture = QPATHTOF(ui\SurgAirway.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_airwayStrap: ACE_ItemCore { + scope = 1; + author = "Katalam"; + displayName= CSTRING(AirwayStrap_Display); + descriptionShort = CSTRING(AirwayStrap_Desc_Short); + picture = QPATHTOF(ui\AirwayStrap.paa); + ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { mass = 0.5; }; diff --git a/addons/airway/XEH_PREP.hpp b/addons/airway/XEH_PREP.hpp index b14a85024..d16feac0a 100644 --- a/addons/airway/XEH_PREP.hpp +++ b/addons/airway/XEH_PREP.hpp @@ -1,3 +1,7 @@ +PREP(airwayCheck); +PREP(airwayDeterioration); +PREP(airwayPlacementCheck); +PREP(capnographyPFH); PREP(checkAirway); PREP(checkMask); PREP(checkRecovery); @@ -6,20 +10,30 @@ PREP(gui_updateBodyImage); PREP(gui_updateInjuryListGeneral); PREP(gui_updateInjuryListPart); PREP(handleAirway); +PREP(handleAirwayHit); +PREP(handleAwakePuking); PREP(handlePuking); PREP(handleRecoveryPosition); PREP(handleRespawn); +PREP(handleUncon); PREP(init); PREP(startHeadTurning); -PREP(treatmentAdvanced_Accuvac); -PREP(treatmentAdvanced_AccuvacLocal); PREP(treatmentAdvanced_AccuvacStart); -PREP(treatmentAdvanced_airway); -PREP(treatmentAdvanced_airwayLocal); PREP(treatmentAdvanced_CancelRecoveryPosition); PREP(treatmentAdvanced_CancelRecoveryPositionLocal); -PREP(treatmentAdvanced_hyperextendHead); PREP(treatmentAdvanced_RecoveryPosition); PREP(treatmentAdvanced_RecoveryPositionLocal); PREP(treatmentAdvanced_RemoveAirwayItem); -PREP(treatmentAdvanced_RemoveAirwayItemLocal); \ No newline at end of file +PREP(treatmentAdvanced_RemoveAirwayItemLocal); +PREP(treatmentAdvanced_Visualization); +PREP(treatmentAdvanced_airway); +PREP(treatmentAdvanced_airwayLocal); +PREP(treatmentAdvanced_cricothyrotomy); +PREP(treatmentAdvanced_cricothyrotomyCheck); +PREP(treatmentAdvanced_cricothyrotomyIncision); +PREP(treatmentAdvanced_cricothyrotomyIncisionLocal); +PREP(treatmentAdvanced_cricothyrotomyKit); +PREP(treatmentAdvanced_cricothyrotomyLocal); +PREP(treatmentAdvanced_cricothyrotomyProgress); +PREP(treatmentAdvanced_cricothyrotomyProgressLocal); +PREP(treatmentAdvanced_hyperextendHead); \ No newline at end of file diff --git a/addons/airway/XEH_postInit.sqf b/addons/airway/XEH_postInit.sqf index 8cc5cb8f0..dfbcf2aae 100644 --- a/addons/airway/XEH_postInit.sqf +++ b/addons/airway/XEH_postInit.sqf @@ -3,7 +3,6 @@ if !(GVAR(enable)) exitWith {}; [QGVAR(airwayLocal), LINKFUNC(treatmentAdvanced_airwayLocal)] call CBA_fnc_addEventHandler; -[QGVAR(accuvacLocal), LINKFUNC(treatmentAdvanced_accuvacLocal)] call CBA_fnc_addEventHandler; [QGVAR(recoveryPositionLocal), LINKFUNC(treatmentAdvanced_RecoveryPositionLocal)] call CBA_fnc_addEventHandler; [QGVAR(cancelRecoveryPositionLocal), LINKFUNC(treatmentAdvanced_CancelRecoveryPositionLocal)] call CBA_fnc_addEventHandler; [QGVAR(removeAirwayItemLocal), LINKFUNC(treatmentAdvanced_RemoveAirwayItemLocal)] call CBA_fnc_addEventHandler; @@ -19,10 +18,14 @@ if !(GVAR(enable)) exitWith {}; [QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_gui,updateBodyImage), LINKFUNC(gui_updateBodyImage)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; +[QGVAR(cricothyrotomyIncision), LINKFUNC(treatmentAdvanced_cricothyrotomyIncisionLocal)] call CBA_fnc_addEventHandler; +[QGVAR(cricothyrotomyProgress), LINKFUNC(treatmentAdvanced_cricothyrotomyProgressLocal)] call CBA_fnc_addEventHandler; +[QGVAR(cricothyrotomy), LINKFUNC(treatmentAdvanced_cricothyrotomyLocal)] call CBA_fnc_addEventHandler; +[QGVAR(capnoPFH), LINKFUNC(capnographyPFH)] call CBA_fnc_addEventHandler; ["ace_unconscious", { params ["_unit", "_state"]; if !(_state) exitWith { - [_unit] call FUNC(init); + [_unit] call FUNC(handleUncon); }; private _alive = alive _unit; diff --git a/addons/airway/config.cpp b/addons/airway/config.cpp index 28ac6a270..03bf68e89 100644 --- a/addons/airway/config.cpp +++ b/addons/airway/config.cpp @@ -15,7 +15,12 @@ class CfgPatches { "kat_guedel", "kat_larynx", "kat_suction", - "kat_accuvac" + "kat_accuvac", + "kat_ETT", + "kat_laryngoscope", + "kat_IGEL", + "kat_NPA", + "kat_crikeKit" }; magazines[] = {}; requiredAddons[] = { @@ -41,9 +46,9 @@ class CfgPatches { }; }; -#include "CfgSounds.hpp" #include "CfgEventHandlers.hpp" #include "CfgMoves.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" #include "ACE_Medical_Treatment_Actions.hpp" +#include "CfgSounds.hpp" diff --git a/addons/airway/functions/fnc_airwayCheck.sqf b/addons/airway/functions/fnc_airwayCheck.sqf new file mode 100644 index 000000000..efbedda34 --- /dev/null +++ b/addons/airway/functions/fnc_airwayCheck.sqf @@ -0,0 +1,60 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * handels airway degredation + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Damage type (unused) + * 3: Ammo (unused) + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_hitpoints_fnc_woundsHandlerPelvicHit + * + * Public: No + */ + +params ["_unit"]; +private _airwayStatus = _unit getVariable [QGVAR(airwayStatus), [0, 0, 0]]; +private _occlusionArray = +(_unit getVariable [QGVAR(occlusion), [0, 0, 0]]); +private _obstructionArray = +(_unit getVariable [QGVAR(obstruction), [0, 0, 0]]); +private _catastrophicState = _unit getVariable [QGVAR(catastrophicAirway), [false, false]]; +private _hasCatastrophicAirway = ((_catastrophicState select 0) || (_catastrophicState select 1)); +for "_i" from 0 to 2 do { + if ((_airwayStatus select _i) > 0) then { + _obstructionArray set [_i, 0]; + }; + if ((_airwayStatus select _i) > 1) then { + _occlusionArray set [_i, 0]; + }; +}; +if ((_unit getVariable [QGVAR(airway_item), ""]) isEqualTo "NPA") then { + _occlusionArray = _occlusionArray select [1,2]; + _obstructionArray = _obstructionArray select [1,2]; + _hasCatastrophicAirway = _catastrophicState select 1; +}; +private _occlusion = (_occlusionArray findIf { _x > 4 }) != -1; +private _obstruction = (_obstructionArray findIf { _x != 0 }) != -1; +private _airway = true; +private _airwayItem = _unit getVariable [QGVAR(airway_item), ""]; +private _noETT = (_airwayItem isNotEqualTo "ETT"); +private _noSurgicalAirway = (_airwayItem isNotEqualTo "Surgical_Airway"); +private _noOverstretch = _unit getVariable [QGVAR(overstretch), false]; +private _noRecovery = _unit getVariable [QGVAR(recovery), false]; +if ((_obstruction && !_noOverstretch && !_noRecovery) && _noSurgicalAirway && _noETT) then { + _airway = false; +}; +if ((_occlusion && _noETT) && _noSurgicalAirway) then { + _airway = false; +}; +if (_hasCatastrophicAirway && _noSurgicalAirway) then { + _airway = false; +}; +_airway \ No newline at end of file diff --git a/addons/airway/functions/fnc_airwayDeterioration.sqf b/addons/airway/functions/fnc_airwayDeterioration.sqf new file mode 100644 index 000000000..6298eb050 --- /dev/null +++ b/addons/airway/functions/fnc_airwayDeterioration.sqf @@ -0,0 +1,88 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * handels airway degredation + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Damage type (unused) + * 3: Ammo (unused) + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_hitpoints_fnc_woundsHandlerPelvicHit + * + * Public: No + */ + +params ["_unit"]; + +if ( + !(GVAR(enable)) + || {_unit getVariable ["KAT_Occlusion_Exclusion", false]} + || {(_unit getVariable ["KAT_DeteriorationPFH", false])} +) exitWith {}; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {}; + +[{ + params ["_unit"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + + private _alive = alive _unit; + private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; + private _occlusionState = _unit getVariable [QGVAR(occlusion), [0, 0, 0]]; + private _mitigation = _unit getVariable [QGVAR(occlusionMitigation), [0.3, 0.3, 0.3]]; + private _pfhID = _unit getVariable ["KAT_DeteriorationPFH", false]; + if (!_alive || !(_pfhID)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _unit setVariable ["KAT_DeteriorationPFH", false, true]; + }; + if (_isUnconscious) then { + { + private _level = _forEachIndex; + private _current = _x; + if (_current <= 0) exitWith {}; + + if (floor (random 100) < GVAR(deterioratingAirways_chance)) then { + _occlusionState set [_level, (_current + 1) min 10]; + }; + } forEach _occlusionState; + { + private _a = _x; + private _b = _x + 1; + + private _occA = _occlusionState select _a; + private _occB = _occlusionState select _b; + + private _mitA = _mitigation select _a; + private _mitB = _mitigation select _b; + private _downward = _occA > _occB; + private _rate = 0.15 * (1 - ((_mitA + _mitB) / 2)); + if (!_downward) then { _rate = _rate * 0.5}; + private _delta = (_occA - _occB) * _rate; + + _occlusionState set [_a, (_occA - _delta) min 10 max 0]; + _occlusionState set [_b, (_occB + _delta) min 10 max 0]; + } forEach [0, 1]; + _unit setVariable [QGVAR(occlusion), _occlusionState, true]; + } else { + _unit call FUNC(handleAwakePuking); + _unit setVariable ["KAT_DeteriorationPFH", false, true]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + }, + (GVAR(deterioratingAirways_interval) * random [0.8, 1, 1.3]), + [_unit]] call CBA_fnc_addPerFrameHandler; + + _unit setVariable ["KAT_DeteriorationPFH", true, true]; + +}, [_unit], GVAR(deterioratingAirways_interval)] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/airway/functions/fnc_airwayPlacementCheck.sqf b/addons/airway/functions/fnc_airwayPlacementCheck.sqf new file mode 100644 index 000000000..d451ecdf1 --- /dev/null +++ b/addons/airway/functions/fnc_airwayPlacementCheck.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Removing Guedeltubus & KingLT + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Item + * + * Return Value: + * None + * + * Example: + * [player, cursorTarget, "Larynxtubus"] call kat_airway_fnc_treatmentAdvanced_RemoveAirwayItemLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_classname"]; +private _canPlace = false; +private _catastrophicState = _patient getVariable [QGVAR(catastrophicAirway), [false, false]]; + + if (!((_catastrophicState select 0) || (_catastrophicState select 1)) || (_classname isEqualTo "NPA")) then { + _canPlace = true; + }; + +_canPlace diff --git a/addons/airway/functions/fnc_capnographyPFH.sqf b/addons/airway/functions/fnc_capnographyPFH.sqf new file mode 100644 index 000000000..2b1ceb865 --- /dev/null +++ b/addons/airway/functions/fnc_capnographyPFH.sqf @@ -0,0 +1,82 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam, edited by MiszczuZPolski, Miss Heda & apo_tle + * Airway Management for collapsing local + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Treatment classname + * 3: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorTarget, "Larynxtubus", "kat_larynx"] call kat_airway_fnc_treatmentAdvanced_airwayLocal; + * + * Public: No + */ +params ["_unit"]; + +[{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + + private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; + private _alive = alive _unit; + private _airways = ["Larynxtubus", "IGEL", "ETT"]; + private _monitor = _unit getVariable [QEGVAR(breathing,etco2Monitor), []]; + private _hasCapno = (_airways findIf { _x in _monitor }) != -1; + private _color = LLSTRING(capnographyGreen); + private _rgb = [0,1,1,1]; + if !(_alive || _isUnconscious || _hasCapno) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _etco2 = GET_ETCO2(_unit); + private _airway = HAS_AIRWAY(_unit); + if !(_airway) then { + _etco2 = 0; + }; + switch (true) do { + case (_etco2 == 0): { + _color = LLSTRING(capnographyWhite); + _rgb = [1,1,1,1]; + }; + case (_etco2 > 40): { + _color = LLSTRING(capnographyYellow); + _rgb = [1,1,0,1]; + }; + case (_etco2 > 50): { + _color = LLSTRING(capnographyOrange); + _rgb = [1,0.647,0,1]; + }; + case (_etco2 > 60): { + _color = LLSTRING(capnographyRed); + _rgb = [1,0,0,1]; + }; + case (_etco2 < 14): { + _color = LLSTRING(capnographyYellow); + _rgb = [1,1,0,1]; + }; + case (_etco2 < 10): { + _color = LLSTRING(capnographyOrange); + _rgb = [1,0.647,0,1]; + }; + case (_etco2 < 5): { + _color = LLSTRING(capnographyRed); + _rgb = [1,0,0,1]; + }; + default { + _color = LLSTRING(capnographyGreen); + _rgb = [0,1,0,1]; + }; + }; + private _entry = format [LLSTRING(capnographyStatus), _color]; + _unit setVariable [QGVAR(capnoStatus), _entry, true]; + _unit setVariable [QGVAR(capnoColor), _rgb, true]; + private _breathrate = GET_BREATHING_RATE(_unit); + private _delay = 60/_breathrate; + [_idPFH, _delay] call CBA_fnc_setPerFrameHandlerDelay; +}, 3, [_unit]] call CBA_fnc_addPerFrameHandler; + diff --git a/addons/airway/functions/fnc_checkAirway.sqf b/addons/airway/functions/fnc_checkAirway.sqf index f74c24436..35b88b9f1 100644 --- a/addons/airway/functions/fnc_checkAirway.sqf +++ b/addons/airway/functions/fnc_checkAirway.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Katalam + * Author: Katalam, Cplhardcore * Checks need of airway management * * Arguments: @@ -18,53 +18,124 @@ params ["_medic", "_patient"]; -private _hintAirwayObstruction = LLSTRING(AirwayStatus_noObstruction); -private _hintAirwayOcclusion = LLSTRING(AirwayStatus_noOcclusion); -private _obstruction = LSTRING(AirwayStatus_noObstruction_short); -private _occlusion = LSTRING(AirwayStatus_noOcclusion_short); - +private _hintAirwayStatus = LLSTRING(AirwayStatus_noAirwayInjuries); +private _airwayStatus = LSTRING(AirwayStatus_noAirwayInjuries_short); +private _obstructionState = _patient getVariable [QGVAR(obstruction), [0, 0, 0]]; +private _occlusionState = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; +private _catastrophicState = _patient getVariable [QGVAR(catastrophicAirway), [false, false]]; +private _hasPuked = _patient getVariable [QGVAR(hasPuked), false]; private _hintWidth = 14; private _hintSize = 2; - -if (_patient getVariable [QGVAR(obstruction), false]) then { - _hintWidth = 17; - _hintAirwayObstruction = LLSTRING(AirwayStatus_Obstruction); - _obstruction = LSTRING(AirwayStatus_Obstruction_short); - if (_patient getVariable [QGVAR(overstretch), false]) then { - _hintAirwayObstruction = LLSTRING(AirwayStatus_mitigatedObstruction); - _obstruction = LLSTRING(AirwayStatus_mitigatedObstruction_short); - }; - if (GVAR(autoTriage)) then { - _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; - }; -}; -if (_patient getVariable [QGVAR(occluded), false]) then { - _hintAirwayOcclusion = LLSTRING(AirwayStatus_Occlusion); - _occlusion = LSTRING(AirwayStatus_Occlusion_short); - if (GVAR(autoTriage)) then { - _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; - }; -}; -if (!(_patient getVariable [QGVAR(occluded), false] && _patient getVariable [QGVAR(obstruction), false]) && GVAR(autoTriage)) then {_patient setVariable [QACEGVAR(medical,triageLevel), 0, true]}; - -private _message = format ["%1
%2", _hintAirwayObstruction, _hintAirwayOcclusion]; - -if (!(_patient getVariable [QGVAR(occluded), false]) && !(_patient getVariable [QGVAR(obstruction), false])) then { - _message = LLSTRING(AirwayStatus_Clear); - _hintSize = 1.5; - _hintWidth = 10; -}; - -if (_patient getVariable [QEGVAR(chemical,airPoisoning), false]) exitWith { - _message = LLSTRING(AirwayStatus_Poison); - - [_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured); - [_patient, "quick_view", LSTRING(checkAirway_log)] call EFUNC(circulation,removeLog); - [_patient, "quick_view", LSTRING(checkAirway_poisonLog)] call EFUNC(circulation,removeLog); - [_patient, "quick_view", LSTRING(checkAirway_poisonLog), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); +switch (true) do { + case ((_occlusionState select 0 > 0) && _hasPuked): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_OralBloodPukeOcclusion); + _airwayStatus = LSTRING(AirwayStatus_OralBloodPukeOcclusion_short); + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case (_occlusionState select 0 > 0): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_OralBloodOcclusion); + _airwayStatus = LSTRING(AirwayStatus_OralBloodOcclusion_short); + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case (_catastrophicState select 0): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_OralCatastrophic); + _airwayStatus = LSTRING(AirwayStatus_OralCatastrophic_short); + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case (_obstructionState select 0 > 0): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_OralTongueObstruction); + _airwayStatus = LSTRING(AirwayStatus_OralTongueObstruction_short); + if (_patient getVariable [QGVAR(overstretch), false]) then { + _hintAirwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction); + _airwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction_short); + }; + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case (((_occlusionState select 1 > 0) || (_occlusionState select 2 > 0)) && _hasPuked): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_BloodPukeOcclusion); + _airwayStatus = LSTRING(AirwayStatus_BloodPukeOcclusion_short); + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case ((_occlusionState select 1 > 0) || (_occlusionState select 2 > 0)): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_BloodOcclusion); + _airwayStatus = LSTRING(AirwayStatus_BloodOcclusion_short); + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case (_catastrophicState select 1): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_Catastrophic); + _airwayStatus = LSTRING(AirwayStatus_Catastrophic_short); + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case ((_obstructionState select 1 > 0) || (_obstructionState select 2 > 0)): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_Obstruction); + _airwayStatus = LSTRING(AirwayStatus_Obstruction_short); + if (_patient getVariable [QGVAR(overstretch), false]) then { + _hintAirwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction); + _airwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction_short); + }; + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case ((_obstructionState select 0 > 0) && (_occlusionState select 0 > 0) && _hasPuked): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_OralTongueBloodPukeObstruction); + _airwayStatus = LSTRING(AirwayStatus_OralTongueBloodPukeObstruction_short); + if (_patient getVariable [QGVAR(overstretch), false]) then { + _hintAirwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction); + _airwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction_short); + }; + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + case ((_obstructionState select 0 > 0) && (_occlusionState select 0 > 0)): { + _hintWidth = 17; + _hintAirwayStatus = LLSTRING(AirwayStatus_OralTongueBloodObstruction); + _airwayStatus = LSTRING(AirwayStatus_OralTongueBloodObstruction_short); + if (_patient getVariable [QGVAR(overstretch), false]) then { + _hintAirwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction); + _airwayStatus = LLSTRING(AirwayStatus_mitigatedObstruction_short); + }; + if (GVAR(autoTriage)) then { + _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; + }; + }; + default { + _hintAirwayStatus = LLSTRING(AirwayStatus_Clear); + _hintSize = 1.5; + _hintWidth = 10; + }; }; +[{ + params ["_medic", "_patient"]; + [_medic, _patient] call EFUNC(breathing,checkBreathing); +}, [_medic, _patient], 3] call CBA_fnc_waitAndExecute; +if ((((_patient getVariable [QGVAR(occlusion), [0, 0, 0]]) findIf { _x != 0 }) != -1) && (((_patient getVariable [QGVAR(obstruction), [0, 0, 0]]) findIf { _x != 0 }) != -1) && GVAR(autoTriage)) then {_patient setVariable [QACEGVAR(medical,triageLevel), 0, true]}; -[_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured); +[_hintAirwayStatus, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured); [_patient, "quick_view", LSTRING(checkAirway_log)] call EFUNC(circulation,removeLog); -[_patient, "quick_view", LSTRING(checkAirway_log), [[_medic] call ACEFUNC(common,getName), _obstruction, _occlusion]] call ACEFUNC(medical_treatment,addToLog); +[_patient, "quick_view", LSTRING(checkAirway_log), [[_medic] call ACEFUNC(common,getName), _airwayStatus]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/airway/functions/fnc_checkMask.sqf b/addons/airway/functions/fnc_checkMask.sqf index fafcaec4d..31643275f 100644 --- a/addons/airway/functions/fnc_checkMask.sqf +++ b/addons/airway/functions/fnc_checkMask.sqf @@ -17,7 +17,7 @@ params ["_patient"]; -if ((goggles _patient in (missionNamespace getVariable [QEGVAR(chemical,availGasmaskList), []])) || (goggles _patient in (missionNamespace getVariable [QEGVAR(breathing,availOxyMaskList), []]))) exitWith { +if ((goggles _patient in (missionNamespace getVariable [QEGVAR(breathing,availOxyMaskList), []]))) exitWith { true }; diff --git a/addons/airway/functions/fnc_checkRecovery.sqf b/addons/airway/functions/fnc_checkRecovery.sqf index d15843995..06554f95c 100644 --- a/addons/airway/functions/fnc_checkRecovery.sqf +++ b/addons/airway/functions/fnc_checkRecovery.sqf @@ -21,7 +21,7 @@ params ["_medic", "_patient"]; private _return = true; //check if patient has inserted larynx or guedeltube -if ((_patient getVariable [QGVAR(airway_item), ""] in ["Larynxtubus","Guedeltubus"]) || !(isNull objectParent _patient)) then { +if ((_patient getVariable [QGVAR(airway_item), ""] in ["Larynxtubus","ETT", "IGEL"]) || !(isNull objectParent _patient)) then { _return = false; }; diff --git a/addons/airway/functions/fnc_fullHealLocal.sqf b/addons/airway/functions/fnc_fullHealLocal.sqf index b78449275..89dc53fbd 100644 --- a/addons/airway/functions/fnc_fullHealLocal.sqf +++ b/addons/airway/functions/fnc_fullHealLocal.sqf @@ -21,8 +21,23 @@ TRACE_1("fullHealLocal",_patient); _patient setVariable [QGVAR(airway_item), "", true]; _patient setVariable [QGVAR(airway), false, true]; _patient setVariable [QGVAR(clearedTime), 0, true]; -_patient setVariable [QGVAR(obstruction), false, true]; -_patient setVariable [QGVAR(occluded), false, true]; +_patient setVariable [QGVAR(cricothyrotomy), 0, true]; +_patient setVariable [QGVAR(stomachVolume), 5, true]; +_patient setVariable [QGVAR(catastrophicAirway), [false, false], true]; +_patient setVariable [QGVAR(obstruction), [0, 0, 0], true]; +_patient setVariable [QGVAR(occlusion), [0, 0, 0], true]; +_patient setVariable [QGVAR(occlusionMitigation), [0, 0, 0], true]; _patient setVariable [QGVAR(overstretch), false, true]; _patient setVariable [QGVAR(recovery), false, true]; -_patient setVariable [QGVAR(wasOccluded), false]; +_patient setVariable [QGVAR(wasOccluded), [0, 0, 0]]; +_patient setVariable [QGVAR(hasPuked), false, true]; +_patient setVariable [QGVAR(hasExternallyPuked), false, true]; +_patient setVariable [QGVAR(airwayStatus), [0, 0, 0], true]; +_patient setVariable [QGVAR(isVisualized), false, true]; +_patient setVariable [QGVAR(overstretching), false, true]; +_patient setVariable ["kat_occlusion_PFH", false, true]; +_patient setVariable ["kat_pukeActive_PFH", false, true]; +_patient setVariable ["KAT_DeteriorationPFH", false, true]; +[_patient, "blockRadio", "kat_crike", false] call ACEFUNC(common,statusEffect_set); +[_patient, "blockSpeaking", "kat_crike", false] call ACEFUNC(common,statusEffect_set); + diff --git a/addons/airway/functions/fnc_gui_updateBodyImage.sqf b/addons/airway/functions/fnc_gui_updateBodyImage.sqf index 833097ce5..f4ab207b5 100644 --- a/addons/airway/functions/fnc_gui_updateBodyImage.sqf +++ b/addons/airway/functions/fnc_gui_updateBodyImage.sqf @@ -21,18 +21,41 @@ params ["_ctrlGroup", "_target", "_selectionN"]; private _ctrlGuedelTube = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_GUEDELTUBE; private _ctrlKingLT = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_KINGLT; +private _ctrlNPA = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_NPA; +private _ctrlCrike = _ctrlGroup controlsGroupCtrl IDC_BODY_NECK_CRIKE; private _airwayItem = _target getVariable [QGVAR(airway_item), ""]; if (_airwayItem isNotEqualTo "") then { - if (_airwayItem isEqualTo "Larynxtubus") then { - _ctrlGuedelTube ctrlShow false; - _ctrlKingLT ctrlShow true; - } else { - _ctrlGuedelTube ctrlShow true; - _ctrlKingLT ctrlShow false; + switch (true) do { + case (_airwayItem in ["Larynxtubus", "IGEL", "ETT"]): { + _ctrlGuedelTube ctrlShow false; + _ctrlNPA ctrlShow false; + _ctrlKingLT ctrlShow true; + _ctrlCrike ctrlShow false; + }; + case (_airwayItem in ["Surgical_Airway"]): { + _ctrlGuedelTube ctrlShow false; + _ctrlNPA ctrlShow false; + _ctrlKingLT ctrlShow false; + _ctrlCrike ctrlShow true; + }; + case (_airwayItem in ["NPA"]): { + _ctrlGuedelTube ctrlShow false; + _ctrlNPA ctrlShow true; + _ctrlKingLT ctrlShow false; + _ctrlCrike ctrlShow false; + }; + default { + _ctrlGuedelTube ctrlShow true; + _ctrlNPA ctrlShow false; + _ctrlKingLT ctrlShow false; + _ctrlCrike ctrlShow false; + }; }; } else { _ctrlGuedelTube ctrlShow false; _ctrlKingLT ctrlShow false; + _ctrlNPA ctrlShow false; + _ctrlCrike ctrlShow false; }; diff --git a/addons/airway/functions/fnc_gui_updateInjuryListPart.sqf b/addons/airway/functions/fnc_gui_updateInjuryListPart.sqf index 890b7c882..7a3ab7dba 100644 --- a/addons/airway/functions/fnc_gui_updateInjuryListPart.sqf +++ b/addons/airway/functions/fnc_gui_updateInjuryListPart.sqf @@ -26,8 +26,50 @@ if (_target getVariable [QGVAR(overstretch), false] && _selectionN isEqualTo 0) if (_target getVariable [QGVAR(airway), false] && _selectionN isEqualTo 0) then { private _a = _target getVariable [QGVAR(airway_item), ""]; - if (_a isNotEqualTo "") then { + if !(_a in ["", "Surgical_Airway"]) then { private _text = format [LSTRING(%1_Display), _a]; _entries pushBack [localize _text, [0.1, 1, 1, 1]]; }; }; + +if (_target getVariable [QGVAR(airway), false] && _selectionN isEqualTo 1) then { + private _a = _target getVariable [QGVAR(airway_item), ""]; + if (_a in ["Surgical_Airway"]) then { + private _text = format [LSTRING(%1_Display), _a]; + _entries pushBack [localize _text, [0.1, 1, 1, 1]]; + }; +}; +private _airways = ["Larynxtubus", "IGEL", "ETT"]; +private _monitor = _target getVariable [QEGVAR(breathing,etco2Monitor), []]; +private _hasCapno = (_airways findIf { _x in _monitor }) != -1; +if (_hasCapno && _selectionN isEqualTo 0 && GVAR(capnographEnable)) then { + private _entry = _target getVariable [QGVAR(capnoStatus), ""]; + private _color = _target getVariable [QGVAR(capnoColor), [1,1,1,1]]; + _entries pushBack [_entry, _color]; +}; + + +if (((_target getVariable [QGVAR(catastrophicAirway), [false, false]] select 1) || (_target getVariable [QGVAR(catastrophicAirway), [false, false]] select 1)) && (_selectionN isEqualTo 0)) then { + private _text = LSTRING(Catastrophic_Display); + _entries pushBack [localize _text, [1, 0, 0, 1]]; +}; +if ((((_target getVariable [QGVAR(occlusion), [0, 0, 0]]) select 0) > 0) && (_selectionN isEqualTo 0) && (_target getVariable [QGVAR(hasPuked), false])) then{ + private _text = LSTRING(BloodVomitAirway_Display); + _entries pushBack [localize _text, [1, 0, 0, 1]]; +} else { + if ((((_target getVariable [QGVAR(occlusion), [0, 0, 0]]) select 0) > 0) && (_selectionN isEqualTo 0)) then { + private _text = LSTRING(BloodAirway_Display); + _entries pushBack [localize _text, [1, 0, 0, 1]]; + }; +}; +//if ((((_target getVariable [QGVAR(obstruction), [0, 0, 0]]) findIf { _x != 0 }) != -1) && (_selectionN isEqualTo 0)) then{ +// private _text = LSTRING(TraumaticObstruction_Display); +// _entries pushBack [localize _text, [1, 0, 0, 1]]; +//}; +if (_target getVariable [QGVAR(hasExternallyPuked), true] && (_selectionN in [0, 1, 2])) then{ + private _text = LSTRING(HasExternallyPuked); + _entries pushBack [localize _text, [0.1, 1, 1, 1]]; +}; + + + diff --git a/addons/airway/functions/fnc_handleAirway.sqf b/addons/airway/functions/fnc_handleAirway.sqf index ec3526e04..0d1603923 100644 --- a/addons/airway/functions/fnc_handleAirway.sqf +++ b/addons/airway/functions/fnc_handleAirway.sqf @@ -16,10 +16,41 @@ */ params ["_unit"]; - +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {}; //Other mods can utilise KAT_Obstruction_Exclussion variable to prevent obstructions from happening -if ( !(GVAR(enable)) || (_unit getVariable ["KAT_Obstruction_Exclussion", false])) exitWith {}; - -if (random(100) < GVAR(probability_obstruction)) then { - _unit setVariable [QGVAR(obstruction), true, true]; +if !(GVAR(enable)) exitWith {}; +if (random(100) < GVAR(airwayObstructionChance)) then { + private _obstruction = _unit getVariable [QGVAR(obstruction), [0, 0, 0]]; + _obstruction set [0, (((_obstruction select 0) + 1) min 2)]; + _unit setVariable [QGVAR(obstruction), _obstruction, true]; }; + +[{ + params ["_unit"]; + !(_unit getVariable ["ACE_isUnconscious", false]); +}, {}, [_unit], (GVAR(airwayCollapse_Timer) * random [0.8, 1, 1.3]), { + params ["_unit"]; + private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; + private _airwayStatus = _unit getVariable [QGVAR(airwayStatus), [0, 0, 0]]; + if (_isUnconscious && (_airwayStatus select 1 == 0)) then { + private _obstruction = _unit getVariable [QGVAR(obstruction), [0, 0, 0]]; + _obstruction set [1, (((_obstruction select 1) + 1) min 2)]; + _unit setVariable [QGVAR(obstruction), _obstruction, true]; + }; +}] call CBA_fnc_waitUntilAndExecute; + +[{ + params ["_unit"]; + !(_unit getVariable ["ACE_isUnconscious", false]); +}, {}, [_unit], (GVAR(airwayCollapse_Timer) * random [1.8, 2, 2.3]), { + params ["_unit"]; + private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; + private _airwayStatus = _unit getVariable [QGVAR(airwayStatus), [0, 0, 0]]; + if (_isUnconscious && (_airwayStatus select 1 == 0)) then { + private _obstruction = _unit getVariable [QGVAR(obstruction), [0, 0, 0]]; + _obstruction set [2, (((_obstruction select 1) + 1) min 2)]; + _unit setVariable [QGVAR(obstruction), _obstruction, true]; + }; +}] call CBA_fnc_waitUntilAndExecute; + + diff --git a/addons/airway/functions/fnc_handleAirwayHit.sqf b/addons/airway/functions/fnc_handleAirwayHit.sqf new file mode 100644 index 000000000..cf2d7f36b --- /dev/null +++ b/addons/airway/functions/fnc_handleAirwayHit.sqf @@ -0,0 +1,88 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Called when a unit is damaged. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Damage type (unused) + * 3: Ammo (unused) + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_hitpoints_fnc_handleAirwayHit + * + * Public: No + */ + +params ["_unit", "_allDamages"]; +(_allDamages select 0) params ["_engineDamage", "_bodyPart"]; // selection-specific +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {_this}; +if !(GVAR(enable)) exitWith { + TRACE_1("NotEnable",_bodyPart); + _this +}; +if !(_bodyPart in ["Head", "Neck"]) exitWith { + TRACE_1("NotEnable",_bodyPart); + _this +}; + +private _occlusionChanceIncrease = 0; +if (GVAR(airwayOcclusionDamageThreshold_TakenDamage)) then { + _occlusionChanceIncrease = linearConversion [GVAR(airwayOcclusionDamageThreshold), 3, _engineDamage, 0, 30, true]; +}; +private _obstructionChanceIncrease = 0; +if (GVAR(airwayObstructionDamageThreshold_TakenDamage)) then { + _obstructionChanceIncrease = linearConversion [GVAR(airwayObstructionDamageThreshold), 3, _engineDamage, 0, 30, true]; +}; +private _catastrophicAirwayChanceIncrease = 0; +if (GVAR(catastrophicAirwayDamageThreshold_TakenDamage)) then { + _catastrophicAirwayChanceIncrease = linearConversion [GVAR(catastrophicAirwayDamageThreshold), 3, _engineDamage, 0, 30, true]; +}; +switch (true) do { + case (_bodyPart == "Head"): { + if ((floor (random 100) < GVAR(airwayOcclusionChance)) && (_engineDamage > (GVAR(airwayOcclusionDamageThreshold) + _occlusionChanceIncrease))) then { + private _level = selectRandom [0, 1]; + private _occlusion = _unit getVariable [QGVAR(occlusion), [0, 0, 0]]; + _occlusion set [_level, (((_occlusion select _level) + random 3) min 6)]; + _unit setVariable [QGVAR(occlusion), _occlusion, true]; + }; + if ((floor (random 100) < GVAR(airwayObstructionChance)) && (_engineDamage > (GVAR(airwayObstructionDamageThreshold + _obstructionChanceIncrease)))) then { + private _level = selectRandom [0, 1]; + private _obstruction = _unit getVariable [QGVAR(obstruction), [0, 0, 0]]; + _obstruction set [_level, (((_obstruction select _level) + 1) min 2)]; + _unit setVariable [QGVAR(obstruction), _obstruction, true]; + }; + if ((floor (random 100) < GVAR(catastrophicAirwayChance)) && (_engineDamage > (GVAR(catastrophicAirwayDamageThreshold + _catastrophicAirwayChanceIncrease))) && GVAR(CatastrophicAirwaysEnable)) then { + private _level = selectRandom [0, 1]; + private _catastrophic = _unit getVariable [QGVAR(catastrophicAirway), [false, false]]; + _catastrophic set [_level, true]; + _unit setVariable [QGVAR(catastrophicAirway), _catastrophic, true]; + }; + }; + case (_bodyPart == "Neck"): { + if ((floor (random 100) < GVAR(airwayOcclusionChance)) && (_engineDamage > (GVAR(airwayOcclusionDamageThreshold + _occlusionChanceIncrease)))) then { + private _level = selectRandom [1, 2]; + private _occlusion = _unit getVariable [QGVAR(occlusion), [0, 0, 0]]; + _occlusion set [_level, (((_occlusion select _level) random 3) min 2)]; + _unit setVariable [QGVAR(occlusion), _occlusion, true]; + }; + if ((floor (random 100) < GVAR(airwayObstructionChance)) && (_engineDamage > (GVAR(airwayObstructionDamageThreshold + _obstructionChanceIncrease)))) then { + private _level = selectRandom [1, 2]; + private _obstruction = _unit getVariable [QGVAR(obstruction), [0, 0, 0]]; + _obstruction set [_level, (((_obstruction select _level) + 1) min 2)]; + _unit setVariable [QGVAR(obstruction), _obstruction, true]; + }; + }; + default {}; + }; + + +// Damage threshold passed & Airway Injury Given +_this // return \ No newline at end of file diff --git a/addons/airway/functions/fnc_handleAwakePuking.sqf b/addons/airway/functions/fnc_handleAwakePuking.sqf new file mode 100644 index 000000000..4f332ae94 --- /dev/null +++ b/addons/airway/functions/fnc_handleAwakePuking.sqf @@ -0,0 +1,42 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam, edited by MiszczuZPolski + * Called when a unit enters the unconscious state. Will add a FrameHandler for puking while unconscious. + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_airway_fnc_handlePuking; + * + * Public: No + */ + +params ["_unit"]; + + +//Other mods can utilise KAT_Occlusion_Exclusion variable to prevent occlusions from happening +[{ + params ["_unit"]; + private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; + private _alive = alive _unit; + private _occlusion = _unit getVariable [QGVAR(occlusion), [0, 0, 0]]; + if (!_alive || _isUnconscious || ((selectMax _occlusion) == 0)) exitWith {}; + _unit setVariable [QGVAR(occlusion), [0, 0, 0], true]; + _unit setVariable [QGVAR(hasExternallyPuked), true, true]; + [{ + params ["_unit"]; + _unit setVariable [QGVAR(hasExternallyPuked), false, true]; + }, [_unit], 60] call CBA_fnc_waitAndExecute; + private _sound = selectRandom [ + QPATHTOF_SOUND(sounds\puking1.wav), + QPATHTOF_SOUND(sounds\puking2.wav), + QPATHTOF_SOUND(sounds\puking3.wav) + ]; + TRACE_3("Puke",_sound,_unit,(getPosASL _unit)); + playSound3D [_sound, _unit, false, getPosASL _unit, 8, 1, 15]; +}, [_unit], 3] call CBA_fnc_waitAndExecute; + diff --git a/addons/airway/functions/fnc_handlePuking.sqf b/addons/airway/functions/fnc_handlePuking.sqf index 4ee49ae4e..3721a676b 100644 --- a/addons/airway/functions/fnc_handlePuking.sqf +++ b/addons/airway/functions/fnc_handlePuking.sqf @@ -17,30 +17,69 @@ params ["_unit"]; + //Other mods can utilise KAT_Occlusion_Exclusion variable to prevent occlusions from happening if ((_unit getVariable ["kat_pukeActive_PFH", false]) || !(GVAR(enable)) || (_unit getVariable ["KAT_Occlusion_Exclusion", false])) exitWith {}; _unit setVariable ["kat_pukeActive_PFH", true]; -[{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {}; +[{ + params ["_unit"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _isUnconscious = _unit getVariable ["ACE_isUnconscious", false]; - private _recovery = _unit getVariable [QGVAR(recovery), false]; - - if ((!(alive _unit)) || !_isUnconscious || (_unit getVariable [QGVAR(airway_item), ""] isEqualTo "Larynxtubus") || _recovery) exitWith { + private _alive = alive _unit; + if (!_alive || !_isUnconscious || !(_unit getVariable ["kat_pukeActive_PFH", false])) exitWith { + _unit setVariable ["kat_pukeActive_PFH", false]; [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setVariable ["kat_pukeActive_PFH", nil]; }; - - if (GVAR(occlusion_cooldownPeriod) > 0 && {(_unit getVariable [QGVAR(clearedTime), 0] > 0) && ((_unit getVariable [QGVAR(clearedTime), 0]) + GVAR(occlusion_cooldownPeriod)) > CBA_missionTime}) exitWith {}; - - if (random(100) <= GVAR(probability_occluded)) then { - if !(_unit getVariable [QGVAR(occluded), false]) then { - _unit setVariable [QGVAR(occluded), true, true]; - if (GVAR(checkbox_puking_sound)) then { - playSound3D [selectRandom [QPATHTOF_SOUND(sounds\puking1.wav),QPATHTOF_SOUND(sounds\puking2.wav),QPATHTOF_SOUND(sounds\puking3.wav)], _unit, false, getPosASL _unit, 8, 1, 15]; + private _nauseaMult = _unit getVariable [QEGVAR(pharma,nauseaMult), 1]; + private _stomachVolume = _unit getVariable [QGVAR(stomachVolume), 5]; + private _nauseaMult = (_nauseaMult min 6) max 0.1; + private _nauseaDelay = if (_nauseaMult < 1) then {_nauseaMult / 2} else {_nauseaMult}; + private _icp = _unit getVariable [QEGVAR(brain,ICP),15]; + private _icpChance = linearConversion [15, 60, _icp, 1, 2, true]; + private _nauseaChance = 1; + if (_nauseaMult <= 1) then { + _nauseaChance = linearConversion [1, 6, _nauseaMult, 1, 3, true]; + } else { + _nauseaChance = linearConversion [0.1, 1, _nauseaMult, 0.001, 1, true]; + }; + if (_nauseaMult < 0.3) exitWith {}; + if (_stomachVolume <= 0) exitWith {}; + if ((CBA_missionTime - (_unit getVariable [QGVAR(clearedTime), 0])) < GVAR(cooldownTime)) exitWith { + [_idPFH, 5] call CBA_fnc_setPerFrameHandlerDelay; + }; + if ((random 100) <= (GVAR(airwayPukeChance) * (_nauseaChance * _icpChance))) then { + private _occlusionState = _unit getVariable [QGVAR(occlusion), [0, 0, 0]]; + private _volume = (_unit getVariable [QGVAR(stomachVolume), 5]) max 1; + private _mitigation = _unit getVariable [QGVAR(occlusionMitigation), [0, 0, 0]]; + _occlusionState set [0, ((_occlusionState select 0) + floor (_volume * 1.5 * (1 - (_mitigation select 0)))) min 10]; + _occlusionState set [1, ((_occlusionState select 1) + floor (_volume * (1 - (_mitigation select 1)))) min 10]; + _occlusionState set [2, ((_occlusionState select 2) + floor (_volume * 0.7 * (1 - (_mitigation select 1)))) min 10]; + _unit setVariable [QGVAR(occlusion), _occlusionState, true]; + _unit setVariable [QGVAR(stomachVolume), (_volume - 1), true]; + _unit setVariable [QGVAR(hasPuked), true, true]; + TRACE_1("occlusion",_occlusionState); + if (GVAR(checkbox_puking_sound)) then { + private _sound = selectRandom [ + QPATHTOF_SOUND(sounds\puking1.wav), + QPATHTOF_SOUND(sounds\puking2.wav), + QPATHTOF_SOUND(sounds\puking3.wav) + ]; + TRACE_3("Puke",_sound,_unit,(getPosASL _unit)); + playSound3D [_sound, _unit, false, getPosASL _unit, 8, 1, 15]; }; }; - }; -}, GVAR(occlusion_repeatTimer), [_unit]] call CBA_fnc_addPerFrameHandler; + private _delay = ((GVAR(occlusion_repeatTimer) / _nauseaDelay) * random [0.8, 1, 1.3]) max GVAR(minPukeTime); + [_unit] call FUNC(airwayDeterioration); + [_idPFH, _delay] call CBA_fnc_setPerFrameHandlerDelay; + }, GVAR(occlusion_repeatTimer), [_unit]] call CBA_fnc_addPerFrameHandler; + + +}, [_unit], (15 * random [0.7, 1, 1.5])] call CBA_fnc_waitAndExecute; + + diff --git a/addons/airway/functions/fnc_handleUncon.sqf b/addons/airway/functions/fnc_handleUncon.sqf new file mode 100644 index 000000000..1de887d58 --- /dev/null +++ b/addons/airway/functions/fnc_handleUncon.sqf @@ -0,0 +1,58 @@ +#include "..\script_component.hpp" +/* + * Author: MiszczuZPolski + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_airway_fnc_fullHealLocal + * + * Public: No + */ + +params ["_patient"]; +if (!local _patient) exitWith {}; +if !(GVAR(enable)) exitWith {}; +KAT_forceWakeup = false; + +TRACE_1("handleUncon",_patient); +private _airwayItem = _patient getVariable [QGVAR(airway_item), ""]; +private _noSurgicalAirway = (_airwayItem isNotEqualTo "Surgical_Airway"); +if (_noSurgicalAirway) then { + _patient setVariable [QGVAR(airway), false, true]; + _patient setVariable [QGVAR(clearedTime), 0, true]; + _patient setVariable [QGVAR(cricothyrotomy), 0, true]; + private _item = _patient getVariable [QGVAR(airway_item), ""]; + private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; + _currentMonitors deleteAt (_currentMonitors find _item); + _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; + _patient setVariable [QGVAR(airway_item), "", true]; +}; +_patient call FUNC(handleAwakePuking); +_patient setVariable [QGVAR(occlusionMitigation), [0, 0, 0], true]; +_patient setVariable [QGVAR(obstruction), [0, 0, 0], true]; +_patient setVariable [QGVAR(overstretch), false, true]; +_patient setVariable [QGVAR(recovery), false, true]; +_patient setVariable [QGVAR(airwayStatus), [0, 0, 0], true]; +_patient setVariable [QGVAR(isVisualized), false, true]; +_patient setVariable ["kat_occlusion_PFH", false, true]; +_patient setVariable ["kat_pukeActive_PFH", false, true]; +[{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + + private _isUnconscious = _patient getVariable ["ACE_isUnconscious", false]; + private _alive = alive _patient; + private _stomachVolume = _patient getVariable [QGVAR(stomachVolume), 5]; + if (!_alive || (_stomachVolume == 5) || _isUnconscious) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _patient setVariable [QGVAR(stomachVolume), (_stomachVolume + 1), true]; + }, + 300, + [_patient]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/airway/functions/fnc_startHeadTurning.sqf b/addons/airway/functions/fnc_startHeadTurning.sqf index 1945760f8..8e92d20cb 100644 --- a/addons/airway/functions/fnc_startHeadTurning.sqf +++ b/addons/airway/functions/fnc_startHeadTurning.sqf @@ -99,10 +99,13 @@ GVAR(headTurn_timeOut) = true; if (_patient getVariable [QGVAR(occluded), false]) then { if(random 100 < GVAR(probability_headturning)) then { - _patient setVariable [QGVAR(occluded), false, true]; - if (GVAR(occlusion_cooldownPeriod) > 0) then { + private _occlusionState = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; + _occlusionState set [0, ((_occlusionState select 0) - 2) max 0]; + _occlusionState set [1, ((_occlusionState select 1) - 2) max 0]; + _occlusionState set [2, ((_occlusionState select 2) - 2) max 0]; + _patient setVariable [QGVAR(occlusion), _occlusionState, true]; _patient setVariable [QGVAR(clearedTime), CBA_missionTime, true]; - }; + [LLSTRING(headTurning_success), 1.5, _medic] call ACEFUNC(common,displayTextStructured); } else { [LLSTRING(headTurning_info), 2, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf b/addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf deleted file mode 100644 index ca279a071..000000000 --- a/addons/airway/functions/fnc_treatmentAdvanced_Accuvac.sqf +++ /dev/null @@ -1,42 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Katalam - * Airway Management for occluding - * - * Arguments: - * 0: Medic - * 1: Patient - * 2: Body Part - * 3: Treatment - * 4: Item User (not used) - * 5: Used Item - * - * Return Value: - * Succesful treatment started - * - * Example: - * [player, cursorTarget, "Head", "Accuvac", objNull, "kat_accuvac"] call kat_airway_fnc_treatmentAdvanced_accuvac; - * - * Public: Yes - */ - -params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; - -if !(_patient getVariable [QGVAR(occluded), false]) exitWith { - private _output = LLSTRING(Accuvac_NA); - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); - - if (_usedItem isEqualTo "kat_suction" && GVAR(Suction_reuse)) then { - [_medic, "kat_suction"] call ACEFUNC(common,addToInventory); - }; -}; - -if (_usedItem isEqualTo "kat_suction" && GVAR(Suction_reuse)) then { - [_medic, "kat_suction"] call ACEFUNC(common,addToInventory); -}; - -[_patient, LLSTRING(AccuvacTreatment_displayName)] call ACEFUNC(medical_treatment,addToTriageCard); -[_patient, "activity", LSTRING(Suction_Log), [[_medic] call ACEFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call ACEFUNC(medical_treatment,addToLog); -[LLSTRING(Accuvac_Success), 1.5, _medic] call ACEFUNC(common,displayTextStructured); - -[QGVAR(accuvacLocal), _patient, _patient] call CBA_fnc_targetEvent; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_AccuvacLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_AccuvacLocal.sqf deleted file mode 100644 index c8cfb55c6..000000000 --- a/addons/airway/functions/fnc_treatmentAdvanced_AccuvacLocal.sqf +++ /dev/null @@ -1,26 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Katalam - * Airway Management for occluding local - * - * Arguments: - * 0: Patient - * - * Return Value: - * None - * - * Example: - * [player, "Accuvac"] call kat_airway_fnc_treatmentAdvanced_accuvacLocal; - * - * Public: No - */ - -params ["_patient"]; - -if (_patient getVariable [QGVAR(occluded), false]) then { - _patient setVariable [QGVAR(occluded), false, true]; - - if (GVAR(occlusion_cooldownPeriod) > 0) then { - _patient setVariable [QGVAR(clearedTime), CBA_missionTime, true]; - }; -}; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_AccuvacStart.sqf b/addons/airway/functions/fnc_treatmentAdvanced_AccuvacStart.sqf index bc8726ae5..1c0c300ba 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_AccuvacStart.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_AccuvacStart.sqf @@ -22,26 +22,134 @@ params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; -if !(_patient getVariable [QGVAR(occluded), false]) exitWith {}; +if (((_patient getVariable [QGVAR(occlusion), [0, 0, 0]]) findIf { _x != 0 }) == -1) exitWith { + private _output = LLSTRING(Accuvac_NA); + [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); + if (_usedItem isEqualTo "kat_suction" && GVAR(Suction_reuse)) then { + [_medic, "kat_suction"] call ACEFUNC(common,addToInventory); + }; +}; -if (_usedItem isEqualTo "kat_suction") then { - private _suctionSound = playSound3D [QPATHTOF_SOUND(sounds\manualpump_suction.wav), _patient, false, getPosASL _patient, 6, 1, 15]; +_patient setVariable [QGVAR(suctionActive), true, true]; - [{ - !dialog; - }, { - params ["_suctionSound"]; +GVAR(suctionTarget) = _patient; - stopSound _suctionSound; - }, [_suctionSound], 7.5] call CBA_fnc_waitUntilAndExecute; -} else { - private _suctionSound = playSound3D [QPATHTOF_SOUND(sounds\accuvac_suction.wav), _patient, false, getPosASL _patient, 6, 1, 15]; +GVAR(suctionCancel_EscapeID) = [0x01, [false, false, false], { + GVAR(suctionTarget) setVariable [QGVAR(suctionActive), false, true]; +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; - [{ - !dialog; - }, { - params ["_suctionSound"]; +GVAR(suctionCancel_MouseID) = [0xF0, [false, false, false], { + GVAR(suctionTarget) setVariable [QGVAR(suctionActive), false, true]; +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + +ACEGVAR(medical_gui,pendingReopen) = false; // Prevent medical menu from reopening + +if (dialog) then { // If another dialog is open (medical menu) close it + closeDialog 0; +}; + +private _notInVehicle = isNull objectParent _medic; - stopSound _suctionSound; - }, [_suctionSound], 5.7] call CBA_fnc_waitUntilAndExecute; +GVAR(suction_attempts) = 0; +GVAR(loopSuction) = false; +GVAR(continueSuction) = true; + +if (_notInVehicle) then { + [_medic, "AinvPknlMstpSnonWnonDnon_AinvPknlMstpSnonWnonDnon_medic", 1] call ACEFUNC(common,doAnimation); + GVAR(loopSuction) = true; }; + +GVAR(suction_timeOut) = true; + +[{ + params ["_medic", "_patient", "_notInVehicle", "_usedItem"]; + + [LLSTRING(suction_stop), "", ""] call ACEFUNC(interaction,showMouseHint); + [LLSTRING(suction_start), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + + [{ + params ["_args", "_idPFH"]; + _args params ["_medic", "_patient", "_notInVehicle", "_usedItem"]; + + private _patientCondition = (!(IS_UNCONSCIOUS(_patient)) && alive _patient || _patient isEqualTo objNull); + private _medicCondition = (!(alive _medic) || IS_UNCONSCIOUS(_medic) || _medic isEqualTo objNull); + private _vehicleCondition = (objectParent _medic isNotEqualTo objectParent _patient); + private _distanceCondition = (_patient distance2D _medic > ACEGVAR(medical_gui,maxDistance)); + + + if (_patientCondition || _medicCondition || !(_patient getVariable [QGVAR(suctionActive), false]) || dialog || {(!_notInVehicle && _vehicleCondition) || {(_notInVehicle && _distanceCondition)}}) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + + [] call ACEFUNC(interaction,hideMouseHint); + + [GVAR(suctionCancel_EscapeID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(suctionCancel_MouseID), "keydown"] call CBA_fnc_removeKeyHandler; + + closeDialog 0; + if (_usedItem isEqualTo "kat_suction" && GVAR(Suction_reuse)) then { + [_medic, "kat_suction"] call ACEFUNC(common,addToInventory); + }; + + [_patient, "activity", LSTRING(Activity_Suction), [[_medic, false, true] call ACEFUNC(common,getName), GVAR(suction_attempts)]] call ACEFUNC(medical_treatment,addToLog); + + [LLSTRING(Suction_cancelled), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; + + if !(GVAR(suction_timeOut)) then { + GVAR(suction_timeOut) = true; + + [{ + params ["_patient"]; + + !(_patient getVariable [QGVAR(suctionActive), false]); + }, {}, [_patient, _medic, _usedItem], GVAR(Suction_Interval), + { + params ["_patient", "_medic", "_usedItem"]; + + GVAR(suction_timeOut) = false; + GVAR(suction_attempts) = GVAR(suction_attempts) + 1; + if (((_patient getVariable [QGVAR(occlusion), [0, 0, 0]]) findIf { _x > 1 }) != -1) then { + if(random 100 < GVAR(probability_suction)) then { + private _occlusionState = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; + private _reduction = floor (selectRandom [1, 2, 3] * GVAR(SuctionEffectiveness)); + _occlusionState set [0, (((_occlusionState select 0) - _reduction) max 0)]; + _occlusionState set [1, (((_occlusionState select 1) - _reduction) max 0)]; + _occlusionState set [2, (((_occlusionState select 2) - _reduction) max 0)]; + _patient setVariable [QGVAR(occlusion), _occlusionState, true]; + [LLSTRING(suction_info), 2, _medic] call ACEFUNC(common,displayTextStructured); + } else { + [LLSTRING(suction_info), 2, _medic] call ACEFUNC(common,displayTextStructured); + }; + if (_usedItem isEqualTo "kat_suction") then { + _soundID = playSound3D [QPATHTOF_SOUND(sounds\manualpump_suction.wav), _patient, false, getPosASL _patient, 6, 1, 15]; + } else { + _soundID = playSound3D [QPATHTOF_SOUND(sounds\accuvac_suction.wav), _patient, false, getPosASL _patient, 6, 1, 15]; + }; + } else { + [LLSTRING(suction_success), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + _patient setVariable [QGVAR(hasPuked), false, true]; + if (_usedItem isEqualTo "kat_suction") then { + _soundID = playSound3D [QPATHTOF_SOUND(sounds\manualpump_start.wav), _patient, false, getPosASL _patient, 6, 1, 15]; + } else { + _soundID = playSound3D [QPATHTOF_SOUND(sounds\accuvac_start.wav), _patient, false, getPosASL _patient, 6, 1, 15]; + }; + }; + _patient setVariable [QGVAR(clearedTime), CBA_missionTime, true]; + + }] call CBA_fnc_waitUntilAndExecute; + }; + + if (GVAR(loopSuction)) then { + GVAR(loopSuction) = false; + [{ + params ["_patient"]; + !(_patient getVariable [QGVAR(suctionActive), false]); + }, {}, [_patient], 7.6, { + GVAR(loopSuction) = true; + }] call CBA_fnc_waitUntilAndExecute; + }; + }, 0, [_medic, _patient, _notInVehicle, _usedItem]] call CBA_fnc_addPerFrameHandler; + + [{GVAR(suction_timeOut) = false;}, [], 1] call CBA_fnc_waitAndExecute; +}, [_medic, _patient, _notInVehicle, _usedItem], 2] call CBA_fnc_waitAndExecute; + diff --git a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf index 8deda2aef..9b64962ff 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf @@ -21,17 +21,11 @@ params ["_medic", "_patient", ["_delayed", false]]; _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; -_patient setVariable [QGVAR(occluded), (_patient getVariable [QGVAR(wasOccluded), false]), true]; -_patient call FUNC(handlePuking); private _output = LLSTRING(RecoveryPosition_Cancel); -if (_delayed) then { - [{ - params ["_medic", "_output"]; +[{ + params ["_medic", "_output"]; - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); - }, [_medic, _output], 2.5] call CBA_fnc_waitAndExecute; -} else { [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); -}; \ No newline at end of file +}, [_medic, _output], 2.5] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf index 03d4e6da6..1d0b45c23 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf @@ -24,18 +24,20 @@ _patient setVariable [QGVAR(overstretch), true, true]; private _output = LLSTRING(RecoveryPosition_Ready); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); -_patient setVariable [QGVAR(wasOccluded), (_patient getVariable [QGVAR(occluded), false])]; - -if (GVAR(RecoveryPosition_TimeToDrain) > 0 && _patient getVariable [QGVAR(wasOccluded), false]) then { - [{ - params ["_patient"]; - - _patient setVariable [QGVAR(occluded), false, true]; - _patient setVariable [QGVAR(wasOccluded), false]; - }, [_patient], (random GVAR(RecoveryPosition_TimeToDrain) max 1)] call CBA_fnc_waitAndExecute; -} else { - _patient setVariable [QGVAR(occluded), false, true]; - _patient setVariable [QGVAR(wasOccluded), false]; +if (GVAR(RecoveryPosition_TimeToDrain) > 0) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _occlusionState = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _occlusionState = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; + _occlusionState set [0, ((_occlusionState select 0) - selectRandom [1, 2]) max 0]; + _occlusionState set [1, ((_occlusionState select 1) - selectRandom [1, 2]) max 0]; + _occlusionState set [2, ((_occlusionState select 2) - selectRandom [1, 2]) max 0]; + _patient setVariable [QGVAR(occlusion), _occlusionState, true]; +}, GVAR(RecoveryPosition_TimeToDrain), [_patient]] call CBA_fnc_addPerFrameHandler; }; [{ @@ -51,5 +53,4 @@ if (GVAR(RecoveryPosition_TimeToDrain) > 0 && _patient getVariable [QGVAR(wasOcc _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; - _patient setVariable [QGVAR(occluded), (_patient getVariable [QGVAR(wasOccluded), false]), true]; }, [_medic, _patient], 3600, {}] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItem.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItem.sqf index a3d7c2625..accb1096d 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItem.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItem.sqf @@ -20,14 +20,32 @@ params ["_medic", "_patient"]; private _item = _patient getVariable [QGVAR(airway_item), ""]; -if (_item isEqualTo "Larynxtubus") then { - [_patient, "activity", LSTRING(RemoveLarynxtubus_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); - - private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; - _currentMonitors deleteAt (_currentMonitors find "Larynxtubus"); - _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; -} else { - [_patient, "activity", LSTRING(RemoveGuedeltubus_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); +switch (true) do { + case (_item isEqualTo "Larynxtubus"): { + [_patient, "activity", LSTRING(RemoveLarynxtubus_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; + _currentMonitors deleteAt (_currentMonitors find "Larynxtubus"); + _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; + }; + case (_item isEqualTo "IGEL"): { + [_patient, "activity", LSTRING(RemoveIGEL_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; + _currentMonitors deleteAt (_currentMonitors find "IGEL"); + _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; + }; + case (_item isEqualTo "ETT"): { + [_patient, "activity", LSTRING(RemoveETT_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; + _currentMonitors deleteAt (_currentMonitors find "ETT"); + _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; + }; + case (_item isEqualTo "NPA"): { + [_patient, "activity", LSTRING(RemoveNPA_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + }; + case (_item isEqualTo "Guedeltubes"): { + [_patient, "activity", LSTRING(RemoveGuedeltubus_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + }; + default {}; }; [QGVAR(removeAirwayItemLocal), [_medic, _patient, _item], _patient] call CBA_fnc_targetEvent; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItemLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItemLocal.sqf index 941c7939d..3b4728a12 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItemLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RemoveAirwayItemLocal.sqf @@ -18,19 +18,36 @@ */ params ["_medic", "_patient", "_item"]; - +private _occlusion = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; +private _total = 0; { _total = _total + _x } forEach _occlusion; +private _airwayVomit = floor (_total/3); +for "_i" from 0 to 2 do { + _occlusion set [_i, _airwayVomit]; +}; +_patient setVariable [QGVAR(occlusion), _occlusion, true]; _patient setVariable [QGVAR(airway_item), "", true]; _patient setVariable [QGVAR(airway), false, true]; +_patient setVariable [QGVAR(airwayStatus), [0, 0, 0], true]; +_patient setVariable [QGVAR(occlusionMitigation), [0, 0, 0], true]; _patient call FUNC(handleAirway); -if (_item isEqualTo "Larynxtubus") then { - _patient call FUNC(handlePuking); -}; - if !(GVAR(ReusableAirwayItems)) exitWith {}; -if (_item isEqualTo "Larynxtubus") then { - [_medic, "kat_larynx"] call ACEFUNC(common,addToInventory); -} else { - [_medic, "kat_guedel"] call ACEFUNC(common,addToInventory); +switch (true) do { + case (_item isEqualTo "Larynxtubus"): { + [_medic, "kat_larynx"] call ACEFUNC(common,addToInventory); + }; + case (_item isEqualTo "IGEL"): { + [_medic, "kat_IGEL"] call ACEFUNC(common,addToInventory); + }; + case (_item isEqualTo "ETT"): { + [_medic, "kat_ETT"] call ACEFUNC(common,addToInventory); + }; + case (_item isEqualTo "NPA"): { + [_medic, "kat_NPA"] call ACEFUNC(common,addToInventory); + }; + case (_item isEqualTo "Guedeltubes"): { + [_medic, "kat_guedel"] call ACEFUNC(common,addToInventory); + }; + default {}; }; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_Visualization.sqf b/addons/airway/functions/fnc_treatmentAdvanced_Visualization.sqf new file mode 100644 index 000000000..985c21e24 --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_Visualization.sqf @@ -0,0 +1,143 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Play visualization Devices sound + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * Succesful treatment started + * + * Example: + * [player, cursorTarget, "Head"] call kat_airway_fnc_treatmentAdvanced_Visualization; + * + * Public: Yes + */ + +params ["_medic", "_patient", "_bodyPart"]; + +_patient setVariable [QGVAR(visualizationActive), true, true]; + +GVAR(visualizationTarget) = _patient; +GVAR(visualizationSource) = _medic; + +GVAR(visualizationCancel_EscapeID) = [0x01, [false, false, false], { + GVAR(visualizationTarget) setVariable [QGVAR(visualizationActive), false, true]; +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + +GVAR(visualizationCancel_MouseID) = [0xF0, [false, false, false], { + GVAR(visualizationTarget) setVariable [QGVAR(visualizationActive), false, true]; +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + + + +ACEGVAR(medical_gui,pendingReopen) = false; // Prevent medical menu from reopening + +if (dialog) then { // If another dialog is open (medical menu) close it + closeDialog 0; +}; + +private _notInVehicle = isNull objectParent _medic; + +GVAR(visualization_attempts) = 0; +GVAR(loopvisualization) = false; +GVAR(continuevisualization) = true; + +if (_notInVehicle) then { + [_medic, "AinvPknlMstpSnonWnonDnon_AinvPknlMstpSnonWnonDnon_medic", 1] call ACEFUNC(common,doAnimation); + GVAR(loopvisualization) = true; +}; + +GVAR(visualization_timeOut) = true; + +[{ + params ["_medic", "_patient", "_notInVehicle"]; + + [LLSTRING(visualization_stop), "", ""] call ACEFUNC(interaction,showMouseHint); + [LLSTRING(visualization_start), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + + [{ + params ["_args", "_idPFH"]; + _args params ["_medic", "_patient", "_notInVehicle"]; + + private _patientCondition = (!(IS_UNCONSCIOUS(_patient)) && alive _patient || _patient isEqualTo objNull); + private _medicCondition = (!(alive _medic) || IS_UNCONSCIOUS(_medic) || _medic isEqualTo objNull); + private _vehicleCondition = (objectParent _medic isNotEqualTo objectParent _patient); + private _distanceCondition = (_patient distance2D _medic > ACEGVAR(medical_gui,maxDistance)); + + + if (_patientCondition || _medicCondition || !(_patient getVariable [QGVAR(visualizationActive), false]) || dialog || {(!_notInVehicle && _vehicleCondition) || {(_notInVehicle && _distanceCondition)}}) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + + [] call ACEFUNC(interaction,hideMouseHint); + + [GVAR(visualizationCancel_EscapeID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(visualizationCancel_MouseID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(PlaceETT), "keydown"] call CBA_fnc_removeKeyHandler; + + closeDialog 0; + [_patient, "activity", LSTRING(Activity_visualization), [[_medic, false, true] call ACEFUNC(common,getName), GVAR(visualization_attempts)]] call ACEFUNC(medical_treatment,addToLog); + + [LLSTRING(visualization_cancelled), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; + + if !(GVAR(visualization_timeOut)) then { + GVAR(visualization_timeOut) = true; + + [{ + params ["_patient"]; + + !(_patient getVariable [QGVAR(visualizationActive), false]); + }, {}, [_patient, _medic], GVAR(visualization_Interval), + { + params ["_patient", "_medic"]; + + GVAR(visualization_timeOut) = false; + GVAR(visualization_attempts) = GVAR(visualization_attempts) + 1; + private _paralysis = _patient getVariable [QEGVAR(breathing,paralysis), 0]; + private _occlusions = _patient getVariable [QGVAR(occlusion), [0, 0, 0]]; + + if (((_patient getVariable [QGVAR(occlusion), [0, 0, 0]]) findIf { _x < 4 }) != -1) then { + private _difficulty = (((10 - (_occlusions select 0 min 4) - (_occlusions select 1 min 4)) / ((1 -_paralysis) max 0.1)) + (GVAR(visualization_attempts) * 3) + GVAR(probability_visualization)); + if (random 100 < _difficulty) then { + + [] call ACEFUNC(interaction,hideMouseHint); + [LLSTRING(visualization_stop), LLSTRING(visualization_place), ""] call ACEFUNC(interaction,showMouseHint); + _patient setVariable [QGVAR(isVisualized), true, true]; + GVAR(PlaceETT) = [0xF1, [false, false, false], { + [QGVAR(airwayLocal), [GVAR(visualizationSource), GVAR(visualizationTarget), "ETT", "kat_ETT"], GVAR(visualizationTarget)] call CBA_fnc_targetEvent; + GVAR(visualizationTarget) setVariable [QGVAR(visualizationActive), false, true]; + }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + [{params ["_patient"]; + _patient setVariable [QGVAR(isVisualized), false, true]; }, [_patient], 20] call CBA_fnc_waitAndExecute; + [LLSTRING(visualization_success), 2, _medic] call ACEFUNC(common,displayTextStructured); + } else { + [LLSTRING(visualization_info), 2, _medic] call ACEFUNC(common,displayTextStructured); + }; + } else { + [LLSTRING(visualization_failure), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; + + }] call CBA_fnc_waitUntilAndExecute; + }; + + if (GVAR(loopvisualization)) then { + GVAR(loopvisualization) = false; + [{ + params ["_patient"]; + !(_patient getVariable [QGVAR(visualizationActive), false]); + }, {}, [_patient], 7.6, { + GVAR(loopvisualization) = true; + }] call CBA_fnc_waitUntilAndExecute; + }; + }, 0, [_medic, _patient, _notInVehicle]] call CBA_fnc_addPerFrameHandler; + + [{GVAR(visualization_timeOut) = false;}, [], 1] call CBA_fnc_waitAndExecute; +}, [_medic, _patient, _notInVehicle], 2] call CBA_fnc_waitAndExecute; + diff --git a/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf index f8f0ae7df..0f26fa298 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf @@ -18,22 +18,56 @@ * Public: No */ -params ["_medic", "_patient","_classname", "_usedItem"]; +params ["_medic", "_patient","_classname", "_usedItem", ["_requireClear", true]]; +private _occlusion = ((_patient getVariable [QGVAR(occlusion), [0, 0, 0]]) findIf { _x > 4 }) != -1; +private _obstruction = ((_patient getVariable [QGVAR(obstruction), [0, 0, 0]]) findIf { _x != 0 }) != -1; -if (_patient getVariable [QGVAR(occluded), false]) exitWith { +if ((_occlusion || (_obstruction && !(_patient getVariable [QGVAR(overstretch), false])) ) && !(_classname in ["NPA"])) exitWith { [QGVAR(airwayFeedback), [_medic, LLSTRING(AirwayStatus_NotClearForItem)], _medic] call CBA_fnc_targetEvent; [_medic, _usedItem] call ACEFUNC(common,addToInventory); }; - _patient setVariable [QGVAR(airway), true, true]; -_patient setVariable [QGVAR(obstruction), false, true]; _patient setVariable [QGVAR(airway_item), _classname, true]; +switch (true) do { + case (_usedItem isEqualTo "kat_larynx"): { + _patient setVariable [QGVAR(airwayStatus), [2, 2, 0], true]; + _patient setVariable [QGVAR(occlusionMitigation), [0.7, 0.7, 0.7], true]; + private _obstruction = _patient getVariable [QGVAR(obstruction), [0, 0, 0]]; + private _newObstruction = [0, 0, _obstruction select 2]; + _patient setVariable [QGVAR(obstruction), _newObstruction, true]; + }; + case (_usedItem isEqualTo "kat_IGEL"): { + _patient setVariable [QGVAR(airwayStatus), [2, 2, 0], true]; + _patient setVariable [QGVAR(occlusionMitigation), [0, 0, 1], true]; + private _obstruction = _patient getVariable [QGVAR(obstruction), [0, 0, 0]]; + private _newObstruction = [0, 0, _obstruction select 2]; + _patient setVariable [QGVAR(obstruction), _newObstruction, true]; + }; + case (_usedItem isEqualTo "kat_ETT"): { + _patient setVariable [QGVAR(airwayStatus), [2, 2, 2], true]; + _patient setVariable [QGVAR(obstruction), [0, 0, 0], true]; + [GVAR(PlaceETT), "keydown"] call CBA_fnc_removeKeyHandler; + _patient setVariable [QGVAR(visualizationActive), false, true]; + }; + case (_usedItem isEqualTo "kat_NPA"): { + _patient setVariable [QGVAR(airwayStatus), [1, 0, 0], true]; + }; + case (_usedItem isEqualTo "kat_guedel"): { + _patient setVariable [QGVAR(airwayStatus), [1, 0, 0], true]; + private _obstruction = _patient getVariable [QGVAR(obstruction), [0, 0, 0]]; + private _newObstruction = [0, _obstruction select 1, _obstruction select 2]; + _patient setVariable [QGVAR(obstruction), _newObstruction, true]; + }; + default {}; +}; -if (_classname isEqualTo "Larynxtubus") then { +if (_classname in ["Larynxtubus", "IGEL", "ETT"]) then { private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; _currentMonitors pushBack _classname; _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; + if (GVAR(capnographEnable)) then { + [QGVAR(capnoPFH), [_patient], _patient] call CBA_fnc_targetEvent; + }; }; - [_patient, _usedItem] call ACEFUNC(medical_treatment,addToTriageCard); [_patient, "activity", LSTRING(airway_log), [[_medic] call ACEFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomy.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomy.sqf new file mode 100644 index 000000000..386e2d4d4 --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomy.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Ends the treatment cycle for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call ka__breathing_treatmentAdvanced_chestTube + + * Public: No + */ + +params ["_medic", "_patient"]; + +[QGVAR(cricothyrotomy), [_medic, _patient], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyCheck.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyCheck.sqf new file mode 100644 index 000000000..c555a0811 --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyCheck.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Local call to check if a patient has a active crike + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: chestTube Status + * 3: Side + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorObject, 3.1, 1] call kat_breathing_treatmentAdvanced_chestTubeCheck + * + * Public: No + */ + +params ["_medic", "_patient", "_number"]; +private _cricothyrotomy = _patient getVariable [QGVAR(cricothyrotomy), 0]; +if ((_number == 5) && (_cricothyrotomy == 0)) exitWith {true}; +if ((_number == 0.9) && (_cricothyrotomy > 0) && (_cricothyrotomy < 1)) exitWith {true}; +if ((_number != 5) && (_cricothyrotomy >= 0.1) && (_cricothyrotomy <= 0.7)) exitWith {true}; + +false diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyIncision.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyIncision.sqf new file mode 100644 index 000000000..291c2f7eb --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyIncision.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Starts the surgical process for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeIncision + * + * Public: No + */ + +params ["_medic", "_patient"]; + +[QGVAR(cricothyrotomyIncision), [_medic, _patient], _patient] call CBA_fnc_targetEvent; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyIncisionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyIncisionLocal.sqf new file mode 100644 index 000000000..32a0e552a --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyIncisionLocal.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call to start the surgical process for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_cricothyrotomyIncisionLocal + * + * Public: No + */ + +params ["_medic", "_patient"]; + +private _cricothyrotomy = _patient getVariable [QGVAR(cricothyrotomy), 0]; + +_cricothyrotomy = _cricothyrotomy + 0.1; +_patient setVariable [QGVAR(cricothyrotomy), _cricothyrotomy, true]; + +[_patient, false] call ACEFUNC(dragging,setCarryable); +[_patient, false] call ACEFUNC(dragging,setDraggable); + +[_patient, "quick_view", LSTRING(incision_log), [[_medic] call ACEFUNC(common,getName), STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); + + diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyKit.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyKit.sqf new file mode 100644 index 000000000..8357cba1b --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyKit.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Ends the treatment cycle for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call ka__breathing_treatmentAdvanced_chestTube + + * Public: No + */ + +params ["_medic", "_patient"]; + +[_medic, "kat_scalpel"] call ACEFUNC(common,addToInventory); +[_medic, "kat_airwayStrap"] call ACEFUNC(common,addToInventory); +[_medic, "kat_surgAirway"] call ACEFUNC(common,addToInventory); +[_medic, "kat_stitchKit"] call ACEFUNC(common,addToInventory); \ No newline at end of file diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyLocal.sqf new file mode 100644 index 000000000..c69d353dc --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyLocal.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhadcore + * Local call to remove hemothoraxes/tension pnumos after a placed chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeLocal; + * + * Public: No + */ + +params ["_medic", "_patient"]; +private _cricothyrotomy = _patient getVariable [QGVAR(cricothyrotomy), 0]; + + +if (_cricothyrotomy == 0.5) exitWith { + _cricothyrotomy = 1; + _patient setVariable [QGVAR(cricothyrotomy), _cricothyrotomy, true]; + _patient setVariable [QGVAR(airway_item), "Surgical_Airway", true]; + _patient setVariable [QGVAR(airway), true, true]; + private _currentMonitors = _patient getVariable [QEGVAR(breathing,etco2Monitor), []]; + _currentMonitors pushBack "Surgical_Airway"; + _patient setVariable [QEGVAR(breathing,etco2Monitor), _currentMonitors, true]; + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); +}; + +private _output = LLSTRING(chest_tube_fail); +[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyProgress.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyProgress.sqf new file mode 100644 index 000000000..e47c231bc --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyProgress.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Progresses the treatment process for a Chest Tube + * Arguments: + * 0: Medic + * 1: Patient + * 2: Current Chest Tube Status + * 3: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "_entry", 1] call kat_breathing_treatmentAdvanced_chestTubeProgress; + * + * Public: No + */ + +params ["_medic", "_patient", "_entry"]; + +[QGVAR(cricothyrotomyProgress), [_medic, _patient, _entry], _patient] call CBA_fnc_targetEvent; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyProgressLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyProgressLocal.sqf new file mode 100644 index 000000000..240e42d30 --- /dev/null +++ b/addons/airway/functions/fnc_treatmentAdvanced_cricothyrotomyProgressLocal.sqf @@ -0,0 +1,103 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Progresses the treatment process for a chest Tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Current Fracture Status + * 3: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 0.1, 1] call kat_breathing_fnc_treatmentAdvanced_chestTubeProgressLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_entry"]; + +private _cricothyrotomy = _patient getVariable [QGVAR(cricothyrotomy), 0]; +private _surgeryString = ""; +private _number = _entry; + +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; +private _fentanylEffectiveness = 0; +private _ketamineEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select 2; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; + } forEach _medStack; + if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + (_localAnesthesia <= 0.8) + ) then { + [_patient, [0.7, 0.8, 0.9] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + }; +if (_number == 0.9) exitWith { + _surgeryString = LSTRING(ClosedCrike); + [_patient, "quick_view", LSTRING(ChestTube_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); + _patient setVariable [QGVAR(cricothyrotomy), 0, true]; +}; +if (_entry == 0.1) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + + private _cricothyrotomy = _patient getVariable [QGVAR(cricothyrotomy), 0]; + private _alive = alive _patient; + if ((!_alive) || (_cricothyrotomy == 0) || (_cricothyrotomy == 1)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (!(IS_UNCONSCIOUS(_patient))) exitWith { + [_patient, "Pain", 2, 10, 120, 0.8, 40] call ACEFUNC(medical_status,addMedicationAdjustment); + [_patient, true] call ACEFUNC(medical,setUnconscious); + }; + }, 5, [_patient]] call CBA_fnc_addPerFrameHandler; + + if (GVAR(hardcoreCrike)) then { + [_patient, "blockRadio", "kat_crike", true] call ACEFUNC(common,statusEffect_set); + [_patient, "blockSpeaking", "kat_crike", true] call ACEFUNC(common,statusEffect_set); + }; +}; + +if (_number == _cricothyrotomy) exitWith { + switch (_entry) do { + case (0.1):{ + _surgeryString = LSTRING(Incision); + }; + case (0.3):{ + _surgeryString = LSTRING(PLACED); + }; + }; + + [_patient, "quick_view", LSTRING(ChestTube_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); + + _cricothyrotomy = _cricothyrotomy + 0.2; + _patient setVariable [QGVAR(cricothyrotomy), _cricothyrotomy, true]; +}; + +private _output = LLSTRING(cricothyrotomy_fail); +[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf b/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf index fc2d342bf..c064762ba 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf @@ -21,11 +21,13 @@ params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(overstretch), false]) exitWith { [LLSTRING(Hyperextend_already), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; -if !(_patient getVariable [QGVAR(obstruction), false]) exitWith { +private _obstruction = ((_patient getVariable [QGVAR(obstruction), [0, 0, 0]]) findIf { _x != 0 }) != -1; +if !(_obstruction) exitWith { [LLSTRING(AirwayStatus_noObstruction), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; _patient setVariable [QGVAR(overstretch), true, true]; +_medic setVariable [QGVAR(overstretching), true, true]; [LLSTRING(Hyperextend_Ready), 1.5, _medic, 11] call ACEFUNC(common,displayTextStructured); [_patient, "activity", LSTRING(Hyperextend_Log), [[_medic] call ACEFUNC(common,getName), [_patient] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); @@ -37,10 +39,12 @@ _patient setVariable [QGVAR(overstretch), true, true]; params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(recovery), false]) exitWith {}; _patient setVariable [QGVAR(overstretch), false, true]; + _medic setVariable [QGVAR(overstretching), false, true]; [LLSTRING(Hyperextend_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }, [_medic, _patient], 3600, { params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(recovery), false]) exitWith {}; _patient setVariable [QGVAR(overstretch), false, true]; + _medic setVariable [QGVAR(overstretching), false, true]; [LLSTRING(Hyperextend_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/airway/initSettings.inc.sqf b/addons/airway/initSettings.inc.sqf index ddda6a33c..edea25870 100644 --- a/addons/airway/initSettings.inc.sqf +++ b/addons/airway/initSettings.inc.sqf @@ -9,6 +9,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(CatastrophicAirwaysEnable), + "CHECKBOX", + [LLSTRING(SETTING_ENABLE_Catastrophic),LLSTRING(SETTING_ENABLE_Catastrophic_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [false], + true +] call CBA_fnc_addSetting; + // Settable action time for CheckAirway [ QGVAR(CheckAirway_time), @@ -21,44 +30,153 @@ // airway Injuries probability obstruction [ - QGVAR(probability_obstruction), + QGVAR(airwayObstructionChance), "SLIDER", [LLSTRING(SETTING_obstruction),LLSTRING(SETTING_obstruction_DESC)], - [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], [0, 100, 15, 0], true ] call CBA_fnc_addSetting; +[ + QGVAR(airwayObstructionDamageThreshold), + "SLIDER", + [LLSTRING(SETTING_obstructionDamageThreshold),LLSTRING(SETTING_obstructionDamageThreshold_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 1, 0.2, 2], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(airwayObstructionDamageThreshold_TakenDamage), + "CHECKBOX", + [LLSTRING(SETTING_ObstructionDamageThreshold_DamageTaken), LLSTRING(SETTING_ObstructionDamageThreshold_DamageTaken_DESCRIPTION)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [true], + true +] call CBA_fnc_addSetting; + // airway Injuries probability occluded [ - QGVAR(probability_occluded), + QGVAR(airwayOcclusionChance), "SLIDER", [LLSTRING(SETTING_occluded),LLSTRING(SETTING_occluded_DESC)], - [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], - [0, 100, 10, 0], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 100, 15, 0], true ] call CBA_fnc_addSetting; -// Occlusion repeat timer [ - QGVAR(occlusion_repeatTimer), + QGVAR(airwayOcclusionDamageThreshold), "SLIDER", - LLSTRING(SETTING_occlusion_repeatTimer), - [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], - [1, 1200, 60, 0], + [LLSTRING(SETTING_occlusionDamageThreshold),LLSTRING(SETTING_occlusionDamageThreshold_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 1, 0.1, 2], true ] call CBA_fnc_addSetting; -// Set period during which patient cannot get another occlusion after last occlusion was cleared, disabled if 0 [ - QGVAR(occlusion_cooldownPeriod), + QGVAR(airwayOcclusionDamageThreshold_TakenDamage), + "CHECKBOX", + [LLSTRING(SETTING_OcclusionDamageThreshold_DamageTaken), LLSTRING(SETTING_OcclusionDamageThreshold_DamageTaken_DESCRIPTION)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(airwayPukeChance), + "SLIDER", + [LLSTRING(SETTING_pukeChance),LLSTRING(SETTING_pukeChance_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 100, 15, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(minPukeTime), + "SLIDER", + [LLSTRING(SETTING_minPukeTime),LLSTRING(SETTING_minPukeTime_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [10, 1200, 30, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(cooldownTime), "SLIDER", - LLSTRING(SETTING_occlusion_cooldownPeriod), + [LLSTRING(SETTING_occlusion_cooldownPeriod), LLSTRING(SETTING_occlusion_cooldownPeriod_DESC)], [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [0, 60, 6, 1], true +]; + +[ + QGVAR(catastrophicAirwayChance), + "SLIDER", + [LLSTRING(SETTING_catastrophicAirwayChance),LLSTRING(SETTING_catastrophicAirwayChance_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 100, 2, 0], + true ] call CBA_fnc_addSetting; +[ + QGVAR(catastrophicAirwayDamageThreshold), + "SLIDER", + [LLSTRING(SETTING_catastrophicAirwayDamageThreshold),LLSTRING(SETTING_catastrophicAirwayDamageThreshold_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 3, 0.3, 2], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(catastrophicAirwayDamageThreshold_TakenDamage), + "CHECKBOX", + [LLSTRING(SETTING_catastrophicAirwayDamageThreshold_DamageTaken), LLSTRING(SETTING_catastrophicAirwayDamageThreshold_DamageTaken_DESCRIPTION)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(deterioratingAirways_chance), + "SLIDER", + [LLSTRING(SETTING_deterioratingAirways_chance), LLSTRING(SETTING_deterioratingAirways_chance_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [0, 100, 25, 0], + true +] call CBA_fnc_addSetting; + +//Deteriorating Airways countdown +[ + QGVAR(deterioratingAirways_interval), + "SLIDER", + [LLSTRING(SETTING_deterioratingAirways_interval), LLSTRING(SETTING_deterioratingAirways_interval_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [1, 1200, 30, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(airwayCollapse_Timer), + "SLIDER", + [LLSTRING(SETTING_airwayCollapse),LLSTRING(SETTING_airwayCollapse_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [1, 1200, 180, 0], + true +] call CBA_fnc_addSetting; + +// Occlusion repeat timer +[ + QGVAR(occlusion_repeatTimer), + "SLIDER", + [LLSTRING(SETTING_occlusion_repeatTimer), LLSTRING(SETTING_occlusion_repeatTimer_desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AirwayInjury)], + [1, 1200, 60, 0], + true +] call CBA_fnc_addSetting; + + // Succes for headturning [ QGVAR(probability_headturning), @@ -110,6 +228,17 @@ ] call CBA_fnc_addSetting; //Settable list for using Larynxtubus per medical class + +[ + QGVAR(capnographEnable), + "CHECKBOX", + [LLSTRING(SETTING_ENABLE_capnograph),LLSTRING(SETTING_ENABLE_capnograph_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [true], + true +] call CBA_fnc_addSetting; + + [ QGVAR(medLvl_Larynxtubus), "LIST", @@ -129,6 +258,33 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(medLvl_NPA), + "LIST", + [LLSTRING(ALLOW_NPA),LLSTRING(ALLOW_NPA_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(medLvl_IGEL), + "LIST", + [LLSTRING(ALLOW_IGEL),LLSTRING(ALLOW_IGEL_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(medLvl_ETT), + "LIST", + [LLSTRING(ALLOW_ETT),LLSTRING(ALLOW_ETT_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + //Settable list for using Accuvac per medical class [ QGVAR(medLvl_Accuvac), @@ -169,6 +325,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(SuctionEffectiveness), + "SLIDER", + [LLSTRING(SuctionEffectiveness),LLSTRING(SuctionEffectiveness_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)], + [1, 4, 1, 0], + true +] call CBA_fnc_addSetting; + // Reuse Item checkbox for Manual Suction Pump [ QGVAR(Suction_reuse), @@ -190,6 +355,24 @@ ] call CBA_fnc_addSetting; // Settable action time for Guedeltubus +[ + QGVAR(IGEL_time), + "SLIDER", + [LLSTRING(TIME_IGEL),LLSTRING(TIME_IGEL_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 20, 6, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(NPA_time), + "SLIDER", + [LLSTRING(TIME_NPA),LLSTRING(TIME_NPA_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 20, 6, 0], + true +] call CBA_fnc_addSetting; + [ QGVAR(Guedeltubus_time), "SLIDER", @@ -199,6 +382,25 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(ETT_time), + "SLIDER", + [LLSTRING(TIME_ETT),LLSTRING(TIME_ETT_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 15, 6, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(Visualization_time), + "SLIDER", + [LLSTRING(TIME_Visualization),LLSTRING(TIME_Visualization_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 20, 6, 0], + true +] call CBA_fnc_addSetting; + + // Enable reuasble Larynxtubus & Guedeltubus [ QGVAR(ReusableAirwayItems), @@ -256,4 +458,106 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [true], true -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting; + +[ + QGVAR(probability_suction), + "SLIDER", + [LLSTRING(SUCCES_SUCTION),LLSTRING(SUCCES_SUCTION_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)], + [1, 100, 50, 0], + true +] call CBA_fnc_addSetting; + +// Settable action time for Head turning +[ + QGVAR(Suction_Interval), + "SLIDER", + [LLSTRING(SETTING_SUCTION_Interval), LLSTRING(SETTING_SUCTION_Interval_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Suction)], + [7, 30, 7, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(probability_visualization), + "SLIDER", + [LLSTRING(SUCCES_visualization),LLSTRING(SUCCES_visualization_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 100, 1, 0], + true +] call CBA_fnc_addSetting; + +// Settable action time for Head turning +[ + QGVAR(visualization_Interval), + "SLIDER", + [LLSTRING(SETTING_visualization_Interval), LLSTRING(SETTING_visualization_Interval_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 30, 7, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(CrikeAction_MedLevel), + "LIST", + LLSTRING(Crike_ACTION_MEDLEVEL), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 2], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(CrikeLocation), + "LIST", + LLSTRING(Crike_LOCATION), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [[0,1,2,3],["STR_ACE_Common_Anywhere", "STR_ACE_Common_Vehicle", "STR_ACE_Medical_Treatment_MedicalFacilities", "STR_ACE_Medical_Treatment_VehiclesAndFacilities"],3], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(hardcoreCrike), + "CHECKBOX", + [LLSTRING(hardcoreCrike),LLSTRING(hardcoreCrike_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(cricothyrotomyGuideTime), + "SLIDER", + [LLSTRING(INTERMEDIATE_TIMER)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [0,100,8,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(incisionTime), + "SLIDER", + LLSTRING(INCISION_TIMER), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [0,100,10,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(cricothyrotomyPlaceTime), + "SLIDER", + LLSTRING(OPEN_TIMER), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [0,100,15,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(cricothyrotomySecureTime), + "SLIDER", + [LLSTRING(SECURE_TIMER)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Crike)], + [0,100,8,0], + true +] call CBA_fnc_addSetting; + diff --git a/addons/airway/stringtable.xml b/addons/airway/stringtable.xml index dcfdc679b..b96982903 100644 --- a/addons/airway/stringtable.xml +++ b/addons/airway/stringtable.xml @@ -160,8 +160,8 @@ Ilmateiden imu Luchtweg suctie - - ACCUVAC is a medical suction device for airway suction with battery drive for mobile use in emergency medicine. + + ACCUVAC is a medical suction device for Airway suction with battery drive for mobile use in emergency medicine. ACCUVAC je lékařské odsávací zařízení pro odsávání dýchacích cest s pohonem na baterky pro mobilní použití v pohotovostní medicíně. L’ACCUVAC est un dispositif médical mobile d’aspiration pour libérer les voies aériennes supérieures des patients en cas d'encombrement ou d'obstruction ACCUVAC es un equipo de succión médica para vías aéreas alimentado por una batería, permitiendo movilidad ante una emergencia médica. @@ -264,7 +264,7 @@ Luchtweg is vrij - Item could not be used, airways are not clear + Item could not be used, Airways are not clear Předmět nemohl být použit, dýchací cesty nejsou volné L'objet n'a pas pu être utilisé, les voies respiratoires ne sont pas dégagées No se pudo usar, las vías aéreas no están despejadas @@ -283,39 +283,10 @@ Item kon niet gebruikt worden, luchtwegen zijn niet vrij - Airway is obstructed, airway management needed - Dýchací cesty zablokovány, péče nutná - Voies aériennes obstruées, geste médical nécessaire - Las vías respiratorias están obstruidas, es necesario gestionarlas - Le vie aeree sono ostruite, è necessario un intervento sulle vie aeree - Vias aéreas obstruídas, gerenciamento de vias aéreas necessário - Дыхательные пути закупорены языком, требуется лечение дыхательных путей - Atemwege sind blockiert, die Atemwege müssen freigelegt werden - 気道は閉塞しています、 気道管理が必要です - 呼吸道阻塞,需要管控呼吸道 - 气道阻塞,需要气道管理 - Luftvei er blokkert, behov for luftveishåndtering - Hengitystiet ovat tukossa, hengityshoitoa tarvitaan - Luchtweg is geblokkeerd, luchtwegmanagement is vereist + You fond a Collapsed Airway - Obstruction - Obstrukce - Obstruées - Obstruída - Ostruita - Niedrożne - Obstruída - Обструкция - Obstruktion - 혀로 인한 기도 폐쇄 - 閉塞あり - 阻塞 - 闭塞 - Kapanma - Obstruksjon - Tukkeuma - Geblokkeerd + Collapsed Airway Airway is occluded, medical suction needed @@ -485,8 +456,8 @@ Luokittelee hengitystiet automaattisesti Auto triage van de luchtwegen - - Sets if checking airways can override current triage level + + Sets if checking Airways can override current triage level Nastavuje, zda kontrola dýchacích cest může přepsat momentální úroveň triáže Définit si l'inspection des voies aériennes modifie le niveau actuel de triage Establece si la comprobación de las vías respiratorias puede anular el nivel de triaje actual. @@ -624,8 +595,8 @@ Irrota kurkunpään putki Verwijder King LT - - The Guedel Tube is used to maintain the airway + + The Guedel Tube is used to maintain the Airway Guedel tuba je používána k zajištění dýchacích cest La canule de Guedel est utilisée pour protéger les voies aériennes La cánula de Guedel impide obstrucciones @@ -822,8 +793,8 @@ Hyperpidennetty pää Hoofd is overstrekt - - The King LT is used to maintain the airway + + The King LT is used to maintain the Airway King LT je používán k zajištění dýchacích cest Le tube laryngé est utilisé pour protéger les voies aériennes El tubo laríngeo previene obstrucciones y oclusiones @@ -1200,7 +1171,7 @@ Hoe lang het gaat duren om iemand in de stabiele zijligging te leggen - Community called keko had addon for AFK players. They were put unconscious so others could drag them away. That triggered chances for airway problems. This string prevents that from happening when they get unconscious by that AFK addon. + Community called keko had addon for AFK players. They were put unconscious so others could drag them away. That triggered chances for Airway problems. This string prevents that from happening when they get unconscious by that AFK addon. Komunita zvaná keko měla addon pro AFK hráče. Ti byli dáni do bezvědomí, takže je ostatní mohli odtáhnout pryč. To ale vyvolalo problémy, které mohly ohrozit jejich dýchací cesty. Tento string zabrání dýchacím potížím, pokud je hráč tímto AFK addonem dán do bezvědomí. Le membre de la communauté appelé Keko avait un addon pour les joueurs AFK. Ils étaient passés inconscients et pouvaient être trainés. Ce qui déclenchait les chances de problèmes respiratoires. Cette option empêche cela de se produire quand ils deviennent inconscients par cet addon AFK. La comunidad llamada Keko tenía un addon para los jugadores AFK. Se les ponía inconscientes para que otros pudieran arrastrarlos. Eso disparó las posibilidades de problemas en las vías respiratorias. Esta cadena evita que eso suceda cuando quedan inconscientes por ese addon de AFK. @@ -1219,7 +1190,7 @@ De community met de naam keko had een addon voor AFK spelers. Ze werden in een bewusteloze staat gebracht zodat anderen ze konder wegslepen. Dit veroorzaakte kansen voor luchtwegproblemen. Deze streng voorkomt dit wanneer ze door de addon bewusteloos worden gemaakt. - Probability for an obstructed airway + Probability for an obstructed Airway Pravděpodobnost obstrukce dýchacích cest Probabilité d'obstruction des voies aériennes Probabilidad de obstrucción de las vías aéreas @@ -1238,7 +1209,7 @@ Kans op geblokkeerde luchtweg - Probability for an obstructed airway in percentage that gets rolled every: \n- Falling unconscious \n- Removing KingLT / Guedel Tube + Probability for an obstructed Airway in percentage that gets rolled every: \n- Falling unconscious \n- Removing KingLT / Guedel Tube Pravděpodobnost obstrukce dýchacích cest v procentech, která se vylosuje při každém: \n- Upadnutí do bezvědomí \n- Odstranění KingLT / GuedelTuby La probabilité d'obstruction des voies aériennes en pourcentage qui est tirée aléatoirement lorsque : \n- la personne tombe inconsciente \n- Une canule de Guedel/tube laryngé est retiré Probabilidad en porcentaje de que una vía aérea sea obstruida cada vez que: \n- Cae inconsciente \n- Se retira el tubo laríngeo / Cánula de Guedel @@ -1255,7 +1226,7 @@ Kans op geblokkeerde luchtweg in een percentage die gerold wordt elke: \n- Bewusteloos raken \n- KingLT / Guedel verwijderen - Probability for airway occluding + Probability for Airway occluding Pravděpodobnost ucpání dýchacích cest Probabilité d'occlusion des voies aériennes Probabilidad de oclusión en las vías aéreas @@ -1307,23 +1278,18 @@ Okkluusiojäähdytyssykli Verstoppings afkoelingsperiode + + Period in seconds during which patient cannot get another occlusion after last occlusion was cleared. Set to 0 to disable this feature. + Zeitraum in Sekunden, in dem ein Patient keine weitere Okklusion bekommen kann, nachdem die letzte Okklusion beseitigt wurde. Auf 0 setzen, um diese Funktion zu deaktivieren. + Période en secondes pendant laquelle le patient ne peut pas obtenir une autre occlusion après que la dernière occlusion a été effacée. Réglez sur 0 pour désactiver cette fonction. + 患者の気道異物が解消された後、再度気道異物が発生しない期間(秒)。 0に設定で無効化。 + Período en segundos durante el cual el paciente no puede recibir otra oclusión después de que la última haya sido eliminada. Establecer a 0 para desactivar esta función. + - Occlusion repeat timer - Časovač opakovaného ucpání dýchacích cest - Temps de répétition des occlusions - Tiempo de repetición de las oclusiones - Tempo di ripetizione per l'occlusione - Czas powtarzania zablokowania - Temporizador de repetição de oclusão - Таймер повторения окклюзии - Zeitfenster zum Wiedereintritt einer Okklusion - 구토 반복 타이머 - 異物再発までの時間 - 異物復發的時間 - 气道异物再发冷却时间 - Repetisjonsintervall for Okklusjon - Okkluusiotoistoajastin - Verstoppings herhaling timer + Puke repeat timer + + + time it takes for the puke system to loop once Activate the puking sound? @@ -1446,8 +1412,8 @@ Ilmateiden imu (manuaalinen) Handmatige luchtweg suctie - - Manual Suction Pump is a medical suction device for airway suction manually. This is an alternative to electrical devices. + + Manual Suction Pump is a medical suction device for Airway suction manually. This is an alternative to electrical devices. Manuální odsávací pumpa je zdravotnická pomůcka pro manuální odsávání dýchacích cest. Je alternativou k elektronickým zařízením. La pompe d’aspiration manuelle est un dispositif d’aspiration médical pour l’aspiration manuelle des voies respiratoires. C’est une alternative aux appareils électriques. La bomba de succión manual es un dispositivo de succión médico para la succión manual de las vías respiratorias. Es alternativa a los dispositivos eléctricos. @@ -1776,7 +1742,7 @@ Poistaminen Verwijderen - + %1 inserted a %2 %1 intuboval %2 %1 a intubé avec un(e) %2 @@ -1822,7 +1788,7 @@ Check luchtwegen - %1 checked airways: %2, %3 + %1 checked Airways: %2 %1 zkontroloval dýchací cesty: %2, %3 %1 a vérifié les voies aériennes : %2, %3 %1 comprobó las vías aéreas: %2, %3 @@ -1841,7 +1807,7 @@ %1 Heeft de luchtwegen gecheckt: %2, %3 - %1 checked airways: Heavily Blistered + %1 checked Airways: Heavily Blistered %1 zkontroloval dýchací cesty: Silné puchýře %1 voies aériennes contrôlées : Fortement cloquées %1 ha controllato le vie aeree: Piene di Vescicole @@ -1884,7 +1850,7 @@ Hoofddraaiing gestopt - Head turn performed, airways are still not clear + Head turn performed, Airways are still not clear Hlavou se otočilo, dýchací cesty stále nejsou volné Tour de tête effectué, les voies respiratoires ne sont toujours pas dégagées Giro realizado, vías aéreas aún sin despejadar @@ -1954,5 +1920,486 @@ Likaantuminen poistettu Verstopping verwijderd + + Obstruction Damage Threshold + + + Damage Threshold to cause a injury-based Obstruction + + + Occlusion Damage Threshold + + + Damage Threshold to cause a injury-based Occlusion + + + Vomit Chance + + + Chance to Vomit + + + Catastrophic Chance + + + Chance to have a Catastrophic Airway Injury + + + Catastrophic Airway Damage Threshold + + + Damage Threshold to cause a injury-based Catastrophic Airway + + + Deteriorating Airways Chance + + + Chance to have an Airway deteriorate due to bleeding/leakage + + + Deteriorating Airways Interval + + + Interval between having an Airway deteriorate due to bleeding/leakage + + + Airway Collapse Time + + + Time it takes to have an Airway collapse + + + You found no Airway injuries + + + Airways are Clear + + + You found a Catastropic Oral Injury + + + Catastropic Oral Injury + + + You found a Catastropic Injury + + + Catastropic Injury + + + You found a Tongue Obstructed Airway with Blood And Vomit + + + Tongue Obstructed w/ Blood/Vomit + + + You found a Tongue Obstructed Airway with Blood + + + Tongue Obstructed w/ Blood + + + You found a Tongue Obstructed Airway + + + Tongue Obstructed + + + You found a Oral Airway blocked by Blood and Vomit + + + Oral Airway blocked by Blood/Vomit + + + You found a Oral Airway blocked by Blood + + + Oral Airway blocked by Blood + + + You found a Airway blocked by Blood and Vomit + + + Airway blocked by Blood/Vomit + + + You found a Airway blocked by Blood + + + Airway blocked by Blood + + + Increase Catastrophic Airway chance based on damage + + + Increase chance of a Catastrophic Airway occurring based on damage taken if over the Catastrophic Airway damage threshold + + + Increase Occlusion chance based on damage + + + Increase chance of a Occlusion occurring based on damage taken if over the Occlusion damage threshold + + + Increase Obstruction chance based on damage + + + Increase chance of a Obstruction occurring based on damage taken if over the Obstruction damage threshold + + + %1 removed I-GEL + + + The I-GEL is used to maintain and secure the Airway + + + I-GEL + + + %1 removed Nasopharyngeal Airway + + + A Nasopharyngeal Airway is used to maintain and secure the Airway when a Oral airway isnt suitable + + + Nasopharyngeal Airway + + + Allow Nasopharyngeal Airway + + + Training level required to use a Nasopharyngeal Airway + + + Time for Nasopharyngeal Airway + + + How long it will take to use Nasopharyngeal Airway + + + Remove NPA + + + Allow I-GEL + + + Training level required to use a I-GEL + + + Time for I-GEL + + + How long it will take to use I-GEL + + + Remove I-GEL + + + Begin Suction + + + Suction cancelled + + + Suction performed, Airways are still not clear + + + Suction Started + + + Stop Suction + + + Occlusion removed + + + %1 finished Suction (x%2) + + + Success probability for Suction + + + Higher, the better the probability of success + Čím vyšší, tím lepší šance + Plus élevé, les chances de réussite seront meilleures + Cuanto mayor sea, mayor será la probabilidad de éxito + Più alto è, migliori sono le probabilità di successo + Im wyższa, tym większe prawdopodobieństwo sukcesu + Quanto maior, melhor a probabilidade de sucesso + Чем выше, тем выше вероятность успеха + Größer = höhere Chance auf Erfolg + 값이 높을수록 성공 확률이 높음 + 高いほど、成功の可能性が高くなります + 越高,成功的機率越大 + 越高,成功的可能性越大 + Başarı olasılığı ne kadar yüksekse, o kadar iyi + Jo høyere, desto bedre er sannsynligheten for suksess + Mitä korkeampi, sitä suurempi on onnistumisen todennäköisyys + Groter betekent een hogere kans op succes + + + Suction Interval + + + Time between Suction attempts + + + Catastrophic Airways + + + Enables Catastrophic Airways, needing surgery to correct + + + %1 removed Endotracheal Airway + + + Remove Endotracheal Airway + + + A Endotracheal Airway is used to maintain and secure the Airway + + + Endotracheal Airway + + + Allow Endotracheal Airway + + + Training level required to use a Endotracheal Airway + + + Time for Endotracheal Airway + + + How long it will take to use Endotracheal Airway + + + A Laryngoscope is used during RSI to secure the airway + + + Laryngoscope + + + Time To visulize the Vocal Cords + + + How long it will take to visulize the Vocal Cords + + + Begin Visualization + + + Visualization cancelled + + + Visualization performed, Unable to locate Vocal Cords + + + Visualization Started + + + Visualization failure + + + Stop Visualization + + + Visualized Airway + + + Visualize Airway + + + %1 finished Visualization (x%2) + + + (Double Click) Place ETT + + + Success probability for Visualization + + + Additional chance for visulization to succeed + + + Visualization Interval + + + Time between Visualization attempts + + + %1 %2 + + + %1 Prepared the Neck + + + Surgical Airway Action Failed + + + Perform Incision + + + Performing Incision + + + Prep Area + + + Preparing Area + + + Place Surgical Airway + + + Placing Surgical Airway + + + Secure Surgical Airway + + + Securing Surgical Airway + + + Made an Incision + + + Placed A Surgical Airway + + + Locations to perform a cricothyrotomy + + + Allow Cricothyrotomy + + + Time to Prep for a Cricothyrotomy + + + Cricothyrotomy Placement Time + + + Cricothyrotomy Action Time + + + Cricothyrotomy Secure Time + + + Perform Incision Time + + + Hardcore Crike Effects + + + If enabled, disables speaking and radio usage if a crike is performed + + + Cricothyrotomy Failed + + + A Cricothyrotomy Kit cotains all implements to preform one Cricothyrotomy + + + Cricothyrotomy Kit + + + Surgical Airway + + + Surgical Airway + + + Surgical Airway + + + Used to secure a Surgical Airway + + + Surgical Airway Strap + + + Open Cricothyrotomy Kit + + + Opening Cricothyrotomy Kit + + + Catastrophic Airway Damage + + + Bloody Mouth w/ Vomit + + + Bloody Mouth + + + Traumatic Obstruction + + + Vomited + + + Cricothyrotomy Settings + + + Airway Injury Settings + + + Yellow + + + Green + + + Orange + + + Red + + + White + + + Capnograph: %1 + + + Enable Capnography + + + Enables Capnography, allowing for an approximate reading of ETCo2 with a placed SGA/ETT + + + Minimal Puke Timer + + + Minimal time in seconds for a unit to puke after all modifiers are applied + + + Minimal Occlusion Timer + + + Minimal time in seconds for a unit to Occlude after all modifiers are applied + + + Suction Effectiveness + + + Multiplier to how effective suction is at clearing the airway + + + Close Neck Incision + + + Closing Incision + + + Closed Neck Incision + + + Patient is Breathing + + + Patient is Breathing + diff --git a/addons/airway/ui/AirwayStrap.paa b/addons/airway/ui/AirwayStrap.paa new file mode 100644 index 000000000..95f563805 Binary files /dev/null and b/addons/airway/ui/AirwayStrap.paa differ diff --git a/addons/airway/ui/CrikeKit.paa b/addons/airway/ui/CrikeKit.paa new file mode 100644 index 000000000..d16b6e847 Binary files /dev/null and b/addons/airway/ui/CrikeKit.paa differ diff --git a/addons/airway/ui/ETT.paa b/addons/airway/ui/ETT.paa new file mode 100644 index 000000000..ad5d31eef Binary files /dev/null and b/addons/airway/ui/ETT.paa differ diff --git a/addons/airway/ui/Laryngoscope.paa b/addons/airway/ui/Laryngoscope.paa new file mode 100644 index 000000000..f10c7d115 Binary files /dev/null and b/addons/airway/ui/Laryngoscope.paa differ diff --git a/addons/airway/ui/SurgAirway.paa b/addons/airway/ui/SurgAirway.paa new file mode 100644 index 000000000..829c882fc Binary files /dev/null and b/addons/airway/ui/SurgAirway.paa differ diff --git a/addons/airway/ui/igel.paa b/addons/airway/ui/igel.paa new file mode 100644 index 000000000..1c92b05bd Binary files /dev/null and b/addons/airway/ui/igel.paa differ diff --git a/addons/airway/ui/npa.paa b/addons/airway/ui/npa.paa new file mode 100644 index 000000000..dc5e7b482 Binary files /dev/null and b/addons/airway/ui/npa.paa differ diff --git a/addons/brain/$PBOPREFIX$ b/addons/brain/$PBOPREFIX$ new file mode 100644 index 000000000..9793c72cf --- /dev/null +++ b/addons/brain/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\brain \ No newline at end of file diff --git a/addons/brain/ACE_Medical_Treatment_Actions.hpp b/addons/brain/ACE_Medical_Treatment_Actions.hpp new file mode 100644 index 000000000..8d872b0c9 --- /dev/null +++ b/addons/brain/ACE_Medical_Treatment_Actions.hpp @@ -0,0 +1,17 @@ +class ACE_Medical_Treatment_Actions { + class BasicBandage; + class HeadUltrasound: BasicBandage { + displayName = CSTRING(UltraICP_Use); + displayNameProgress = CSTRING(UltraICP_Action); + category = "examine"; + treatmentLocations = QEGVAR(surgery,ultrasoundLocation); + allowedSelections[] = {"Head"}; + allowSelfTreatment = 0; + medicRequired = QEGVAR(surgery,ultrasoundAction_MedLevel); + treatmentTime = QEGVAR(surgery,ultrasoundTime); + items[] = {"kat_ultrasound"}; + consumeItem = 0; + condition = QGVAR(enable); + callbackSuccess = QFUNC(icpAssessment); + }; +}; diff --git a/addons/chemical/CfgEventHandlers.hpp b/addons/brain/CfgEventHandlers.hpp similarity index 99% rename from addons/chemical/CfgEventHandlers.hpp rename to addons/brain/CfgEventHandlers.hpp index e5090d55b..4551ce282 100644 --- a/addons/chemical/CfgEventHandlers.hpp +++ b/addons/brain/CfgEventHandlers.hpp @@ -18,4 +18,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - diff --git a/addons/brain/XEH_PREP.hpp b/addons/brain/XEH_PREP.hpp new file mode 100644 index 000000000..ebda8c1fb --- /dev/null +++ b/addons/brain/XEH_PREP.hpp @@ -0,0 +1,11 @@ +PREP(concussionPFH); +PREP(concussionWH); +PREP(findSaline); +PREP(fullHealLocal); +PREP(handleAutoregulation); +PREP(handleBrainActivity); +PREP(handleEarRinging); +PREP(handleRespawn); +PREP(icpAssessment); +PREP(icpAssessmentLocal); +PREP(init); \ No newline at end of file diff --git a/addons/brain/XEH_postInit.sqf b/addons/brain/XEH_postInit.sqf new file mode 100644 index 000000000..0619eb72a --- /dev/null +++ b/addons/brain/XEH_postInit.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +[QGVAR(handleAutoregulation), LINKFUNC(handleAutoregulation)] call CBA_fnc_addEventHandler; +[QGVAR(handleBrainActivity), LINKFUNC(handleBrainActivity)] call CBA_fnc_addEventHandler; + +[QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; +[QGVAR(icpAssessment), LINKFUNC(icpAssessmentLocal)] call CBA_fnc_addEventHandler; + +GVAR(concussionRinging) = 0; +GVAR(concussionRingingPrior) = 0; +["CBA_settingsInitialized", { + [LINKFUNC(handleEarRinging), 1, false] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; + +["multiplier", { + if (ACE_player getVariable [QGVAR(concussion), 0] > 0) then { + 1 max (1 + ((ACE_player getVariable [QGVAR(concussion), 0]) * 2)) + } else {1}; +}, QUOTE(ADDON)] call ACEFUNC(common,addSwayFactor); \ No newline at end of file diff --git a/addons/chemical/XEH_preInit.sqf b/addons/brain/XEH_preInit.sqf similarity index 100% rename from addons/chemical/XEH_preInit.sqf rename to addons/brain/XEH_preInit.sqf diff --git a/addons/brain/config.cpp b/addons/brain/config.cpp new file mode 100644 index 000000000..3e0597aa8 --- /dev/null +++ b/addons/brain/config.cpp @@ -0,0 +1,37 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; + units[] = {}; + weapons[] = {}; + magazines[] = { }; + requiredAddons[] = { + "ace_medical", + "ace_medical_ai", + "ace_medical_blood", + "ace_medical_damage", + "ace_medical_engine", + "ace_medical_feedback", + "ace_medical_gui", + "ace_medical_statemachine", + "ace_medical_status", + "ace_medical_treatment", + "ace_medical_vitals", + "ace_dogtags", + "kat_main", + "kat_airway", + "kat_circulation", + "cba_settings" + }; + author = "apo_tle"; + authors[] = {"apo_tle"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ACE_Medical_Treatment_Actions.hpp" +//#include "CfgWeapons.hpp" \ No newline at end of file diff --git a/addons/brain/functions/fnc_concussionPFH.sqf b/addons/brain/functions/fnc_concussionPFH.sqf new file mode 100644 index 000000000..4b89b45f0 --- /dev/null +++ b/addons/brain/functions/fnc_concussionPFH.sqf @@ -0,0 +1,73 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Called when a unit is hit. Handles receiving TBIs and setting up dedicated PFHs to increase ICP. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Damage + * 1: Bodypart + * 2: Shooter + * 3: Ammo classname or damage type + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Head"], objNull, "BulletBase"] call kat_brain_fnc_concussion + * + * Public: No + */ +params ["_unit"]; + +private _pfh = [{ + params ["_args","_pfhID"]; + _args params ["_unit"]; + if (!alive _unit) exitWith { + [_pfhID] call CBA_fnc_removePerFrameHandler; + _unit setVariable [QGVAR(concussionPFH), nil]; + }; + private _startEdema = _unit getVariable [QGVAR(edema),0]; + private _oldEdema = _unit getVariable [QGVAR(oldEdema),0]; + private _bleeding = _unit getVariable [QGVAR(bleeding),0]; + private _ICP = _unit getVariable [QGVAR(ICP),15]; + private _necrosis = _unit getVariable [QGVAR(necrosis),0]; + private _reversibleDamage = _unit getVariable [QGVAR(reversibleDamage),0]; + private _concussion = _unit getVariable [QGVAR(concussion),0]; + private _edema = 0; + _unit setVariable [QGVAR(oldEdema), _startEdema, true]; + if (_startEdema < 0.7) then { + _edema = (_startEdema + 0.01) min _concussion; // slow swelling + }; + private _targetICP = 15 + (_edema * 10) + (_bleeding * 20); + _ICP = _ICP + ((_targetICP - _ICP) * 0.025); + if (_ICP > 35) then { + _necrosis = _necrosis + ((_ICP - 25) * 0.002) min 1; + }; + if (_ICP > 20) then { + _concussion = (_concussion + 0.01) min 1; + _reversibleDamage = _reversibleDamage + ((_ICP - 20) * 0.02) min 1; + }; + if (_edema > 0 && {_ICP < 20}) then { + _edema = (_edema - 0.005) max 0; + }; + if (_edema > _oldEdema) then { + _unit setVariable [QGVAR(isSwelling), true, true]; + } else { + _unit setVariable [QGVAR(isSwelling), false, true]; + }; + _concussion = (_concussion - 0.002) max 0; + _unit setVariable [QGVAR(edema), _edema, true]; + _unit setVariable [QGVAR(ICP), _ICP, true]; + _unit setVariable [QGVAR(necrosis), _necrosis, true]; + _unit setVariable [QGVAR(concussion), _concussion, true]; + private _earRinging = linearConversion [0, 1, _concussion, 0, 20, true]; + GVAR(concussionRinging) = _earRinging; + _unit setVariable [QGVAR(reversibleDamage),_reversibleDamage,true]; + if ((_edema == 0) && (_concussion == 0) && (_ICP <= 20) && (_reversibleDamage == 0)) then { + _unit setVariable [QGVAR(concussionPFH), nil]; + [_pfhID] call CBA_fnc_removePerFrameHandler; + }; + }, 5, [_unit]] call CBA_fnc_addPerFrameHandler; + _unit setVariable [QGVAR(concussionPFH), _pfh]; diff --git a/addons/brain/functions/fnc_concussionWH.sqf b/addons/brain/functions/fnc_concussionWH.sqf new file mode 100644 index 000000000..cba5f100d --- /dev/null +++ b/addons/brain/functions/fnc_concussionWH.sqf @@ -0,0 +1,72 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Called when a unit is hit. Handles receiving TBIs and setting up dedicated PFHs to increase ICP. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Damage + * 1: Bodypart + * 2: Shooter + * 3: Ammo classname or damage type + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Head"], objNull, "BulletBase"] call kat_brain_fnc_concussion + * + * Public: No + */ +params ["_unit", "_allDamages", "_typeOfDamage"]; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {_this}; +(_allDamages select 0) params ["_damage", "_bodyPart"]; // selection-specific +if !(GVAR(enable) && _bodyPart == "head") exitWith {_this}; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {_this}; +if (_damage <= 0) exitWith {_this}; +// Increase the chance based on how much damage was received +private _chanceIncrease = linearConversion [0,1,_damage,5,30,true]; +// Increase the chance of concussions depending on the damage type +private _chanceMultiplier = 1; +if (_typeOfDamage in ["vehiclehit","explosive","shell","vehiclecrash"]) then { + _chanceMultiplier = linearConversion [0,3,(["vehiclehit","explosive","shell","vehiclecrash"] find _typeOfDamage),1.2,2,true]; +}; + +private _concussionChance = (GVAR(concussionChance) + _chanceIncrease) * _chanceMultiplier; +if (floor (random 100) <= _concussionChance) then { + private _concussion = _unit getVariable [QGVAR(concussion), 0]; + private _edema = _unit getVariable [QGVAR(edema), 0]; + private _bleeding = _unit getVariable [QGVAR(bleeding), 0]; + private _necrosis = _unit getVariable [QGVAR(necrosis), 0]; + + private _base = random [0.05, 0.1, 0.2]; + private _impactFactor = linearConversion [0, 6, _damage, 0.1, 0.8, true]; + private _newConcussion = (_base + _impactFactor) min 1; + + private _newEdema = _edema + linearConversion [0,6,_damage,0,0.25,true]; + + if (_damage > 0.6 || {_typeOfDamage in ["vehiclehit","explosive","shell","vehiclecrash"]}) then { + private _newBleed = random [0,0.1,0.25]; + _bleeding = (_bleeding + _newBleed) min 1; + }; + + if (_damage > 3) then { + _necrosis = (_necrosis + random [1,3,5]) min 5; + }; + + if (_damage > 5) then { + _necrosis = (_necrosis + random [1,6,12]) min 12; + }; + + _unit setVariable [QGVAR(concussion), _newConcussion, true]; + _unit setVariable [QGVAR(edema), _newEdema, true]; + _unit setVariable [QGVAR(bleeding), _bleeding, true]; + _unit setVariable [QGVAR(necrosis), _necrosis, true]; + + if (isNil {_unit getVariable QGVAR(concussionPFH)}) then { + [_unit] call FUNC(concussionPFH); + }; +}; + +_this \ No newline at end of file diff --git a/addons/brain/functions/fnc_findSaline.sqf b/addons/brain/functions/fnc_findSaline.sqf new file mode 100644 index 000000000..851ef214d --- /dev/null +++ b/addons/brain/functions/fnc_findSaline.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle, from _pharma_fnc_salineCheck + * Check for any active saline IV + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [_patient] call kat_pharma_fnc_findSaline; + * + * Public: No + */ + +params ["_patient"]; + +private _fluidCheck = _patient getVariable [QACEGVAR(medical,ivBags), []]; +private _check = false; + +{ + _x params ["_bagVolumeRemaining", "_type"]; + + if (_type in ["Saline", "Hypertonic Saline"] && _bagVolumeRemaining >= 30) exitWith { + _check = true; + }; +} forEach _fluidCheck; + +if (_check) exitWith {true}; + +false diff --git a/addons/brain/functions/fnc_fullHealLocal.sqf b/addons/brain/functions/fnc_fullHealLocal.sqf new file mode 100644 index 000000000..c7c8e65f3 --- /dev/null +++ b/addons/brain/functions/fnc_fullHealLocal.sqf @@ -0,0 +1,43 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_brain_fnc_fullHealLocal + * + * Public: No + */ + +params ["_patient"]; +TRACE_1("fullHealLocal",_patient); + +_patient setVariable [QGVAR(CMR),100,true]; // Cerebral Metabolic Rate (%) +_patient setVariable [QGVAR(CBF),800,true]; // Cerebral Blood Flow +_patient setVariable [QGVAR(CVR),0.1,true]; // Cerebral Vascular Resistance +_patient setVariable [QGVAR(ICP),15,true]; // Intracranial Pressure +_patient setVariable [QGVAR(CPR),100,true]; // Cerebral Perfusion Rate +_patient setVariable [QGVAR(rO2),80,true]; // Brain O2 saturation + +_patient setVariable [QGVAR(necrosis),0,true]; +_patient setVariable [QGVAR(deoxygenatedTicks),0,true]; +_patient setVariable [QGVAR(reversibleDamage),0,true]; +_patient setVariable [QGVAR(mapHighTicks),0,true]; +_patient setVariable [QGVAR(autoregFatigue),0,true]; +_patient setVariable [QGVAR(edema),0,true]; +_patient setVariable [QGVAR(bleeding),0,true]; +_patient setVariable [QGVAR(isSwelling),false,true]; + + +//TODO fix these PFHs so that they dont create duplicates when a player is healed +_patient setVariable [QGVAR(autoregulationPFH), [_patient] call FUNC(handleAutoregulation),true]; +_patient setVariable [QGVAR(activityPFH), [_patient] call FUNC(handleBrainActivity),true]; + +_patient setVariable [QGVAR(concussionPFH),nil,true]; +_patient setVariable [QGVAR(concussion),0,true]; \ No newline at end of file diff --git a/addons/brain/functions/fnc_handleAutoregulation.sqf b/addons/brain/functions/fnc_handleAutoregulation.sqf new file mode 100644 index 000000000..cb6b52af1 --- /dev/null +++ b/addons/brain/functions/fnc_handleAutoregulation.sqf @@ -0,0 +1,98 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Handles the autoregulation of CVR to achieve optimal CBF. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * 0: PFH enabled + * + * Example: + * [bob] call kat_brain_fnc_handleAutoregulation + * + * Public: No + */ + +params ["_unit"]; + +if (!local _unit) then { + [QGVAR(handleAutoregulation), [_unit], _unit] call CBA_fnc_targetEvent; +}; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {}; +if !(GVAR(enable) || (isNil QGVAR(autoregulationPFH))) exitWith {}; + +private _newPFH = [{ + + params ["_args", "_idPFH"]; + _args params ["_unit"]; + + if !(alive _unit) exitWith { + _unit setVariable [QGVAR(autoregulationPFH),nil,true]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + private _bloodPressure = [_unit] call EFUNC(circulation,getBloodPressure); + _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; + private _map = GET_MAP(_unit); + + private _mapHighTicks = _unit getVariable [QGVAR(mapHighTicks), 0]; + private _autoregFatigue = _unit getVariable [QGVAR(autoregFatigue), 0]; + if (_map > 130) then { + _mapHighTicks = _mapHighTicks + 1; + } else { + _mapHighTicks = (_mapHighTicks - 1) max 0; + }; + if (_mapHighTicks >= 20) then { + private _excessTicks = (_mapHighTicks - 20) + 1; + _autoregFatigue = (_autoregFatigue + (0.5 * _excessTicks)) min 100; + } else { + _autoregFatigue = (_autoregFatigue - 0.25) max 0; + }; + _unit setVariable [QGVAR(mapHighTicks), _mapHighTicks, true]; + _unit setVariable [QGVAR(autoregFatigue), _autoregFatigue, true]; + + private _CVR = _unit getVariable [QGVAR(CVR),0.1]; + private _ICP = 5 max (_unit getVariable [QGVAR(ICP),15]); + + private _paCO2 = GET_PACO2(_unit); + private _paCO2Factor = 1 + (0.03 * (_paCO2 - 40)); + _paCO2Factor = 0 max _paCO2Factor; // prevent negative values + private _targetCBF = 800 * (97/GET_KAT_SPO2(_unit)) * _paCO2Factor; + private _fatigueMultiplier = 1 - ((_autoregFatigue / 100) * 0.6); + + private _targetCVR_raw = (_map - 20) / _targetCBF; + private _targetCVR = _targetCVR_raw * _fatigueMultiplier; + + private _minCVR = 0.0375 + ((_autoregFatigue / 100) * 0.05); + _targetCVR = _minCVR max _targetCVR; + _targetCVR = _targetCVR min 0.17875; + private _newCVR = (((_CVR + _targetCVR) / 2) + _targetCVR) / 2; + private _CPP = (_map - _ICP) max 0; + if (_CPP > 200) then { _newCVR = 0.1; }; + + private _CBF = round (_CPP / _newCVR); + private _CPR = (_CBF / 800 * 100) min 200; + _CPR = _CPR * (GET_KAT_SPO2(_unit)/98); + _unit setVariable [QGVAR(CVR),_newCVR,true]; + _unit setVariable [QGVAR(CBF),_CBF,true]; + _unit setVariable [QGVAR(CPR),_CPR,true]; + private _ICP_delta = 0; + if (_mapHighTicks >= 25) then { + private _mapOver = _map - 130; + private _durationFactor = ((_mapHighTicks - 25) + 1); + _ICP_delta = (_mapOver * 0.02) * (_durationFactor); + private _fatigueIcpAmplify = 1 + ((_autoregFatigue / 100) * 0.25); + _ICP_delta = _ICP_delta * _fatigueIcpAmplify; + _ICP_delta = (_ICP_delta min 3) max 1; + }; + private _metoprololCount = ([_unit, "Metoprolol", false] call ACEFUNC(medical_status,getMedicationCount)) select 1; + private _metoprolol = linearConversion [0, 1, _metoprololCount, 1, 0.6, true]; + private _newICP = (_ICP + _ICP_delta) * _metoprolol; + _newICP = (5 max _newICP) min 60; + _unit setVariable [QGVAR(ICP), _newICP, true]; + +}, 3, [_unit]] call CBA_fnc_addPerFrameHandler; + +_unit setVariable [QGVAR(autoregulationPFH),_newPFH,true]; diff --git a/addons/brain/functions/fnc_handleBrainActivity.sqf b/addons/brain/functions/fnc_handleBrainActivity.sqf new file mode 100644 index 000000000..18fc9dce8 --- /dev/null +++ b/addons/brain/functions/fnc_handleBrainActivity.sqf @@ -0,0 +1,110 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Handles the simulation of oxygen perfusion into the brain and therefore the metabolic rate. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * 0: PFH enabled + * + * Example: + * [bob] call kat_brain_fnc_handleBrainActivity + * + * Public: No + */ +params ["_unit"]; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {}; + if (!local _unit) then { + [QGVAR(handleBrainActivity), [_unit], _unit] call CBA_fnc_targetEvent; +}; + +if !(GVAR(enable) || (isNil QGVAR(activityPFH))) exitWith {}; + +private _newPFH = [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + if !(alive _unit) exitWith { + _unit setVariable [QGVAR(activityPFH),nil,true]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + // Calculate brain oxygen saturation + private _CPR = _unit getVariable [QGVAR(CPR),100]; + private _perfusionDelta = switch (true) do { // Calculate change in rO2 based on graph + case (_CPR <= 50): {-3}; + case (_CPR <= 100): {(_CPR/10) - 8}; + case (_CPR <= 110): {2}; + case (_CPR <= 121.052): {(_CPR/30) - (5/3)}; + case (_CPR <= 160): {(_CPR/-8) + 17.5}; + default {-2.5}; + }; + private _rO2 = _unit getVariable [QGVAR(rO2),80]; + _rO2 = (0 max (_rO2 + _perfusionDelta)) min 80; // Transform rO2 by the perfusion delta within bounds of 0 and 80 + _unit setVariable [QGVAR(rO2),_rO2,true]; + + //Calculate tissue necrosis and brain death + private _necrosis = _unit getVariable [QGVAR(necrosis),0]; + private _deoxygenatedTicks = _unit getVariable [QGVAR(deoxygenatedTicks),0]; + _deoxygenatedTicks = [_deoxygenatedTicks + 0.25, _deoxygenatedTicks - 0.5] select (_rO2 > GVAR(necrosisThreshold)); + _deoxygenatedTicks = (_deoxygenatedTicks max 0) min 100; + _unit setVariable [QGVAR(deoxygenatedTicks),_deoxygenatedTicks,true]; + if (_deoxygenatedTicks >= GVAR(necrosisTicks)) then { + _necrosis = (_necrosis + GVAR(necrosisIncrease)) min 100; + if (_necrosis > random [75, 85, 100]) then { + [_unit, "Fatal_Brain_Necrosis"] call ACEFUNC(medical_status,setDead); + }; + }; + + private _reversibleDamage = _unit getVariable [QGVAR(reversibleDamage),0]; + + //Finally, calculate total brain metabolic rate + private _CMR = 100 * ((100-_necrosis)/100) * ((100-_reversibleDamage)/100); + + _unit setVariable [QGVAR(necrosis),_necrosis,true]; + _unit setVariable [QGVAR(CMR),_CMR,true]; + + private _ICP = _unit getVariable [QGVAR(ICP),15]; + + if !(_unit getVariable [QGVAR(isSwelling), false]) then { + + //Reduce ICP if no longer swelling + private _salineFlow = ((_unit getVariable [QGVAR(salineFlow), 0]) / 5) min 5; + private _metoprololCount = ([_unit, "Metoprolol", false] call ACEFUNC(medical_status,getMedicationCount)) select 1; + private _metoprolol = linearConversion [0, 1, _metoprololCount, 1, 1.5]; + private _icpReduction = GVAR(ICPreduction) * (1 + _salineFlow) * GVAR(ICPreductionMult) * _metoprolol; + private _newICP = _ICP - _icpReduction; + private _hasSaline = [_unit] call FUNC(findSaline); + // Set "floors" for ICP, preventing ICP from returning to normal levels without saline + if (_salineFlow == 0 && !_hasSaline) then { + switch (true) do { + case (_ICP >= 45): { + _newICP = 45 max _newICP; + }; + case (_ICP >= 38): { + _newICP = 38 max _newICP; + }; + case (_ICP >= 25): { + _newICP = 25 max _newICP; + }; + default { //Prevent ICP from returning to normal without saline + _newICP = 15 max _newICP; + }; + }; + }; + _newICP = 15 max _newICP; + _unit setVariable [QGVAR(ICP),_newICP,true]; + _reversibleDamageDiff = ((_reversibleDamage - GVAR(reversibleDamageLoss)) max 0) min 100; + //Reduce reversible tissue damage + _unit setVariable [QGVAR(reversibleDamage),_reversibleDamageDiff,true]; + }; + + //Cause LOC if CMR becomes too low + if (_CMR <= GVAR(CMRunconsciousThreshold) && !(_unit getVariable ["ACE_isUnconscious",false])) then { + private _CMRunconIncrease = linearConversion [0, GVAR(CMRunconsciousThreshold), _CMR, 50, 0, true]; + if (((floor (random 100) + _CMRunconIncrease) >= GVAR(CMRunconsciousChance)) && (_CMR >= GVAR(stableCMR))) exitWith {}; + [QACEGVAR(medical,CriticalVitals), _unit] call CBA_fnc_localEvent; + }; +}, 5, [_unit]] call CBA_fnc_addPerFrameHandler; +_unit setVariable [QGVAR(activityPFH),_newPFH,true]; \ No newline at end of file diff --git a/addons/brain/functions/fnc_handleEarRinging.sqf b/addons/brain/functions/fnc_handleEarRinging.sqf new file mode 100644 index 000000000..46f16853f --- /dev/null +++ b/addons/brain/functions/fnc_handleEarRinging.sqf @@ -0,0 +1,39 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle, MiszczuZPolski + * + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call kat_feedback_fnc_handleEarRinging; + * + * Public: No + */ + +if (isGamePaused) exitWith {}; + +if (!alive ACE_player) exitWith { + TRACE_1("dead - removing hearing effects",ACE_player); +}; +private _concussion = 0; +private _concussion = ACE_player getVariable [QEGVAR(brain,concussion), 0]; +if (_concussion > 0) then { + if (CBA_missionTime - ACEGVAR(hearing,time3) < 3) exitWith {}; + if (!isGameFocused) exitWith {}; // prevent audio from stacking when tabbed out + private _effectsVolume = getAudioOptionVolumes#0 * _concussion; + _concussion = ACE_player getVariable [QEGVAR(brain,concussion), 0]; + switch (true) do { + case (_concussion > 0.5): { + playSoundUI [["ACE_Combat_Deafness_Heavy", "ACE_Combat_Deafness_Heavy_NoRing"] select ACEGVAR(hearing,disableEarRinging), _effectsVolume]; + }; + default { + playSoundUI [["ACE_Combat_Deafness_Medium", "ACE_Combat_Deafness_Medium_NoRing"] select ACEGVAR(hearing,disableEarRinging), _effectsVolume]; + }; + }; +}; + diff --git a/addons/brain/functions/fnc_handleRespawn.sqf b/addons/brain/functions/fnc_handleRespawn.sqf new file mode 100644 index 000000000..6af41f1e1 --- /dev/null +++ b/addons/brain/functions/fnc_handleRespawn.sqf @@ -0,0 +1,41 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Ensures proper initial values reset on respawn + * + * Arguments: + * 0: Unit + * 1: Corpse + * + * Return Value: + * None + * + * Example: + * [alive, body] call kat_brain_fnc_handleRespawn; + * + * Public: No + */ + +params ["_unit","_dead"]; +TRACE_2("handleRespawn",_unit,_dead); + +[_unit] call FUNC(fullHealLocal); + +_unit setVariable [QEGVAR(brain,CMR),100,true]; +_unit setVariable [QEGVAR(brain,CBF),800,true]; +_unit setVariable [QEGVAR(brain,CVR),0.1,true]; +_unit setVariable [QEGVAR(brain,ICP),15,true]; +_unit setVariable [QEGVAR(brain,CPR),100,true]; +_unit setVariable [QEGVAR(brain,rO2),80,true]; +_unit setVariable [QEGVAR(brain,necrosis),0,true]; +_unit setVariable [QGVAR(deoxygenatedTicks),0,true]; +_unit setVariable [QGVAR(mapHighTicks),0,true]; +_unit setVariable [QGVAR(autoregFatigue),0,true]; +_unit setVariable [QEGVAR(brain,reversibleDamage),0,true]; +_unit setVariable [QEGVAR(brain,autoregulationPFH), [_unit] call EFUNC(brain,handleAutoregulation),true]; +_unit setVariable [QEGVAR(brain,activityPFH), [_unit] call EFUNC(brain,handleBrainActivity),true]; +_unit setVariable [QEGVAR(brain,concussionPFH),nil,true]; +_unit setVariable [QEGVAR(brain,concussion),0,true]; +_unit setVariable [QGVAR(edema),0,true]; +_unit setVariable [QGVAR(bleeding),0,true]; +_unit setVariable [QGVAR(isSwelling),false,true]; diff --git a/addons/brain/functions/fnc_icpAssessment.sqf b/addons/brain/functions/fnc_icpAssessment.sqf new file mode 100644 index 000000000..bf9760918 --- /dev/null +++ b/addons/brain/functions/fnc_icpAssessment.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal modified by Cplhardcore + * Checks the pulse or heart rate of the patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulse + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +[QGVAR(icpAssessment), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/brain/functions/fnc_icpAssessmentLocal.sqf b/addons/brain/functions/fnc_icpAssessmentLocal.sqf new file mode 100644 index 000000000..684a5e13f --- /dev/null +++ b/addons/brain/functions/fnc_icpAssessmentLocal.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for checking the pulse or heart rate of a patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Head"] call kat_circulation_fnc_icpAssesment + * + * Public: No + */ + +params ["_medic", "_patient"]; +private _icp = GET_ICP(_patient); +private _icpMM = 4; +if (_icp > 20) then { + _icp = _icp + (floor random [-10, 0, 10]); + _icpMM = linearConversion [15, 50, _icp, 4, 6.5, true]; + _icpMM = round (_icpMM * 10) / 10; +}; +private _ICPOutput = LSTRING(Check_ICP_OutputMod); + +[_patient, "quick_view", LSTRING(Check_ICP_Output), [_medic call ACEFUNC(common,getName), _icpMM]] call ACEFUNC(medical_treatment,addToLog); +[QACEGVAR(common,displayTextStructured), [[_ICPOutput, _patient call ACEFUNC(common,getName), _icpMM], 1.5, _medic], _medic] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/brain/functions/fnc_init.sqf b/addons/brain/functions/fnc_init.sqf new file mode 100644 index 000000000..e0c2bd945 --- /dev/null +++ b/addons/brain/functions/fnc_init.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle + * Initializes unit variables. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * None + * + * Example: + * [bob] call kat_brain_fnc_init + * + * Public: No + */ + +params ["_unit", ["_isRespawn", true]]; + +if (!local _unit) exitWith {}; +if !(GVAR(enable)) exitWith {}; + +[_unit] call FUNC(fullHealLocal); \ No newline at end of file diff --git a/addons/brain/initSettings.inc.sqf b/addons/brain/initSettings.inc.sqf new file mode 100644 index 000000000..fa961eb1b --- /dev/null +++ b/addons/brain/initSettings.inc.sqf @@ -0,0 +1,120 @@ + +//Enable traumatic brain injuries +[ + QGVAR(enable), + "CHECKBOX", + LLSTRING(SETTING_enable), + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [true], + true +] call CBA_Settings_fnc_init; + +//Amount to reduce ICP by when brain is not actively swelling +[ + QGVAR(ICPreduction), + "SLIDER", + [LLSTRING(SETTING_ICPreduction)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 2, 0.3, 1], + true +] call CBA_Settings_fnc_init; + +//Multiplier for ICP reduction if saline is being transfused +[ + QGVAR(ICPreductionMult), + "SLIDER", + [LLSTRING(SETTING_ICPreductionMult)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [1, 3, 1.3, 1], + true +] call CBA_Settings_fnc_init; + +// Minimum CMR to sustain consciousness. Not achieving will prevent awakening +[ + QGVAR(stableCMR), + "SLIDER", + [LLSTRING(SETTING_stableCMR)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 100, 80, 1], + true +] call CBA_Settings_fnc_init; + +// Minimum CMR required for unit to pass out randomly +[ + QGVAR(CMRunconsciousThreshold), + "SLIDER", + [LLSTRING(SETTING_CMRunconsciousThreshold)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 100, 75, 1], + true +] call CBA_Settings_fnc_init; + +//Chance for a unit to pass out randomly from low CMR +[ + QGVAR(CMRunconsciousChance), + "SLIDER", + [LLSTRING(SETTING_cmrunconsciouschance)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 100, 20, 1], + true +] call CBA_Settings_fnc_init; + +// Minimum ICP required for bradycardia to occur as a result +[ + QGVAR(ICPbradycardiaThreshold), + "SLIDER", + [LLSTRING(SETTING_ICPbradycardiaThreshold)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [20, 40, 25, 1], + true +] call CBA_Settings_fnc_init; + +//Chance of a concussion occuring +[ + QGVAR(concussionChance), + "SLIDER", + [LLSTRING(SETTING_concussionChance)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Concussions)], + [0, 100, 5, 1], + true +] call CBA_Settings_fnc_init; + +//How much reversible damage will decrease by every tick +[ + QGVAR(reversibleDamageLoss), + "SLIDER", + [LLSTRING(SETTING_reversibleDamageLoss)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_BrainDeath)], + [0, 2, 0.4, 1], + true +] call CBA_Settings_fnc_init; + +// Number of ticks required until tissue necrosis begins to occur, ticks occuring every 15 seconds +[ + QGVAR(necrosisTicks), + "SLIDER", + [LLSTRING(SETTING_necrosisTicks)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_BrainDeath)], + [1, 60, 10, 0], + true +] call CBA_Settings_fnc_init; + +// rO2 value required before necrosis occurs +[ + QGVAR(necrosisThreshold), + "SLIDER", + [LLSTRING(SETTING_necrosisThreshold)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_BrainDeath)], + [1, 80, 60, 0], + true +] call CBA_Settings_fnc_init; + +//How much necrosis increases each tick +[ + QGVAR(necrosisIncrease), + "SLIDER", + [LLSTRING(SETTING_necrosisIncrease)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_BrainDeath)], + [0, 10, 1.6, 1], + true +] call CBA_Settings_fnc_init; diff --git a/addons/brain/script_component.hpp b/addons/brain/script_component.hpp new file mode 100644 index 000000000..a34bec86a --- /dev/null +++ b/addons/brain/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT brain +#define COMPONENT_BEAUTIFIED KAT - Brain Injuries +#include "\x\kat\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_BRAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_BRAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_BRAIN +#endif + +#include "\x\kat\addons\main\script_macros.hpp" diff --git a/addons/brain/stringtable.xml b/addons/brain/stringtable.xml new file mode 100644 index 000000000..106f63729 --- /dev/null +++ b/addons/brain/stringtable.xml @@ -0,0 +1,69 @@ + + + + + KAT - ADV Medical: Brain + + + Enable Brain Simulation + + + ICP Reduction Amount + + + ICP Reduction Multiplier + + + CMR Uncon Threshold + + + Stable CMR + + + CMR Uncon Chance + + + Concussion Chance + + + ICP Bradycardia Threshold + + + ICP Bradycardia Chance + + + Concussions + + + Reversible Damage Loss + + + Brain Death + + + Tissue Necrosis Ticks + + + Necrosis Threshold + + + Necrosis Increase Amount + + + %1 found an optic nerve sheath of %2mm + + + %1 found an optic nerve sheath of %2mm + + + Measure Optic Nerve Sheath + + + Measuring Optic Nerve Sheath + + + Measuring Optic Nerve Sheath + + + + diff --git a/addons/breathing/ACE_Medical_Injuries.hpp b/addons/breathing/ACE_Medical_Injuries.hpp deleted file mode 100644 index ba97de3d6..000000000 --- a/addons/breathing/ACE_Medical_Injuries.hpp +++ /dev/null @@ -1,10 +0,0 @@ -class ACE_Medical_Injuries { - class damageTypes { - class woundHandlers; - class bullet { - class woundHandlers: woundHandlers { - GVAR(pulmoHit) = QFUNC(woundsHandlerPulmoHit); - }; - }; - }; -}; diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index c355b107e..8409c4351 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -1,15 +1,16 @@ class ACE_Medical_Treatment_Actions { class CheckPulse; + class BasicBandage; class ListenToLungs: CheckPulse { displayName = CSTRING(auscultateLung_display); displayNameProgress = CSTRING(listening_progress); treatmentTime = QGVAR(stethoscopeListeningTime); - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = 0; category = "airway"; medicRequired = 0; consumeItem = 0; - callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_2(_medic,_patient)] call FUNC(listenLungs)); + callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_3(_medic,_patient,0)] call FUNC(listenLungs)); callbackSuccess = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); callbackProgress = ""; callbackFailure = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); @@ -19,12 +20,27 @@ class ACE_Medical_Treatment_Actions { animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; }; + class ListenToRightLungs: ListenToLungs { + displayName = CSTRING(auscultateRightLung_display); + callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_3(_medic,_patient,1)] call FUNC(listenLungs)); + callbackSuccess = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); + callbackProgress = ""; + callbackFailure = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); + }; + class ListenToHeart: ListenToLungs { + displayName = CSTRING(auscultateHeart_display); + category = "Examine"; + callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_2(_medic,_patient)] call FUNC(listenHeart)); + callbackSuccess = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); + callbackProgress = ""; + callbackFailure = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); + }; class CheckBreathing: CheckPulse { displayName = CSTRING(Check_Breathing); displayNameProgress = CSTRING(Check_Breathing_Progress); category = "airway"; allowedSelections[] = {"Head"}; - allowSelfTreatment = 0; + allowSelfTreatment = 1; medicRequired = 0; treatmentTime = 2; condition = QUOTE(GVAR(enableCheckBreathing)); @@ -36,12 +52,16 @@ class ACE_Medical_Treatment_Actions { animationMedicProne = ""; sounds[] = {}; }; + class CheckBreathingNeck: CheckBreathing { + allowedSelections[] = {"Neck"}; + condition = QUOTE([_patient] call FUNC(hasSurgicalAirway)); + }; class InspectChest: CheckPulse { displayName = CSTRING(inspectChest_display); displayNameProgress = CSTRING(inspectChest_progress); category = "airway"; treatmentTime = QGVAR(InspectChest_time); - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = 0; medicRequired = QGVAR(inspectChest_medLvl); condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (missionNamespace getVariable [ARR_2(QQGVAR(inspectChest_enable),0)] > 0)); @@ -99,17 +119,17 @@ class ACE_Medical_Treatment_Actions { litter[] = {}; }; class ChestSeal { - displayName = CSTRING(chestseal_display); + displayName = CSTRING(leftchestseal_display); displayNameProgress = CSTRING(treating); category = "airway"; treatmentLocations = 0; - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = QGVAR(enable_selfChestseal); medicRequired = QGVAR(medLvl_Chestseal); treatmentTime = 7; items[] = {"kat_chestSeal"}; condition = "true"; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_chestSeal);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_chestSeal);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -122,42 +142,22 @@ class ACE_Medical_Treatment_Actions { animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; litter[] = {}; }; - class HemopneumothoraxTreatment { - displayName = CSTRING(hemopneumothorax_display); - displayNameProgress = CSTRING(treating); - category = "airway"; - treatmentLocations = 0; - allowedSelections[] = {"Body"}; - allowSelfTreatment = 0; - medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); - treatmentTime = 7; - items[] = {"kat_aatKit"}; - condition = "true"; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_hemopneumothorax);); - callbackFailure = ""; - callbackProgress = ""; - consumeItem = 1; - animationPatient = ""; - animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; - animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; - animationMedic = "AinvPknlMstpSlayWrflDnon_medicOther"; - animationMedicProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther"; - animationMedicSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; - animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; - litter[] = {}; + class RightChestSeal: ChestSeal { + displayName = CSTRING(rightchestseal_display); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_chestSeal);); }; - class TensionpneumothoraxTreatment { - displayName = CSTRING(tensionpneumothorax_display); + class FingerThoracostomy { + displayName = CSTRING(FingerThoracostomy_display); displayNameProgress = CSTRING(treating); category = "airway"; treatmentLocations = 0; - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = 0; - medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); - treatmentTime = 7; - items[] = {"kat_aatKit"}; + medicRequired = QGVAR(medLvl_FingerThoracostomyTreatment); + treatmentTime = 12; + items[] = {"kat_scalpel"}; condition = "true"; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_FingerThoracostomy);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -170,18 +170,22 @@ class ACE_Medical_Treatment_Actions { animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; litter[] = {}; }; - class ncdKit: TensionpneumothoraxTreatment { + class RightFingerThoracostomy: FingerThoracostomy{ + displayName = CSTRING(FingerThoracostomyRight_display); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_FingerThoracostomy);); + }; + class ncdKit { displayName = CSTRING(tensionpneumothoraxNCDKit_display); displayNameProgress = CSTRING(treating); category = "airway"; treatmentLocations = 0; - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = 0; - medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); + medicRequired = QGVAR(medLvl_tensionpneumothoraxTreatment); treatmentTime = 7; items[] = {"kat_ncdKit"}; condition = "true"; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_tensionpneumothorax);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -194,6 +198,10 @@ class ACE_Medical_Treatment_Actions { animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; litter[] = {}; }; + class RightncdKit: ncdKit { + displayName = CSTRING(righttensionpneumothoraxNCDKit_display); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_tensionpneumothorax);); + }; class DisablePulseOximeterAudio { displayName = CSTRING(PulseOximeter_Action_removeSound); displayNameProgress = ""; @@ -270,6 +278,57 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(_patient call FUNC(canUseBVM) && ((GVAR(locationProvideOxygen) in [ARR_2(2,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalFacility)) || (GVAR(locationProvideOxygen) in [ARR_2(1,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalVehicle)))); callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_4(_medic,_patient,false,true)] call FUNC(useBVM);); }; + class AttachVent { + displayName = CSTRING(AttachVent); + displayNameProgress = CSTRING(AttachingVent); + category = "airway"; + treatmentLocations = 1; + allowedSelections[] = {"Head"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(medLvl_Vent); + treatmentTime = 6; + consumeItem = 0; + items[] = {}; + condition = QFUNC(canAttachVent); + callbackStart = ""; + callbackSuccess = QFUNC(attachVent); + callbackFailure = ""; + callbackProgress = ""; + animationPatient = ""; + animationPatientUnconscious = ""; + animationPatientUnconsciousExcludeOn[] = {}; + animationMedic = ""; + animationMedicProne = ""; + litter[] = {}; + icon = QPATHTOF(ui\BVM_ui.paa); + }; + class DetachVent: AttachVent { + displayName = CSTRING(DetachVent); + displayNameProgress = CSTRING(DetachingVent); + medicRequired = QGVAR(medLvl_Vent); + treatmentTime = 6; + items[] = {}; + condition = QFUNC(canDetachVent); + callbackSuccess = QFUNC(detachVent); + }; + class SpeedUpVent: AttachVent { + displayName = CSTRING(IncreaseVent); + displayNameProgress = CSTRING(IncreasingVent); + medicRequired = QGVAR(medLvl_Vent); + treatmentTime = 1; + items[] = {}; + condition = QFUNC(canAdjustRate); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,-1)] call FUNC(adjustVentRate)); + }; + class SlowDownVent: AttachVent { + displayName = CSTRING(DecreaseVent); + displayNameProgress = CSTRING(DecreasingVent); + medicRequired = QGVAR(medLvl_Vent); + treatmentTime = 1; + items[] = {}; + condition = QFUNC(canAdjustRate); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(adjustVentRate)); + }; class NasalCannula { displayName = CSTRING(NasalCannula_Display); displayNameProgress = ECSTRING(airway,action_placing); @@ -294,7 +353,7 @@ class ACE_Medical_Treatment_Actions { animationMedicSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic"; animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; litter[] = {}; - icon = QPATHTOEF(airway,ui\larynx.paa); // TODO update to nasal specific icon + icon = QPATHTOF(ui\nasalcannula.paa); // TODO update to nasal specific icon }; class RemoveNasalCannula : NasalCannula { displayName = CSTRING(Cancel_NasalCannula); @@ -314,4 +373,150 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(_patient call EFUNC(airway,checkMask)); callbackSuccess = QFUNC(removeOxygenMask); }; + class CTIncision: BasicBandage { + displayName = CSTRING(Scalpel_Use); + displayNameProgress = CSTRING(Scalpel_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + treatmentTime = QGVAR(incisionTime); + items[] = {"kat_scalpel"}; + condition = QUOTE(([ARR_4(_medic,_patient,5,0)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTubeIncision)); + }; + class RightCTIncision: CTIncision { + displayName = CSTRING(ScalpelRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,5,1)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTubeIncision)); + }; + class CTSpread: BasicBandage { + displayName = CSTRING(Retractor_Use); + displayNameProgress = CSTRING(Retractor_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + treatmentTime = QGVAR(ChestTubeintermediateTime); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + items[] = {"kat_retractor"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,0.1,0)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.1,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class RightCTSpread: CTSpread { + displayName = CSTRING(RetractorRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,0.1,1)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.1,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class CTClamp: BasicBandage { + displayName = CSTRING(Clamp_Use); + displayNameProgress = CSTRING(Clamp_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + treatmentTime = QGVAR(ChestTubeintermediateTime); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + items[] = {"kat_clamp"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,0.3,0)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.3,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class RightCTClamp: CTClamp { + displayName = CSTRING(ClampRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,0.3,1)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.3,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class ChestTube: CheckPulse { + displayName = CSTRING(Chest_Tube_Use); + displayNameProgress = CSTRING(Chest_Tube_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + treatmentTime = QGVAR(ChestTubeintermediateTime); + items[] = {"kat_chestTube"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,0.5,0)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.5,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class RightChestTube: ChestTube { + displayName = CSTRING(Chest_TubeRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,0.5,1)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.5,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class SecureChestTube: CheckPulse { + displayName = CSTRING(Secure_Chest_Tube_Use); + displayNameProgress = CSTRING(Secure_Chest_Tube_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + treatmentTime = QGVAR(ChestTubeintermediateTime); + items[] = {"kat_stitchKit"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,0.7,0)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTube)); + }; + class SecureRightChestTube: SecureChestTube { + displayName = CSTRING(SecureChest_TubeRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,0.7,1)] call FUNC(treatmentAdvanced_chestTubeCheck))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTube)); + }; + class OpenchestTube: CheckPulse { + displayName = CSTRING(Open_chestTube_Kit); + displayNameProgress = CSTRING(Open_chestTube_Kit_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 1; + medicRequired = QGVAR(chestTubeAction_MedLevel); + treatmentTime = 5; + items[] = {"kat_aatKit"}; + consumeItem = 1; + callbackSuccess = QFUNC(treatmentAdvanced_chestTubeKit); + condition = "true"; + }; + class ChestTubeCheck: CheckPulse { + displayName = CSTRING(Chest_TubeCheck_Use); + displayNameProgress = CSTRING(Chest_TubeCheck_Action); + category = "airway"; + treatmentLocations = 0; + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + treatmentTime = 4; + items[] = {}; + consumeItem = 0; + condition = QUOTE(([ARR_4(_medic,_patient,1,0)] call FUNC(treatmentAdvanced_chestTubePlacedCheck))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(checkChestTube)); + }; + class RightChestTubeCheck: ChestTubeCheck { + displayName = CSTRING(Chest_TubeCheckRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,1,1)] call FUNC(treatmentAdvanced_chestTubePlacedCheck))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(checkChestTube)); + }; + class ResetChestTube: BasicBandage { + displayName = CSTRING(Reset_ChestTube); + displayNameProgress = CSTRING(Reset_ChestTube_action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + items[] = {"kat_stitchKit"}; + treatmentTime = 6; + consumeItem = 1; + condition = QUOTE([ARR_4(_medic,_patient,0.9,0)] call FUNC(treatmentAdvanced_chestTubeCheck)); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.9,0)] call FUNC(treatmentAdvanced_chestTubeProgressLocal)); + }; + class RightResetChestTube: ResetChestTube { + displayName = CSTRING(RightReset_ChestTube); + condition = QUOTE([ARR_4(_medic,_patient,0.9,1)] call FUNC(treatmentAdvanced_chestTubeCheck)); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.9,1)] call FUNC(treatmentAdvanced_chestTubeProgressLocal)); + }; }; diff --git a/addons/breathing/CfgSounds.hpp b/addons/breathing/CfgSounds.hpp index d10da34cb..967b701bd 100644 --- a/addons/breathing/CfgSounds.hpp +++ b/addons/breathing/CfgSounds.hpp @@ -1,28 +1,6 @@ class CfgSounds { sounds[] = {}; - class normalbreathing { - name = "clear_lungs"; - - // filename, volume, pitch, distance (optional) - sound[] = { QPATHTOF(audio\Clear_Lung_Sounds.ogg), 2, 1, 3 }; - titles[] = {}; - }; - class tensionpneumothoraxbreathing { - name = "tension_lungs"; - - // filename, volume, pitch, distance (optional) - sound[] = { QPATHTOF(audio\Tension_sounds.ogg), 2, 1, 3 }; - titles[] = {}; - }; - class hemothoraxbreathing { - name = "hemo_lungs"; - - // filename, volume, pitch, distance (optional) - sound[] = { QPATHTOF(audio\hemo_sounds.ogg), 2, 1, 3 }; - titles[] = {}; - }; - class GVAR(pneumothoraxcough) { name = QGVAR(pneumothoraxcough); diff --git a/addons/breathing/CfgWeapons.hpp b/addons/breathing/CfgWeapons.hpp index 023bbdb15..71f98c7a1 100644 --- a/addons/breathing/CfgWeapons.hpp +++ b/addons/breathing/CfgWeapons.hpp @@ -40,6 +40,18 @@ class CfgWeapons { mass = 1; }; }; + class kat_chestTube: ACE_ItemCore { + scope = 1; + scopeCurator = 1; + scopeArsenal = 1; + author = "Katalam"; + displayName = CSTRING(chesttube_display); + picture = QPATHTOF(ui\chestTube.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; class kat_aatKit: ACE_ItemCore { scope = 2; scopeCurator = 2; @@ -53,7 +65,7 @@ class CfgWeapons { hiddenSelectionsTextures[] = {QPATHTOF(models\AAT_Kit\AAT_ca.paa)}; ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 5; + mass = 2.5; }; }; class kat_ncdKit: ACE_ItemCore { @@ -66,7 +78,7 @@ class CfgWeapons { picture = QPATHTOF(ui\ndcKit.paa); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 2; + mass = 1; }; }; class kat_stethoscope: ACE_ItemCore { @@ -79,7 +91,7 @@ class CfgWeapons { picture = QPATHTOF(ui\steth.paa); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 6; + mass = 4; }; }; @@ -93,7 +105,7 @@ class CfgWeapons { picture = QPATHTOF(ui\BVM.paa); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 8; + mass = 6; }; }; class kat_pocketBVM: ACE_ItemCore { diff --git a/addons/breathing/XEH_PREP.hpp b/addons/breathing/XEH_PREP.hpp index c2125ff6e..313bb3c70 100644 --- a/addons/breathing/XEH_PREP.hpp +++ b/addons/breathing/XEH_PREP.hpp @@ -1,31 +1,54 @@ +PREP(adjustVentRate); PREP(attachPersonalOxygen); PREP(attachVehicleOxygen); +PREP(attachVent); +PREP(canAdjustRate); +PREP(canAttachVent); +PREP(canDetachVent); PREP(canUseBVM); PREP(checkAircraftOxygen); PREP(checkBreathing); +PREP(checkChestTube); PREP(checkOxygenMask); PREP(checkPersonalOxygen); PREP(checkPulseOximeter); PREP(createTamponade); PREP(detachPersonalOxygen); +PREP(detachVent); PREP(fullHealLocal); +PREP(getList); PREP(gui_updateBodyImage); PREP(gui_updateInjuryListPart); PREP(gui_updateInjuryListWounds); -PREP(handleBreathing); PREP(handleBreathingConditions); +PREP(handleHemothoraxDeterioration); +PREP(handleHemothoraxTreatment); PREP(handlePneumothoraxDeterioration); +PREP(handlePneumothoraxTreatment); PREP(handleRespawn); PREP(hasBVM); PREP(hasOxygenTank); +PREP(hasSurgicalAirway); PREP(inflictAdvancedPneumothorax); PREP(init); PREP(inspectChest); +PREP(listenHeart); PREP(listenLungs); PREP(refillOxygenTank); PREP(removeOxygenMask); PREP(treatmentAdvanced_chestSeal); PREP(treatmentAdvanced_chestSealLocal); +PREP(treatmentAdvanced_chestTube); +PREP(treatmentAdvanced_chestTubeCheck); +PREP(treatmentAdvanced_chestTubeIncision); +PREP(treatmentAdvanced_chestTubeIncisionLocal); +PREP(treatmentAdvanced_chestTubeKit); +PREP(treatmentAdvanced_chestTubeLocal); +PREP(treatmentAdvanced_chestTubePlacedCheck); +PREP(treatmentAdvanced_chestTubeProgress); +PREP(treatmentAdvanced_chestTubeProgressLocal); +PREP(treatmentAdvanced_fingerThoracostomy); +PREP(treatmentAdvanced_fingerThoracostomyLocal); PREP(treatmentAdvanced_hemopneumothorax); PREP(treatmentAdvanced_hemopneumothoraxLocal); PREP(treatmentAdvanced_nasalCannula); @@ -38,4 +61,5 @@ PREP(treatmentAdvanced_removePulseoximeter); PREP(treatmentAdvanced_tensionpneumothorax); PREP(treatmentAdvanced_tensionpneumothoraxLocal); PREP(useBVM); +PREP(ventPFH); PREP(woundsHandlerPulmoHit); \ No newline at end of file diff --git a/addons/breathing/XEH_postInit.sqf b/addons/breathing/XEH_postInit.sqf index 73f3f1028..53a42faf9 100644 --- a/addons/breathing/XEH_postInit.sqf +++ b/addons/breathing/XEH_postInit.sqf @@ -2,17 +2,25 @@ [QGVAR(pulseoxLocal), LINKFUNC(treatmentAdvanced_pulseoximeterLocal)] call CBA_fnc_addEventHandler; [QGVAR(chestSealLocal), LINKFUNC(treatmentAdvanced_chestSealLocal)] call CBA_fnc_addEventHandler; -[QGVAR(handleBreathing), LINKFUNC(handleBreathing)] call CBA_fnc_addEventHandler; [QGVAR(hemopneumothoraxLocal), LINKFUNC(treatmentAdvanced_hemopneumothoraxLocal)] call CBA_fnc_addEventHandler; +[QGVAR(fingerThoracostomyLocal), LINKFUNC(treatmentAdvanced_fingerThoracostomyLocal)] call CBA_fnc_addEventHandler; [QGVAR(tensionpneumothoraxLocal), LINKFUNC(treatmentAdvanced_tensionpneumothoraxLocal)] call CBA_fnc_addEventHandler; [QGVAR(nasalCannulaLocal), LINKFUNC(treatmentAdvanced_nasalCannulaLocal)] call CBA_fnc_addEventHandler; [QGVAR(removeNasalCannulaLocal), LINKFUNC(treatmentAdvanced_removeNasalCannulaLocal)] call CBA_fnc_addEventHandler; +[QGVAR(chestTubeIncision), LINKFUNC(treatmentAdvanced_chestTubeIncisionLocal)] call CBA_fnc_addEventHandler; +[QGVAR(chestTubeProgress), LINKFUNC(treatmentAdvanced_chestTubeProgressLocal)] call CBA_fnc_addEventHandler; +[QGVAR(chestTube), LINKFUNC(treatmentAdvanced_chestTubeLocal)] call CBA_fnc_addEventHandler; [QGVAR(playCough), { params ["_unit"]; _unit say3D [QGVAR(pneumothoraxcough), 15]; }] call CBA_fnc_addEventHandler; +[QGVAR(playGasp), { + params ["_unit"]; + _unit say3D [QGVAR(breathingGasp), 15]; +}] call CBA_fnc_addEventHandler; + [QGVAR(playRespiratorTone), { params ["_unit"]; _unit say3D [QGVAR(respiratorTone), 10]; @@ -29,11 +37,11 @@ [QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; private _items = missionNamespace getVariable [QGVAR(availOxyMask), "'kat_mask_solr'"]; -private _array = [_items, "CfgGlasses"] call EFUNC(chemical,getList); +private _array = [_items, "CfgGlasses"] call FUNC(getList); missionNamespace setVariable [QGVAR(availOxyMaskList), _array, true]; private _itemsHelmet = missionNamespace getVariable [QGVAR(availOxyHelmet), "'H_PilotHelmetFighter_B', 'H_PilotHelmetFighter_O', 'H_PilotHelmetFighter_I', 'H_PilotHelmetFighter_I_E'"]; -private _arrayHelmet = [_itemsHelmet, "CfgWeapons"] call EFUNC(chemical,getList); +private _arrayHelmet = [_itemsHelmet, "CfgWeapons"] call FUNC(getList); missionNamespace setVariable [QGVAR(availOxyHelmetList), _arrayHelmet, true]; diff --git a/addons/breathing/XEH_preInit.sqf b/addons/breathing/XEH_preInit.sqf index f29e83b4b..e2bcc78f8 100644 --- a/addons/breathing/XEH_preInit.sqf +++ b/addons/breathing/XEH_preInit.sqf @@ -9,4 +9,4 @@ PREP_RECOMPILE_END; #define CBA_SETTINGS_CAT LSTRING(cba_name) #include "initSettings.inc.sqf" -ADDON = true; \ No newline at end of file +ADDON = true; diff --git a/addons/breathing/audio/norm_2.wav b/addons/breathing/audio/norm_2.wav new file mode 100644 index 000000000..c46da9148 Binary files /dev/null and b/addons/breathing/audio/norm_2.wav differ diff --git a/addons/breathing/audio/slow_2.wav b/addons/breathing/audio/slow_2.wav new file mode 100644 index 000000000..ba5074632 Binary files /dev/null and b/addons/breathing/audio/slow_2.wav differ diff --git a/addons/breathing/config.cpp b/addons/breathing/config.cpp index 9769060f8..83ef375a6 100644 --- a/addons/breathing/config.cpp +++ b/addons/breathing/config.cpp @@ -13,7 +13,13 @@ class CfgPatches { "kat_Pulseoximeter", "kat_chestSeal", "kat_stethoscope", - "kat_nasal" + "kat_nasal", + "kat_pocketBVM", + "kat_oxygenTank_150_Empty", + "kat_oxygenTank_300_Empty", + "kat_BVM", + "kat_ncdKit", + "kat_aatKit" }; magazines[] = {}; requiredAddons[] = { @@ -46,7 +52,6 @@ class CfgPatches { #include "CfgMagazines.hpp" #include "CfgMoves.hpp" #include "CfgVehicles.hpp" -#include "ACE_Medical_Injuries.hpp" #include "ACE_Medical_Treatment_Actions.hpp" -#include "CfgSounds.hpp" #include "CfgGlasses.hpp" +#include "CfgSounds.hpp" \ No newline at end of file diff --git a/addons/breathing/functions/fnc_adjustVentRate.sqf b/addons/breathing/functions/fnc_adjustVentRate.sqf new file mode 100644 index 000000000..c035f444d --- /dev/null +++ b/addons/breathing/functions/fnc_adjustVentRate.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinksi + * Adjusts ventilator Rate + * + * Arguments: + * 0: Target + * 2: Adjust Value + * + * Return Value: + * None + * + * Example: + * [_target, 2, 0.5] call kat_medical_gui_fnc_handleIVAdjust; + * + * Public: No + */ + +params ["_medic", "_target", "_adjust"]; +private _ventRate = _target getVariable [QGVAR(ventRate), 2]; +_target setVariable [QGVAR(ventRate), (((_ventRate + _adjust) min 8) max 1), true]; +private _hint = format [LLSTRING(ventRate), round (60 / (((_ventRate + _adjust) min 8) max 1))]; +[_hint, 2, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/functions/fnc_attachPersonalOxygen.sqf b/addons/breathing/functions/fnc_attachPersonalOxygen.sqf index 6a55ffc44..9b2324971 100644 --- a/addons/breathing/functions/fnc_attachPersonalOxygen.sqf +++ b/addons/breathing/functions/fnc_attachPersonalOxygen.sqf @@ -29,7 +29,7 @@ private _largestTank = 0; { if (_x select 1 > ((_availableTanks select _largestTank) select 1)) then { - _largestTank = _y; + _largestTank = _forEachIndex; }; } forEach _availableTanks; diff --git a/addons/breathing/functions/fnc_attachVent.sqf b/addons/breathing/functions/fnc_attachVent.sqf new file mode 100644 index 000000000..97135e567 --- /dev/null +++ b/addons/breathing/functions/fnc_attachVent.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; + +_patient setVariable [QGVAR(attachedVent), true, true]; +_patient setVariable [QGVAR(attachedVentGUI), true, true]; +_patient call FUNC(ventPFH); + +_currentMonitors = _patient getVariable [QGVAR(etco2Monitor),[]]; +_currentMonitors pushBack "Ventilator"; + +_patient setVariable [QGVAR(etco2Monitor), _currentMonitors, true]; + +[_patient, LSTRING(Ventilator_Display)] call ACEFUNC(medical_treatment,addToTriageCard); +[_patient, "activity", LSTRING(Vent_log), [[_medic] call ACEFUNC(common,getName), LSTRING(Ventilator_Display)]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/breathing/functions/fnc_canAdjustRate.sqf b/addons/breathing/functions/fnc_canAdjustRate.sqf new file mode 100644 index 000000000..226aab82f --- /dev/null +++ b/addons/breathing/functions/fnc_canAdjustRate.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +if (_patient getVariable [QGVAR(attachedVentGUI), false]) exitWith {true}; +false diff --git a/addons/breathing/functions/fnc_canAttachVent.sqf b/addons/breathing/functions/fnc_canAttachVent.sqf new file mode 100644 index 000000000..b34480d69 --- /dev/null +++ b/addons/breathing/functions/fnc_canAttachVent.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +if (!(_patient call ACEFUNC(common,isAwake)) && ((IN_MED_VEHICLE(_patient)) || (IN_MED_FACILITY(_patient))) && !(_patient getVariable [QGVAR(oxygenMaskActive), false]) && !(_patient getVariable [QGVAR(attachedVent), false]) && (_patient getVariable [QEGVAR(airway,airway_item), ""] in ["Larynxtubus", "IGEL", "Surgical_Airway", "ETT"])) exitWith {true}; +false + diff --git a/addons/breathing/functions/fnc_canDetachVent.sqf b/addons/breathing/functions/fnc_canDetachVent.sqf new file mode 100644 index 000000000..9e17a2ca0 --- /dev/null +++ b/addons/breathing/functions/fnc_canDetachVent.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +if (_patient getVariable [QGVAR(attachedVent), false]) exitWith {true}; +false diff --git a/addons/breathing/functions/fnc_checkBreathing.sqf b/addons/breathing/functions/fnc_checkBreathing.sqf index a8060c491..581d6b1a3 100644 --- a/addons/breathing/functions/fnc_checkBreathing.sqf +++ b/addons/breathing/functions/fnc_checkBreathing.sqf @@ -22,17 +22,20 @@ params ["_medic", "_patient"]; private _ph = GET_PH(_patient); private _hr = GET_HEART_RATE(_patient); private _rawRR = GET_BREATHING_RATE(_patient); +private _icp = GET_ICP(_patient); +private _cardiacOutput = [_patient] call EFUNC(vitals,getCardiacOutput); private _rr = round _rawRR; private _output = ""; private _output_log = ""; - +private _height = 1.5; private _breathing = LLSTRING(breathing_isNormal); private _breathing_log = localize ACELSTRING(medical_treatment,Check_Pulse_Normal); private _breath = ""; private _breathRate = "RR: "; + private _respiratoryDepth = _patient getVariable [QEGVAR(vitals,respiratoryDepth), 10]; -if ((_respiratoryDepth < 8.5) || (_patient getVariable [QEGVAR(chemical,airPoisoning), false])) then { +if (_respiratoryDepth < 9) then { _breathing = LLSTRING(breathing_isShallow); _breathing_log = LLSTRING(breathing_shallow); }; @@ -42,10 +45,10 @@ if (_respiratoryDepth < 7) then { _breathing_log = LLSTRING(breathing_Veryshallow); }; -if (_ph < 7.2) then { +if (_ph < 7.3) then { _breath = LLSTRING(breath_mild); - if (_ph < 6.9) then { + if (_ph < 7.1) then { _breath = LLSTRING(breath_stink); }; }; @@ -59,16 +62,77 @@ if ([_medic] call ACEFUNC(common,isMedic)) then { default { _breathRate = LLSTRING(breathing_rrNormal); }; }; }; - _output = format ["%1%2, %3", _breathing ,_breath, _breathRate]; _output_log = format ["%1%2, %3", _breathing_log, _breath, _breathRate]; +private _breathingState = _patient getVariable [QEGVAR(vitals,breathingState), 0]; +private _isMedic = [_medic, GVAR(medLvl_VerboseBreathing)] call ACEFUNC(common,isMedic); +if ((GVAR(enableVerboseBreathing)) && _isMedic)then { + switch (_breathingState) do { + case 1: { + _breathing_alt = LLSTRING(breathing_isCheyne); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 2: { + _breathing_alt = LLSTRING(breathing_isIrreg); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 3: { + _breathing_alt = LLSTRING(breathing_isBiots); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 4: { + _breathing_alt = LLSTRING(breathing_isAgonal); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 5: { + _breathing_alt = LLSTRING(breathing_isKussmaul); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 6: { + _breathing_alt = LLSTRING(breathing_isKussmaulFailure); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 7: { + _breathing_alt = LLSTRING(breathing_isRespFailure1); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 8: { + _breathing_alt = LLSTRING(breathing_isRespFailure2); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + case 9: { + _breathing_alt = LLSTRING(breathing_isRespFailure3); + _output = format ["%1%2, %3, %4", _breathing ,_breath, _breathRate, _breathing_alt]; + _height = 3; + }; + default { + _output = format ["%1%2, %3", _breathing ,_breath, _breathRate]; + _height = 3; + } + }; +}; + -if (_hr == 0 || !(alive _patient) || (_patient getVariable [QEGVAR(airway,obstruction), false] && !(_patient getVariable [QEGVAR(airway,overstretch), false])) || _patient getVariable [QEGVAR(airway,occluded), false] || _patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then { +private _isbreathing = true; +private _paralysis = _patient getVariable [QGVAR(paralysis), 0] > 0.1; +if ((_rawRR < 1) || _paralysis) then { + _isbreathing = false; +}; +private _airway = HAS_AIRWAY(_patient); +if (_hr == 0 || !(alive _patient) || !_airway || !_isbreathing || _rr == 0) then { _output = LLSTRING(breathing_none); _output_log = ACELSTRING(medical_treatment,Check_Pulse_None); }; -[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); +[_output, _height, _medic] call ACEFUNC(common,displayTextStructured); [_patient, "quick_view", LSTRING(CheckBreathing_Log)] call EFUNC(circulation,removeLog); [_patient, "quick_view", LSTRING(CheckBreathing_Log), [[_medic] call ACEFUNC(common,getName), _output_log]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/breathing/functions/fnc_checkChestTube.sqf b/addons/breathing/functions/fnc_checkChestTube.sqf new file mode 100644 index 000000000..b482ef9db --- /dev/null +++ b/addons/breathing/functions/fnc_checkChestTube.sqf @@ -0,0 +1,56 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handle checking of the chest tube for blood + * + * Arguments: + * 0: Unit + * 1: side + * + * Return Value: + * None + * + * Example: + * [player, 1] call kat_breathing_fnc; + * + * Public: No + */ + params ["_medic", "_patient", "_side"]; + +private _drain = (_patient getVariable [QGVAR(drainRate), [0, 0]] select _side) / GVAR(chestTubeDrainAmount); +private _hintcTStatus = LLSTRING(chestTubeStatus_ClearDry); +private _cTStatus = LSTRING(chestTubeStatus_ClearDry_short); +private _hintWidth = 17; +private _hintSize = 2; +switch (true) do { + case (_drain > 0.02): { + _hintWidth = 17; + _hintcTStatus = LLSTRING(chestTubeStatus_HeavyDrain); + _cTStatus = LSTRING(chestTubeStatus_HeavyDrain_short); + }; + case (_drain > 0.015): { + _hintWidth = 17; + _hintcTStatus = LLSTRING(chestTubeStatus_NormalDrain); + _cTStatus = LSTRING(chestTubeStatus_NormalDrain_short); + }; + case (_drain > 0.01): { + _hintWidth = 17; + _hintcTStatus = LLSTRING(chestTubeStatus_SlowDrain); + _cTStatus = LSTRING(chestTubeStatus_SlowDrain_short); + }; + case (_drain > 0): { + _hintWidth = 17; + _hintcTStatus = LLSTRING(chestTubeStatus_MinimalDrain); + _cTStatus = LSTRING(chestTubeStatus_MinimalDrain_short); + }; + default { + _hintcTStatus = LLSTRING(chestTubeStatus_ClearDry); + _cTStatus = LSTRING(chestTubeStatus_ClearDry_short); + }; +}; + +[_hintcTStatus, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured); +private _sideText = LSTRING(LeftSide); +if (_side == 1) then {_sideText = LSTRING(RightSide)}; +[_patient, "quick_view", LSTRING(CheckChestTube_Log)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(CheckChestTube_Log), [[_medic] call ACEFUNC(common,getName), _sideText, _cTStatus]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/breathing/functions/fnc_checkPulseOximeter.sqf b/addons/breathing/functions/fnc_checkPulseOximeter.sqf index 03e92a99e..15e99f73d 100644 --- a/addons/breathing/functions/fnc_checkPulseOximeter.sqf +++ b/addons/breathing/functions/fnc_checkPulseOximeter.sqf @@ -17,7 +17,6 @@ */ params ["_patient", "_bodyPart"]; - -if(_patient getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select (ALL_BODY_PARTS find toLower _bodyPart)-2 > 0) exitWith {true}; - +if (((_patient getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select 0) > 0) && ((ALL_BODY_PARTS find toLower _bodyPart) == 4)) exitWith {true}; +if (((_patient getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select 1) > 0) && ((ALL_BODY_PARTS find toLower _bodyPart) == 6)) exitWith {true}; false diff --git a/addons/breathing/functions/fnc_createTamponade.sqf b/addons/breathing/functions/fnc_createTamponade.sqf index 78a743440..884a8cd58 100644 --- a/addons/breathing/functions/fnc_createTamponade.sqf +++ b/addons/breathing/functions/fnc_createTamponade.sqf @@ -47,16 +47,13 @@ _unit setVariable [QEGVAR(circulation,effusion), 1, true]; if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; - _unit setVariable [QEGVAR(circulation,ht), _ht, true]; }; - [_idPFH] call CBA_fnc_removePerFrameHandler; }; _unit setVariable [QEGVAR(circulation,effusion), _effusionTarget, true]; [_unit, 0.5 * (_effusionTarget / 4)] call ACEFUNC(medical_status,adjustPainLevel); // Adjust pain based on severity - [_unit, -10, -10, "cardiac_tension"] call EFUNC(circulation,updateBloodPressureChange); // Emulate low blood pressure and low heart rate caused by tamponade }; }, EGVAR(circulation,deterioratingTamponade_interval), [_unit]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_detachVent.sqf b/addons/breathing/functions/fnc_detachVent.sqf new file mode 100644 index 000000000..71375a1d6 --- /dev/null +++ b/addons/breathing/functions/fnc_detachVent.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +_patient setVariable [QGVAR(attachedVent), false, true]; +_patient setVariable [QGVAR(attachedVentGUI), false, true]; + +_currentMonitors = _patient getVariable [QGVAR(etco2Monitor), []]; +_currentMonitors deleteAt (_currentMonitors find "Ventilator"); + +_patient setVariable [QGVAR(etco2Monitor), _currentMonitors, true]; + +[_patient, "activity", LSTRING(Removed_Vent_log), [[_medic] call ACEFUNC(common,getName), LSTRING(Ventilator_Display)]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/breathing/functions/fnc_fullHealLocal.sqf b/addons/breathing/functions/fnc_fullHealLocal.sqf index 9791dd752..64a4e06eb 100644 --- a/addons/breathing/functions/fnc_fullHealLocal.sqf +++ b/addons/breathing/functions/fnc_fullHealLocal.sqf @@ -19,14 +19,29 @@ params ["_patient"]; TRACE_1("fullHealLocal",_patient); _patient setVariable [QGVAR(airwayStatus), 100, true]; -_patient setVariable [QGVAR(pneumothorax), 0, true]; -_patient setVariable [QGVAR(hemopneumothorax), false, true]; -_patient setVariable [QGVAR(tensionpneumothorax), false, true]; -_patient setVariable [QGVAR(activeChestSeal), false, true]; -_patient setVariable [QGVAR(deepPenetratingInjury), false, true]; +_patient setVariable [QGVAR(pneumothorax), [0, 0], true]; +_patient setVariable [QGVAR(pneumothoraxSurfaceArea), [0, 0], true]; +_patient setVariable [QGVAR(hemopneumothorax), [0, 0], true]; +_patient setVariable [QGVAR(tensionpneumothorax), [false, false], true]; +_patient setVariable [QGVAR(activeChestSeal), [false, false], true]; +_patient setVariable [QGVAR(deepPenetratingInjury), [false, false], true]; _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(chestTube), [0, 0], true]; +_patient setVariable [QGVAR(attachedVent), false, true]; +_patient setVariable [QGVAR(attachedVentGUI), false, true]; +_patient setVariable [QGVAR(paralysis), 0, true]; +_patient setVariable [QGVAR(ventRate), 2, true]; +_patient setVariable [QGVAR(BVM_amount), 0, true]; +_patient setVariable [QGVAR(BVM_provider), 0, true]; +_patient setVariable [QGVAR(bronchospasm), 1, true]; +_patient setVariable [QGVAR(biotTimer), 0, true]; +_patient setVariable [QGVAR(biotState), "", true]; +_patient setVariable [QGVAR(agonalTimer), 0, true]; +_patient setVariable [QGVAR(drainRate), [0, 0], true]; + if (ACEGVAR(advanced_fatigue,enabled)) then { ["kat_LSDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); diff --git a/addons/chemical/functions/fnc_getList.sqf b/addons/breathing/functions/fnc_getList.sqf similarity index 98% rename from addons/chemical/functions/fnc_getList.sqf rename to addons/breathing/functions/fnc_getList.sqf index 8bb758914..06d3f793a 100644 --- a/addons/chemical/functions/fnc_getList.sqf +++ b/addons/breathing/functions/fnc_getList.sqf @@ -27,4 +27,4 @@ private _array = []; nil } count _clipstring; -_array +_array \ No newline at end of file diff --git a/addons/breathing/functions/fnc_gui_updateBodyImage.sqf b/addons/breathing/functions/fnc_gui_updateBodyImage.sqf index 9f2e80f2a..286dc3203 100644 --- a/addons/breathing/functions/fnc_gui_updateBodyImage.sqf +++ b/addons/breathing/functions/fnc_gui_updateBodyImage.sqf @@ -21,27 +21,51 @@ params ["_ctrlGroup", "_target", "_selectionN"]; private _ctrlPulseOximeterRight = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM_PULSEOX; private _ctrlPulseOximeterLeft = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTARM_PULSEOX; -private _ctrlChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_CHESTSEAL; -private _ctrlChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_PNEUMOTHORAX; +private _ctrlLeftChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_LEFTCHESTSEAL; +private _ctrlLeftChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_LEFTPNEUMOTHORAX; +private _ctrlRightChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_RIGHTCHESTSEAL; +private _ctrlRightChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_RIGHTPNEUMOTHORAX; private _ctrlNasalCannula = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_NASAL; -if (_target getVariable [QGVAR(activeChestSeal), false]) then { - _ctrlChestSeal ctrlShow true; +private _pneumothoraxState = _target getVariable [QGVAR(pneumothorax), [0, 0]]; +private _activeChestSeal = _target getVariable [QGVAR(activeChestSeal), [false, false]]; +private _deepPenetratingInjury = _target getVariable [QGVAR(deepPenetratingInjury), [false, false]]; + + +if (_activeChestSeal select 0) then { + _ctrlLeftChestSeal ctrlShow true; +} else { + _ctrlLeftChestSeal ctrlShow false; +}; + +if (_activeChestSeal select 1) then { + _ctrlRightChestSeal ctrlShow true; } else { - _ctrlChestSeal ctrlShow false; + _ctrlRightChestSeal ctrlShow false; }; +//Check pneumothorax and injuries if (GVAR(PneumothoraxAlwaysVisible)) then { - if(_target getVariable [QGVAR(pneumothorax), 0] > 0) then { - _ctrlChestInjury ctrlShow true; + if ((_pneumothoraxState select 0 > 0) && !(_activeChestSeal select 0)) then { + _ctrlLeftChestInjury ctrlShow true; } else { - _ctrlChestInjury ctrlShow false; + _ctrlLeftChestInjury ctrlShow false; + }; + if ((_pneumothoraxState select 1 > 0) && !(_activeChestSeal select 1)) then { + _ctrlRightChestInjury ctrlShow true; + } else { + _ctrlRightChestInjury ctrlShow false; }; } else { - if (_target getVariable [QGVAR(deepPenetratingInjury), false] || (_target getVariable [QGVAR(pneumothorax), 0] > 0)) then { - _ctrlChestInjury ctrlShow true; + if ((_deepPenetratingInjury select 0) && !(_activeChestSeal select 0)) then { + _ctrlLeftChestInjury ctrlShow true; + } else { + _ctrlLeftChestInjury ctrlShow false; + }; + if ((_deepPenetratingInjury select 1) && !(_activeChestSeal select 0)) then { + _ctrlRightChestInjury ctrlShow true; } else { - _ctrlChestInjury ctrlShow false; + _ctrlRightChestInjury ctrlShow false; }; }; diff --git a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf index f17cf75a2..d24799a05 100644 --- a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf +++ b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf @@ -20,13 +20,9 @@ params ["_ctrl", "_target", "_selectionN", "_entries"]; -if (GVAR(showCyanosis) && _selectionN in [0,2,3]) then { +if (GVAR(showCyanosis) && _selectionN in [0,4,6,8,10]) then { private _spO2 = 0; - - if (alive _target) then { - _spO2 = GET_KAT_SPO2(_target); - }; - + _spO2 = GET_KAT_SPO2(_target); if (_spO2 <= GVAR(slightValue) || HAS_TOURNIQUET_APPLIED_ON(_target,_selectionN)) then { private _cyanosisArr = switch (true) do { case (HAS_TOURNIQUET_APPLIED_ON(_target,_selectionN)); @@ -44,49 +40,107 @@ if (GVAR(showCyanosis) && _selectionN in [0,2,3]) then { }; }; -if (_target getVariable [QGVAR(pulseoximeter), false] && _selectionN in [2,3]) then { - if((_target getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select (_selectionN - 2)) > 0) then { +if (_target getVariable [QGVAR(pulseoximeter), false] && _selectionN in [4,6]) then { + if ((_target getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select 0) > 0) then { + _entries pushBack [LLSTRING(Pulseoximeter), [0.3, 0.8, 0.8, 1]]; + }; + if ((_target getVariable [QGVAR(PulseOximeter_Attached), [0,0]] select 1) > 0) then { _entries pushBack [LLSTRING(Pulseoximeter), [0.3, 0.8, 0.8, 1]]; }; }; - +if (_target getVariable [QGVAR(BVMInUse), false]) then { + _entries pushBack [format ["%1", LLSTRING(Actions_BVM)], [0.3, 0.8, 0.8, 1]]; +}; if (_target getVariable [QGVAR(nasalCannula), false] && _selectionN isEqualTo 0) then { _entries pushBack [LLSTRING(NasalCannula_Display), [0.3, 0.8, 0.8, 1]]; }; +if (_target getVariable [QGVAR(attachedVentGUI), false] && _selectionN isEqualTo 0) then { + _entries pushBack [LLSTRING(Vent_Display), [0.3, 0.8, 0.8, 1]]; +}; + +if (((_target getVariable [QGVAR(chestTube), [0, 0]] select 0) > 0) && _selectionN isEqualTo 2) then { + _leftChest = (_target getVariable [QGVAR(chestTube), [0, 0]] select 0); + switch (_leftChest) do { + case 0.1: { + _entries pushBack [LLSTRING(Left_PartialChestTube_1), [0.3, 0.8, 0.8, 1]]; + }; + case 0.3: { + _entries pushBack [LLSTRING(Left_PartialChestTube_3), [0.3, 0.8, 0.8, 1]]; + }; + case 0.5: { + _entries pushBack [LLSTRING(Left_PartialChestTube_5), [0.3, 0.8, 0.8, 1]]; + }; + case 0.7: { + _entries pushBack [LLSTRING(Left_PartialChestTube_7), [0.3, 0.8, 0.8, 1]]; + }; + default { + _entries pushBack [LLSTRING(Left_ChestTube), [0.3, 0.8, 0.8, 1]]; + }; + }; +}; + +if (((_target getVariable [QGVAR(chestTube), [0, 0]] select 1) > 0) && _selectionN isEqualTo 2) then { + private _rightChest = (_target getVariable [QGVAR(chestTube), [0, 0]] select 1); + switch (_rightChest) do { + case 0.1: { + _entries pushBack [LLSTRING(Right_PartialChestTube_1), [0.3, 0.8, 0.8, 1]]; + }; + case 0.3: { + _entries pushBack [LLSTRING(Right_PartialChestTube_3), [0.3, 0.8, 0.8, 1]]; + }; + case 0.5: { + _entries pushBack [LLSTRING(Right_PartialChestTube_5), [0.3, 0.8, 0.8, 1]]; + }; + case 0.7: { + _entries pushBack [LLSTRING(Right_PartialChestTube_7), [0.3, 0.8, 0.8, 1]]; + }; + default { + _entries pushBack [LLSTRING(Right_ChestTube), [0.3, 0.8, 0.8, 1]]; + }; + }; +}; private _ptxEntry = []; -if (_selectionN isEqualTo 1) then { +private _pneumothoraxState = _target getVariable [QGVAR(pneumothorax), [0, 0]]; +private _tensionState = _target getVariable [QGVAR(tensionpneumothorax), [false, false]]; +private _hemoState = _target getVariable [QGVAR(hemopneumothorax), [0, 0]]; + +if (_selectionN isEqualTo 2) then { private _tensionhemothorax = false; + if (!(GVAR(showPneumothorax_dupe))) then { - if ((_target getVariable [QGVAR(hemopneumothorax), false]) || (_target getVariable [QGVAR(tensionpneumothorax), false])) then { + if (((_hemoState select 0) > 0)|| ((_hemoState select 1) > 0) || (_tensionState select 0 || _tensionState select 1)) then { _tensionhemothorax = true; }; }; - - if (_target getVariable [QGVAR(activeChestSeal), false]) then { + private _activeChestSeal = _target getVariable [QGVAR(activeChestSeal), [false, false]]; + if ((_activeChestSeal select 0) || (_activeChestSeal select 1)) then { _entries pushBack [LLSTRING(ChestSealApplied), [1,0.95,0,1]]; }; - - if (GVAR(PneumothoraxAlwaysVisible)) then { - if ((_target getVariable [QGVAR(pneumothorax), 0] > 0) && !(_tensionhemothorax)) then { - _ptxEntry pushBack [LLSTRING(pneumothorax_mm), [1,1,1,1]]; - }; - } else { - if (_target getVariable [QGVAR(deepPenetratingInjury), false]) then { - _entries pushBack [LLSTRING(DeepPenetratingInjury), [1,0,0,1]]; + { + private _side = _x; + + if (GVAR(PneumothoraxAlwaysVisible)) then { + if (((_pneumothoraxState select _side) > 0) && !(_tensionhemothorax)) then { + _ptxEntry pushBack [LLSTRING(pneumothorax_mm), [1,1,1,1]]; + }; + } else { + if ((_target getVariable [QGVAR(deepPenetratingInjury), [false, false]]) select _side) then { + _entries pushBack [LLSTRING(DeepPenetratingInjury), [1,0,0,1]]; + }; }; - }; - if (GVAR(TensionHemothoraxAlwaysVisible)) then { - if (_target getVariable [QGVAR(hemopneumothorax), false]) then { - _ptxEntry pushBack [LLSTRING(hemopneumothorax_mm), [1,1,1,1]]; - }; + if (GVAR(TensionHemothoraxAlwaysVisible)) then { + if ((_hemoState select _side) > 0) then { + _ptxEntry pushBack [LLSTRING(hemopneumothorax_mm), [1,1,1,1]]; + }; - if (_target getVariable [QGVAR(tensionpneumothorax), false]) then { - _ptxEntry pushBack [LLSTRING(tensionpneumothorax_mm), [1,1,1,1]]; + if (_tensionState select _side) then { + _ptxEntry pushBack [LLSTRING(tensionpneumothorax_mm), [1,1,1,1]]; + }; }; - }; + } forEach [0, 1]; }; -_target setVariable [QGVAR(gui_updateInjuryList_ptxEntries), _ptxEntry]; +_target setVariable [QGVAR(gui_updateInjuryList_ptxEntries), _ptxEntry]; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_handleBreathing.sqf b/addons/breathing/functions/fnc_handleBreathing.sqf deleted file mode 100644 index 0223c39c7..000000000 --- a/addons/breathing/functions/fnc_handleBreathing.sqf +++ /dev/null @@ -1,230 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Katalam, edited by Tomcat, Kygan, YetheSamartaka and Mazinski - * Handling oxygen saturation for breathing - * - * Arguments: - * 0: Unit - * - * Return Value: - * None - * - * Example: - * [cursorTarget] call kat_breathing_fnc_handleBreathing; - * - * Public: No - */ - -params ["_unit"]; - -//Other mods can utilise KAT_SpO2Change_Exclusion variable to prevent occlusions from happening -if ((_unit getVariable ["kat_O2Breathing_PFH", false]) || !(GVAR(enable)) || (_unit getVariable ["KAT_SpO2Change_Exclusion", false])) exitWith {}; -_unit setVariable ["kat_O2Breathing_PFH", true]; - -if (!local _unit) then { - [QGVAR(handleBreathing), [_unit], _unit] call CBA_fnc_targetEvent; -}; - -[{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; - if !(alive _unit) exitWith { - _unit setVariable ["kat_O2Breathing_PFH", nil]; - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - private _airway = true; - private _breathing = true; - - if ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QGVAR(tensionpneumothorax), false]) || (_unit getVariable [QGVAR(hemopneumothorax), false])) then { - _breathing = false; - }; - - if ((_unit getVariable [QEGVAR(airway,occluded), false]) || (_unit getVariable [QEGVAR(airway,obstruction), false])) then { - _airway = false; - }; - - private _isAwake = [_unit] call ACEFUNC(common,isAwake); - - private _status = _unit getVariable [QGVAR(airwayStatus), 100]; - private _overstretch = _unit getVariable [QEGVAR(airway,overstretch), false]; - private _heartRate = _unit getVariable [QACEGVAR(medical,heartRate), 0]; - private _blockDeath = _unit getVariable [QACEGVAR(medical,deathblocked), false]; - private _BVMInUse = _unit getVariable [QGVAR(BVMInUse), false]; - private _oxygenAssisted = _unit getVariable [QGVAR(oxygenTankConnected), false]; - - private _pneumothorax = _unit getVariable [QGVAR(pneumothorax), 0]; - - private _output = 0; - private _finalOutput = 0; - private _multiplierPositive = GVAR(SpO2_MultiplyPositive); - private _multiplierNegative = GVAR(SpO2_MultiplyNegative); - private _multiplierOxygen = GVAR(BVMOxygen_Multiplier); - private _perfusionActive = false; - - if (GVAR(SpO2_cardiacActive)) then { - private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; - - if (_status <= GVAR(SpO2_cardiacValue)) then { - if ((_ht findIf {_x isEqualTo "hypoxia"}) == -1) then { - _ht pushBack "hypoxia"; - - if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { - [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; - }; - - _unit setVariable [QEGVAR(circulation,ht), _ht, true]; - }; - } else { - _ht deleteAt (_ht find "hypoxia"); - _unit setVariable [QEGVAR(circulation,ht), _ht, true]; - }; - }; - - //if lethal SpO2 value is activated and lower the value x, then kill _unit - if ((_status <= GVAR(SpO2_dieValue)) && { GVAR(SpO2_dieActive) && { !_blockDeath } }) exitWith { - [_unit, "terminal_SpO2_death"] call ACEFUNC(medical_status,setDead); - _unit setVariable ["kat_O2Breathing_PFH", nil]; - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - //if the _unit has SpO2 equal/over 100, then remove the PFH - if (_status >= 100 && {_isAwake && {_breathing && {_pneumothorax == 0}}}) exitWith { - _unit setVariable [QGVAR(airwayStatus), 100, true]; - _unit setVariable ["kat_O2Breathing_PFH", nil]; - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - // Unconscious - if !(_isAwake) exitWith { - _output = -0.2; // Not breathing/blocked airway - - if (_breathing) then { // Breathing - if (_airway) then { // Clear airway - // Low heart rate / cardiac arrest (0) - if (_heartRate < 20 && {GVAR(SpO2_perfusion)}) exitWith { - _perfusionActive = true; - if(_BVMInUse) then { - if(_oxygenAssisted) then { - _output = -0.01; - } else { - _output = -0.1; - }; - }; - }; - - // Normal(-ish) heart rate - if (_heartRate >= 25) exitWith { - if (_BVMInUse) then { - if(_oxygenAssisted) then { - _output = 0.8 * _multiplierOxygen; - } else { - _output = 0.45; - }; - } else { - _output = 0.3; - }; - }; - - _output = 0; // SpO2_perfusion is false - } else {// Obstruction with hyperextended head - if (_overstretch && _unit getVariable [QEGVAR(airway,obstruction), false] && !(_unit getVariable [QEGVAR(airway,occlusion), false]) && _heartRate >= 25) exitWith { - if(_BVMInUse) then { - if(_oxygenAssisted) then { - _output = 0.5 * _multiplierOxygen; - } else { - _output = 0.24; - }; - } else { - _output = 0.12; - }; - }; - }; - }; - - if (_pneumothorax > 0) then { - _output = (_output - (0.81 * (_pneumothorax / 4))) max -0.2; // Decrease breathing rate based on pneumothorax severity, maximum decrease should be -0.2 - }; - - if (_output > 0) then { - _output = _output * _multiplierPositive; - } else { - if (_perfusionActive) then { - _output = _output * GVAR(SpO2_PerfusionMultiplier); - } else { - _output = _output * _multiplierNegative; - }; - }; - - _finalOutput = _status + _output; - - if (_finalOutput > 100) then { - _finalOutput = 100; - }; - - if (_finalOutput < 1) then { - _finalOutput = 1; - }; - - _unit setVariable [QGVAR(airwayStatus), _finalOutput, true]; - }; - - // Awake - if (_isAwake) exitWith { - if !(_breathing) then { - _output = -0.2 * _multiplierNegative; - } else { - if (_pneumothorax isEqualTo 0) then { - _output = 0.5 * _multiplierPositive; // Normal breathing - } else { - _output = ((0.5 - (0.8 * _pneumothorax / 4)) max -0.2) * _multiplierNegative; // Decrease breathing rate based on pneumothorax severity, maximum decrease should be -0.2 - }; - }; - - _finalOutput = _status + _output; - - if (_finalOutput > 100) then { - _finalOutput = 100; - }; - - if (_finalOutput < 1) then { - _finalOutput = 1; - }; - - _unit setVariable [QGVAR(airwayStatus), _finalOutput, true]; - - if (!(_unit getVariable ["ACE_isUnconscious",false]) && {_finalOutput <= GVAR(SpO2_unconscious)}) then { - [QACEGVAR(medical,CriticalVitals), _unit] call CBA_fnc_localEvent; - }; - - if(GVAR(staminaLossAtLowSPO2)) then { - if (!(_unit getVariable ["ACE_isUnconscious",false]) && {_finalOutput <= GVAR(lowSPO2Level)}) then { - if (ACEGVAR(advanced_fatigue,enabled)) then { - ["kat_LSDF", 1.5] call ACEFUNC(advanced_fatigue,addDutyFactor); - } else { - _unit setStamina(getStamina _unit - 3); - }; - } else { - ["kat_LSDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); - }; - }; - - if ((_unit getVariable [QGVAR(pneumothorax), 0] > 0) || _unit getVariable [QGVAR(hemopneumothorax), false] || _unit getVariable [QGVAR(tensionpneumothorax), false]) then { - if (!(_unit getVariable [QACEGVAR(medical,inCardiacArrest), false]) && !(_unit getVariable [QGVAR(PneumoBreathCooldownOn), false])) then { - _unit setVariable [QGVAR(PneumoBreathCooldownOn), true, true]; - - private _soundTargets = allPlayers inAreaArray [ASLToAGL getPosASL _unit, 15, 15, 0, false, 15]; - - if (_soundTargets isNotEqualTo []) then { - [QGVAR(playCough), [_unit], _soundTargets] call CBA_fnc_targetEvent; - }; - - [{ - params["_unit"]; - _unit setVariable [QGVAR(PneumoBreathCooldownOn), false, true]; - }, - [_unit], 30] call CBA_fnc_waitAndExecute; - }; - }; - }; -}, 3, [_unit]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_handleBreathingConditions.sqf b/addons/breathing/functions/fnc_handleBreathingConditions.sqf index 010c2dc2d..c43179aac 100644 --- a/addons/breathing/functions/fnc_handleBreathingConditions.sqf +++ b/addons/breathing/functions/fnc_handleBreathingConditions.sqf @@ -40,17 +40,5 @@ params ["_unit"]; ["kat_LSDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); }; }; - - if (EGVAR(chemical,maskStaminaLoss)) then { - if (goggles _unit in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) then { - if (ACEGVAR(advanced_fatigue,enabled)) then { - ["kat_CMSK", 1.5] call ACEFUNC(advanced_fatigue,addDutyFactor); - } else { - _unit setStamina(getStamina _unit - 3); - }; - } else { - ["kat_CMSK"] call ACEFUNC(advanced_fatigue,removeDutyFactor); - }; - }; - + }, 10, [_unit]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_handleHemothoraxDeterioration.sqf b/addons/breathing/functions/fnc_handleHemothoraxDeterioration.sqf new file mode 100644 index 000000000..739395e94 --- /dev/null +++ b/addons/breathing/functions/fnc_handleHemothoraxDeterioration.sqf @@ -0,0 +1,74 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Handle pneumothorax deterioration + * + * Arguments: + * 0: Unit + * 1: Deterioration chance increase + * + * Return Value: + * None + * + * Example: + * [player, 15] call kat_breathing_fnc_handleHemothoraxDeterioration; + * + * Public: No + */ + +params ["_unit", "_side", ["_amount", 3]]; +private _fnc_createInternalBleeding = { + private _openWounds = GET_OPEN_WOUNDS(_unit); + private _existingWounds = _openWounds getOrDefault ["chest", [], true]; + private _bodyPartDamage = GET_BODYPART_DAMAGE(_unit); + private _woundTypeToAdd = "InternalBleeding"; + TRACE_4("create_Evisceration1",_openWounds,_existingWounds,_bodyPartDamage,_woundTypeToAdd); + private _woundClassIDToAdd = ACEGVAR(medical_damage,woundClassNames) find _woundTypeToAdd; + private _injuryBleedingRate = random [0.005, 0.01, 0.02]; + private _bleedMultiplier = random [0.8, 1, 1.2]; + private _woundSize = selectRandom [0, 0, 0, 1, 1, 2]; + private _bleeding = _woundSize * _bleedMultiplier * _injuryBleedingRate; + private _classComplex = 10 * _woundClassIDToAdd + _woundSize; + // Create a new injury. Format [0:classComplex, 1:amountOf, 2:bleedingRate, 3:woundDamage] + private _injury = [_classComplex, 1, _bleeding, 1]; + TRACE_1("adding new wound",_injury); + _existingWounds pushBack _injury; + _unit setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + _unit setVariable [VAR_BODYPART_DAMAGE, _bodyPartDamage, true]; + [_unit] call EFUNC(circulation,updateWoundBloodLoss); +}; + +for "_i" from 0 to _amount do { + [_unit] call _fnc_createInternalBleeding; + }; + + +if (((_unit getVariable [QGVAR(chestTube), [0, 0]] select 0) > 0.9) && ((_unit getVariable [QGVAR(chestTube), [0, 0]] select 1) > 0.9)) then { + [_unit, _side] call FUNC(handleHemothoraxTreatment); +}; +[{ + params ["_unit", "_side"]; + [{ + + params ["_args", "_idPFH"]; + _args params ["_unit", "_side"]; + private _hemoState = _unit getVariable [QGVAR(hemopneumothorax), [0, 0]]; + if (!(alive _unit) || + ((INTERNAL_BLEEDING_RATE(_unit,2) == 0))) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _internalBleeding = (INTERNAL_BLEEDING_RATE(_unit,2) / 10); + _hemoState set [_side, (((_hemoState select _side) + (_internalBleeding)) min 1)]; + if (((random 100) < (linearConversion [0, 1, (_hemoState select _side), 5, 75, true])) && GVAR(PneumothoraxArrest)) then { + private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; + if !("hemo" in _ht) then { + _ht pushBack "hemo"; + _unit setVariable [QEGVAR(circulation,ht), _ht, true]; + if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; + }; + }; + }; + _unit setVariable [QGVAR(hemopneumothorax), _hemoState, true]; + }, (3 * random [0.8, 1, 1.2]), [_unit, _side]] call CBA_fnc_addPerFrameHandler; +}, [_unit, _side], (3 * random [0.8, 1, 1.2]) ] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_handleHemothoraxTreatment.sqf b/addons/breathing/functions/fnc_handleHemothoraxTreatment.sqf new file mode 100644 index 000000000..e5cb1cfbb --- /dev/null +++ b/addons/breathing/functions/fnc_handleHemothoraxTreatment.sqf @@ -0,0 +1,56 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Handle pneumothorax deterioration + * + * Arguments: + * 0: Unit + * 1: Deterioration chance increase + * + * Return Value: + * None + * + * Example: + * [player, 15] call kat_breathing_fnc_handlePneumothoraxTreatment; + * + * Public: No + */ + +params ["_unit", "_side"]; + +[{ + params ["_unit", "_side"]; + + private _hemo = _unit getVariable [QGVAR(hemopneumothorax), [0, 0]]; + private _currentVol = _hemo select _side; + + if (_currentVol <= 0) exitWith {}; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit", "_side"]; + + private _hemo = _unit getVariable [QGVAR(hemopneumothorax), [0, 0]]; + private _drain = _unit getVariable [QGVAR(drainRate), [0, 0]]; + private _val = _hemo select _side; + if (!alive _unit || (_val <= 0 && (INTERNAL_BLEEDING_RATE(_unit,2) == 0))) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _drain set [_side, 0]; + _unit setVariable [QGVAR(drainRate), _drain, true]; + private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; + _ht deleteAt (_ht find "hemo"); + _unit setVariable [QEGVAR(circulation,ht), _ht, true]; + }; + private _baseDrain = GVAR(chestTubeDrainAmount) * 0.001; + private _pressureFactor = linearConversion [0, 1, _val, 0.4, 1.2, true]; + private _drainAmount = _baseDrain * _pressureFactor; + private _newVal = _val - _drainAmount; + if (_newVal < 0.01) then { _newVal = 0; }; + _hemo set [_side, _newVal]; + _unit setVariable [QGVAR(hemopneumothorax), _hemo, true]; + _drain set [_side, _drainAmount]; + _unit setVariable [QGVAR(drainRate), _drain, true]; + + }, (3 * random [0.8, 1, 1.2]), [_unit, _side]] call CBA_fnc_addPerFrameHandler; + +}, +[_unit, _side], (3 * random [0.8, 1, 1.2])] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf b/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf index 0f9639ad6..3c47a13b4 100644 --- a/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf +++ b/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf @@ -16,59 +16,70 @@ * Public: No */ -params ["_unit", "_chanceIncrease"]; +params ["_unit", "_side"]; [{ - params ["_unit", "_chanceIncrease"]; + params ["_unit", "_side"]; - if (_unit getVariable [QGVAR(pneumothorax), 0] > 0) then { + private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; // Default: [0, 0] for both sides + + if ((_pneumothoraxState select 0 > 0) || (_pneumothoraxState select 1 > 0)) then { // Try to deteriorate at set interval [{ - params ["_args", "_idPFH"]; - _args params ["_unit", "_chanceIncrease"]; - - private _breathing = !(_unit getVariable [QEGVAR(airway,occluded), false]) && !(_unit getVariable [QEGVAR(airway,obstruction), false]) && (GET_HEART_RATE(_unit) > 20); - // If patient is dead, already treated or has already deteriorated into advanced pneumothorax, kill the PFH - if (_unit getVariable [QGVAR(hemopneumothorax), false] || _unit getVariable [QGVAR(tensionpneumothorax), false] || !(alive _unit) || _unit getVariable [QGVAR(pneumothorax), 0] isEqualTo 0) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - if (floor (random 100) < GVAR(deterioratingPneumothorax_chance) && _breathing) then { - private _ptxTarget = (_unit getVariable [QGVAR(pneumothorax), 0]) + 1; - // Once deteriorated far enough try to inflict advanced pneumothorax or if disabled kill the PFH - if (_ptxTarget > 4) exitWith { + params ["_args", "_idPFH"]; + _args params ["_unit", "_side"]; - if (GVAR(PneumothoraxArrest)) then { - [{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; + private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; + private _airway = HAS_AIRWAY(_unit); + private _activeChestSeal = (_unit getVariable [QGVAR(activeChestSeal), [false, false]]) select _side; + private _breathing = ((_airway) && ((GET_BREATHING_RATE(_unit) > 5) || (_unit getVariable [QEGVAR(breathing,BVMInUse), false]) || (_unit getVariable [QEGVAR(breathing,attachedVent), false]))); + if (_pneumothoraxState select _side > 0) then { + // If patient is dead, treated, or already deteriorated to advanced pneumothorax, kill the PFH + if (!(alive _unit) || + (_pneumothoraxState select _side isEqualTo 0) || (_activeChestSeal) || (_pneumothoraxState select _side isEqualTo 16)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; - if ((_unit getVariable [QGVAR(pneumothorax), 0]) == 4) then { - private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; - if ((_ht findIf {_x isEqualTo "tension"}) == -1) then { - _ht pushBack "tension"; + if (floor (random 100) < GVAR(deterioratingPneumothorax_chance) && _breathing) then { + private _ptxTarget = (_pneumothoraxState select _side) + 1; + if ((_ptxTarget % 4) == 0) then { + if ((random 100 < 30) && GVAR(PneumothoraxArrest)) then { + [{ + params ["_unit"]; if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; - - _unit setVariable [QEGVAR(circulation,ht), _ht, true]; - }; + }, [_unit], GVAR(arrestPneumothorax_interval)] call CBA_fnc_waitAndExecute; }; - }, [_unit], GVAR(arrestPneumothorax_interval)] call CBA_fnc_waitAndExecute; - }; - - if (GVAR(advPtxEnable)) then { - [_unit, _chanceIncrease, true] call FUNC(inflictAdvancedPneumothorax); + [_unit, _side, true] call FUNC(inflictAdvancedPneumothorax); + + }; + if (_ptxTarget > 16) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _baroMult = 1; + if (EGVAR(hypothermia,baroPressureEnable)) then { + private _altitude = (getPosASL _unit) select 2; + if (EGVAR(hypothermia,useACEpressure)) then { + private _hPa = _altitude call ACEFUNC(weather,calculateBarometricPressure); + private _baroPressure = _hPa * 0.750062; + private _defaulthPa = 0 call ACEFUNC(weather,calculateBarometricPressure); + private _defaultbaroPressure = _defaulthPa * 0.750062; + _baroMult = _baroPressure / _defaultBaroPressure; + } else { + private _baroPressure = 760 * exp((-(_altitude)) / 8400); + private _defaultBaroPressure = 760 * exp((-(0)) / 8400); + _baroMult = _baroPressure / _defaultBaroPressure; + }; + }; + private _delay = (GVAR(deterioratingPneumothorax_interval) * _baroMult) * random [0.8, 1, 1.3]; + [_idPFH, _delay] call CBA_fnc_setPerFrameHandlerDelay; + _pneumothoraxState set [_side, _ptxTarget]; + _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; }; - - [_idPFH] call CBA_fnc_removePerFrameHandler; }; - - _unit setVariable [QGVAR(pneumothorax), _ptxTarget, true]; - [_unit, 0.5 * (_ptxTarget / 4)] call ACEFUNC(medical_status,adjustPainLevel); // Adjust pain based on severity - [_unit, -12, -12, "ptx_tension"] call EFUNC(circulation,updateBloodPressureChange); // Simulate low blood pressure and high heart rate caused by pneumothorax - }; - }, GVAR(deterioratingPneumothorax_interval), [_unit, _chanceIncrease]] call CBA_fnc_addPerFrameHandler; + }, GVAR(deterioratingPneumothorax_interval), [_unit, _side]] call CBA_fnc_addPerFrameHandler; }; -}, [_unit, _chanceIncrease], GVAR(deterioratingPneumothorax_interval)] call CBA_fnc_waitAndExecute; \ No newline at end of file +}, [_unit, _side], GVAR(deterioratingPneumothorax_interval)] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_handlePneumothoraxTreatment.sqf b/addons/breathing/functions/fnc_handlePneumothoraxTreatment.sqf new file mode 100644 index 000000000..7a221ab70 --- /dev/null +++ b/addons/breathing/functions/fnc_handlePneumothoraxTreatment.sqf @@ -0,0 +1,72 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Handle pneumothorax deterioration + * + * Arguments: + * 0: Unit + * 1: Deterioration chance increase + * + * Return Value: + * None + * + * Example: + * [player, 15] call kat_breathing_fnc_handlePneumothoraxTreatment; + * + * Public: No + */ + +params ["_unit", "_chanceIncrease", "_side"]; + +[{ + params ["_unit", "_chanceIncrease", "_side"]; + + private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; // Default: [0, 0] for both sides + + if ((_pneumothoraxState select _side > 0)) then { + // Try to deteriorate at set interval + [{ + + params ["_args", "_idPFH"]; + _args params ["_unit", "_chanceIncrease", "_side"]; + + private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; + if (_pneumothoraxState select _side != 0) then { + // If patient is dead, treated, or already deteriorated to advanced pneumothorax, kill the PFH + if (!(alive _unit)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + if ((floor (random 100) < 50)) then { + private _ptxTarget = (_pneumothoraxState select _side) - 1; + if (_ptxTarget < 0) exitWith { + if (GVAR(clearChestSealAfterTreatment)) then { + private _activeChestSeal = _unit getVariable [QGVAR(activeChestSeal), [false, false]]; + _activeChestSeal set [_side, false]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _baroMult = 1; + if (EGVAR(hypothermia,baroPressureEnable)) then { + private _altitude = (getPosASL _unit) select 2; + if (EGVAR(hypothermia,useACEpressure)) then { + private _hPa = _altitude call ACEFUNC(weather,calculateBarometricPressure); + private _baroPressure = _hPa * 0.750062; + private _defaulthPa = 0 call ACEFUNC(weather,calculateBarometricPressure); + private _defaultbaroPressure = _defaulthPa * 0.750062; + _baroMult = _baroPressure / _defaultBaroPressure; + } else { + private _baroPressure = 760 * exp((-(_altitude)) / 8400); + private _defaultBaroPressure = 760 * exp((-(0)) / 8400); + _baroMult = _baroPressure / _defaultBaroPressure; + }; + }; + private _delay = (GVAR(chestSealTreatmentLoopTime) * _baroMult) * random [0.8, 1, 1.3]; + _pneumothoraxState set [_side, _ptxTarget]; + _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; + }; + }; + }, GVAR(chestSealTreatmentLoopTime), [_unit, _chanceIncrease, _side]] call CBA_fnc_addPerFrameHandler; + }; +}, [_unit, _chanceIncrease, _side], GVAR(chestSealTreatmentLoopTime)] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_hasBVM.sqf b/addons/breathing/functions/fnc_hasBVM.sqf index 6393921ba..3a053e83d 100644 --- a/addons/breathing/functions/fnc_hasBVM.sqf +++ b/addons/breathing/functions/fnc_hasBVM.sqf @@ -17,4 +17,4 @@ params ["_patient"]; -_patient getVariable [QGVAR(BVM), false] || _patient getVariable [QGVAR(pocketBVM), false]; +_patient getVariable [QGVAR(attachedBVM), false]; diff --git a/addons/breathing/functions/fnc_hasSurgicalAirway.sqf b/addons/breathing/functions/fnc_hasSurgicalAirway.sqf new file mode 100644 index 000000000..8f5044f2c --- /dev/null +++ b/addons/breathing/functions/fnc_hasSurgicalAirway.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Battlekeeper, modified by YetheSamartaka, Tomcat and Blue + * Handles listening to lungs. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * Return Value: + * None + * + * Example: + * [player, cursorTarget, 1] call kat_breathing_fnc_listenLungs; + * + * Public: No + */ + +params ["_patient"]; + +_hasSurgical = false; +_hasSurgical = _patient getVariable [QEGVAR(airway,airway_item), ""] isEqualTo "Surgical_Airway"; +_hasSurgical diff --git a/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf b/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf index fdc95a92e..1395f3b48 100644 --- a/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf +++ b/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf @@ -12,27 +12,23 @@ * None * * Example: - * [player, 15, false] call kat_breathing_fnc_inflictAdvancedPneumothorax; + * [player, 15, 1, false] call kat_breathing_fnc_inflictAdvancedPneumothorax; * * Public: No */ -params ["_unit", "_chanceIncrease", ["_deteriorated", false]]; - -// Prevent the patient from getting both hemothorax and tension pneumothorax at the same time -private _hemo = _unit getVariable [QGVAR(hemopneumothorax), false]; -private _tension = _unit getVariable [QGVAR(tensionpneumothorax), false]; - -// Roll chance to get advanced pneumothorax or skip chance if deteriorated -if ((floor (random 100) < (GVAR(advPtxChance) + _chanceIncrease) || _deteriorated) && !(_hemo || _tension)) then { +params ["_unit", "_side", ["_deteriorated", false]]; +TRACE_3("advanced PTX",_unit,_chanceIncrease,_side); +// Retrieve current state for the specified side +private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; +private _tensionState = _unit getVariable [QGVAR(tensionpneumothorax), [false, false]]; +if ((floor (random 100) < (GVAR(advPtxChance)) || _deteriorated) && !(_tensionState select _side)) then { [_unit, 0.7] call ACEFUNC(medical_status,adjustPainLevel); - - if (floor (random 100) < GVAR(hptxChance)) then { - _unit setVariable [QGVAR(hemopneumothorax), true, true]; - _unit setVariable [QGVAR(pneumothorax), 4, true]; - [_unit] call EFUNC(circulation,updateInternalBleeding); - } else { - _unit setVariable [QGVAR(tensionpneumothorax), true, true]; - _unit setVariable [QGVAR(pneumothorax), 4, true]; + _tensionState set [_side, true]; + _unit setVariable [QGVAR(tensionpneumothorax), _tensionState, true]; + private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "tension"}) == -1) then { + _ht pushBack "tension"; + _unit setVariable [QEGVAR(circulation,ht), _ht, true]; }; }; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_inspectChest.sqf b/addons/breathing/functions/fnc_inspectChest.sqf index 0d179cdeb..c6a43f52d 100644 --- a/addons/breathing/functions/fnc_inspectChest.sqf +++ b/addons/breathing/functions/fnc_inspectChest.sqf @@ -20,26 +20,27 @@ params ["_medic", "_patient"]; private _message = LLSTRING(inspectChest_normal); private _messageLog = LLSTRING(inspectChest_normal); - -private _hasPneumothorax = (_patient getVariable [QGVAR(pneumothorax), 0] > 0 || _patient getVariable [QGVAR(tensionpneumothorax), false] || _patient getVariable [QGVAR(hemopneumothorax), false]); -private _airwaySecure = (_patient getVariable [QEGVAR(airway,airway), false] && !(_patient getVariable [QEGVAR(airway,occluded), false])); -private _airwayClear = (!(_patient getVariable [QEGVAR(airway,obstruction), false]) || (_patient getVariable [QEGVAR(airway,obstruction), false] && _patient getVariable [QEGVAR(airway,overstretch), false])) && !(_patient getVariable [QEGVAR(airway,occluded), false]); +private _tension = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]]; +private _hemo = _patient getVariable [QGVAR(hemopneumothorax), [0, 0]]; +private _hasPneumothorax = (_patient getVariable [QGVAR(pneumothorax), [0, 0]] select 0 > 0 || _patient getVariable [QGVAR(pneumothorax), [0, 0]] select 1 > 0 || (_tension select 0) || (_tension select 1) || (_hemo select 0) || (_hemo select 1)); +private _airwayClear = HAS_AIRWAY(_patient); private _simpleSetting = (GVAR(inspectChest_enable) == 1); private _hintSize = 1.5; private _hintWidth = 10; -if (GET_HEART_RATE(_patient) isEqualTo 0) then { + +if (GET_BREATHING_RATE(_patient) isEqualTo 0) then { _message = LLSTRING(inspectChest_none); _messageLog = LLSTRING(inspectChest_none_log); - if (_hasPneumothorax && _airwaySecure) then { + if (_hasPneumothorax && _airwayClear) then { _hintSize = 2; if (_simpleSetting) then { _hintWidth = 13; private _type = LLSTRING(Pneumothorax); private _type_log = LLSTRING(Pneumothorax_short); - if (_patient getVariable [QGVAR(hemopneumothorax), false]) then { + if (((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select 0) > 0) || ((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select 1) > 0)) then { _type = LLSTRING(Hemopneumothorax); _type_log = LLSTRING(Hemopneumothorax_short); }; @@ -52,11 +53,10 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then { }; }; } else { - if (_hasPneumothorax && (_airwaySecure || _airwayClear)) then { - if (_patient getVariable [QGVAR(tensionpneumothorax), false] || _patient getVariable [QGVAR(hemopneumothorax), false]) then { - _message = LLSTRING(inspectChest_none); - _messageLog = LLSTRING(inspectChest_none_log); - } else { + if (_hasPneumothorax && _airwayClear) then { + private _tension = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]]; + private _hemo = _patient getVariable [QGVAR(hemopneumothorax), [0, 0]]; + if ((_tension select 0) || (_tension select 1) || ((_hemo select 0) > 0) || ((_hemo select 1) > 0)) then { _message = LLSTRING(inspectChest_unevenMovement); _messageLog = LLSTRING(inspectChest_unevenMovement); }; @@ -66,7 +66,7 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then { private _type = LLSTRING(Pneumothorax); private _type_log = LLSTRING(Pneumothorax_short); - if (_patient getVariable [QGVAR(hemopneumothorax), false]) then { + if (((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select 0) > 0) || ((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select 1) > 0)) then { _hintSize = 2.5; _type = LLSTRING(Hemopneumothorax); _type_log = LLSTRING(Hemopneumothorax_short); @@ -89,7 +89,7 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then { [_patient, "quick_view", LSTRING(inspectChest_log)] call EFUNC(circulation,removeLog); [_patient, "quick_view", LSTRING(inspectChest_log), [[_medic] call ACEFUNC(common,getName), _messageLog]] call ACEFUNC(medical_treatment,addToLog); -if (_patient getVariable [QGVAR(hemopneumothorax), false] && {!_simpleSetting}) then { +if ((((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select 0) > 0) || ((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select 1) > 0)) && {!_simpleSetting}) then { _message = format ["%1
%2", _message, LLSTRING(inspectChest_internalBleeding)]; [_patient, "quick_view", LSTRING(inspectChest_log), [[_medic] call ACEFUNC(common,getName), LLSTRING(inspectChest_internalBleeding)]] call ACEFUNC(medical_treatment,addToLog); }; diff --git a/addons/breathing/functions/fnc_listenHeart.sqf b/addons/breathing/functions/fnc_listenHeart.sqf new file mode 100644 index 000000000..1f9ceb1bb --- /dev/null +++ b/addons/breathing/functions/fnc_listenHeart.sqf @@ -0,0 +1,86 @@ +#include "..\script_component.hpp" +/* + * Author: Battlekeeper, modified by YetheSamartaka, Tomcat and Blue + * Handles listening to lungs. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * Return Value: + * None + * + * Example: + * [player, cursorTarget, 1] call kat_breathing_fnc_listenLungs; + * + * Public: No + */ + +params ["_medic","_patient"]; + +private _volume = GVAR(stethoscopeSoundVolume); + +soundPlaying = false; +variantDelay = 0; +[{ + params ["_args", "_idPFH"]; + _args params ["_medic","_patient","_volume"]; + + private _hr = GET_HEART_RATE(_patient); + if (!(_medic getVariable [QGVAR(usingStethoscope), false]) || !(alive _patient) || _hr isEqualTo 0 || (_patient getVariable [QACEGVAR(medical,inCardiacArrest), false])) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _tamponade = (_patient getVariable [QEGVAR(circulation,effusion), 0]); + + _heartDelay = _hr/180; + + if(!(soundPlaying)) then { + switch (_tamponade) do { + case 1: { + playSoundUI [QPATHTOF(audio\slow_2.wav), _volume, 1]; + variantDelay = 1; + soundPlaying = true; + [{ + params ["_medic","_patient"]; + soundPlaying = false; + }, [_medic,_patient], variantDelay + _heartDelay] call CBA_fnc_waitAndExecute; + }; + case 2: { + playSoundUI [QPATHTOF(audio\slow_2.wav), (_volume * 0.75), 1]; + variantDelay = 1; + soundPlaying = true; + [{ + params ["_medic","_patient"]; + soundPlaying = false; + }, [_medic,_patient], variantDelay + _heartDelay] call CBA_fnc_waitAndExecute; + }; + case 3: { + playSoundUI [QPATHTOF(audio\slow_2.wav), (_volume * 0.5), 1]; + variantDelay = 1; + soundPlaying = true; + [{ + params ["_medic","_patient"]; + soundPlaying = false; + }, [_medic,_patient], variantDelay + _heartDelay] call CBA_fnc_waitAndExecute; + }; + case 4: { + playSoundUI [QPATHTOF(audio\slow_2.wav), (_volume * 0.25), 1]; + variantDelay = 1; + soundPlaying = true; + [{ + params ["_medic","_patient"]; + soundPlaying = false; + }, [_medic,_patient], variantDelay + _heartDelay] call CBA_fnc_waitAndExecute; + }; + default { + playSoundUI [QPATHTOF(audio\norm_2.wav), _volume, 1]; + variantDelay = 1; + soundPlaying = true; + [{ + params ["_medic","_patient"]; + soundPlaying = false; + }, [_medic,_patient], variantDelay + _heartDelay] call CBA_fnc_waitAndExecute; + }; + }; + }; +}, 0, [_medic,_patient,_volume]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_listenLungs.sqf b/addons/breathing/functions/fnc_listenLungs.sqf index 9e1284284..48880dce4 100644 --- a/addons/breathing/functions/fnc_listenLungs.sqf +++ b/addons/breathing/functions/fnc_listenLungs.sqf @@ -6,17 +6,17 @@ * Arguments: * 0: Medic * 1: Patient - * + * 2: Side * Return Value: * None * * Example: - * [player, cursorTarget] call kat_breathing_fnc_listenLungs; + * [player, cursorTarget, 1] call kat_breathing_fnc_listenLungs; * * Public: No */ -params ["_medic","_patient"]; +params ["_medic","_patient","_side"]; if (GET_HEART_RATE(_patient) isEqualTo 0) exitWith {}; @@ -26,24 +26,23 @@ soundPlaying = false; variantDelay = 0; [{ params ["_args", "_idPFH"]; - _args params ["_medic","_patient","_volume"]; + _args params ["_medic","_patient","_volume","_side"]; - private _HR = GET_HEART_RATE(_patient); + private _BR = GET_BREATHING_RATE(_patient); - if (!(_medic getVariable [QGVAR(usingStethoscope), false]) || !(alive _patient) || _HR isEqualTo 0) exitWith { + if (!(_medic getVariable [QGVAR(usingStethoscope), false]) || !(alive _patient) || _BR isEqualTo 0) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; + private _tension = ((_patient getVariable [QGVAR(tensionpneumothorax), [false, false]]) select _side) || (((_patient getVariable [QGVAR(pneumothorax), [0,0]]) select _side) > 0); + private _hemo = (_patient getVariable [QGVAR(hemopneumothorax), [0, 0]]) select _side; - private _tension = (_patient getVariable [QGVAR(tensionpneumothorax), false] || (_patient getVariable [QGVAR(pneumothorax), 0] > 0)); - private _hemo = _patient getVariable [QGVAR(hemopneumothorax), false]; - - _breathDelay = 20/_HR; + _breathDelay = _BR/60; _random = round random 1; private _type = 3; - if(_hemo && _random >= 0.5) then {_type = 1}; + if((_hemo > 0.3) && _random >= 0.5) then {_type = 1}; if(_tension && _random >= 0.5) then {_type = 2}; if(!(soundPlaying)) then { @@ -125,4 +124,4 @@ variantDelay = 0; }; }; }; -}, 0, [_medic,_patient,_volume]] call CBA_fnc_addPerFrameHandler; +}, 0, [_medic,_patient,_volume,_side]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf index e093b62ee..7a052c90e 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf @@ -21,9 +21,9 @@ * Public: No */ -params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; +params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem", "_side"]; [_patient, _usedItem] call ACEFUNC(medical_treatment,addToTriageCard); [_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call ACEFUNC(medical_treatment,addToLog); -[QGVAR(chestSealLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent; +[QGVAR(chestSealLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf index 5cde0d273..49950c586 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf @@ -16,18 +16,13 @@ * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", "_side"]; -if (GVAR(clearChestSealAfterTreatment)) then { - if (_patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then { - _patient setVariable [QGVAR(activeChestSeal), true, true]; - }; -} else { - _patient setVariable [QGVAR(activeChestSeal), true, true]; -}; -_patient setVariable [QGVAR(deepPenetratingInjury), false, true]; -_patient setVariable [QGVAR(pneumothorax), 0, true]; +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +_activeChestSeal set [_side, true]; +_patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; +private _deepPenetratingInjury = _patient getVariable [QGVAR(deepPenetratingInjury), [false, false]]; +_deepPenetratingInjury set [_side, false]; +_patient setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; +[_patient, 0, _side] call FUNC(handlePneumothoraxTreatment); -if (!(_patient getVariable [QGVAR(hemopneumothorax), false]) && !(_patient getVariable [QGVAR(tensionpneumothorax), false])) then { - [_patient, 0, 0, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange); -}; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf new file mode 100644 index 000000000..cdacf6d84 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Ends the treatment cycle for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call ka__breathing_treatmentAdvanced_chestTube + + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +[QGVAR(chestTube), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf new file mode 100644 index 000000000..5fc4571df --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Local call to check if a patient has a chest Tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: chestTube Status + * 3: Side + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorObject, 3.1, 1] call kat_breathing_treatmentAdvanced_chestTubeCheck + * + * Public: No + */ + +params ["_medic", "_patient", "_number", "_side"]; +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveChestTube = _chestTubeArray select _side; + +if ((_number == 5) && (_liveChestTube == 0)) exitWith {true}; +if ((_number != 5) && (_liveChestTube > 0) && (_liveChestTube < 1)) exitWith {true}; + +false diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf new file mode 100644 index 000000000..f3419b068 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Starts the surgical process for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeIncision + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +[QGVAR(chestTubeIncision), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf new file mode 100644 index 000000000..95492b97f --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf @@ -0,0 +1,101 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call to start the surgical process for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeIncisionLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +if (GVAR(chestTube_ConsciousnessRequirement) == 1 && !(IS_UNCONSCIOUS(_patient))) exitWith { + private _output = LLSTRING(chest_tube_fail); + [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}; +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; +private _fentanylEffectiveness = 0; +private _ketamineEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select 2; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; + } forEach _medStack; + if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + (_localAnesthesia <= 0.8) + ) then { + [_patient, [0.7, 0.8, 0.9] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + }; + +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveTube = _chestTubeArray select _side; + +_liveTube = _liveTube + 0.1; +_chestTubeArray set [_side, _liveTube]; +_patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; + +[_patient, false] call ACEFUNC(dragging,setCarryable); +[_patient, false] call ACEFUNC(dragging,setDraggable); + +[_patient, "quick_view", LSTRING(incision_log), [[_medic] call ACEFUNC(common,getName), STRING_BODY_PARTS select 2]] call ACEFUNC(medical_treatment,addToLog); + +[{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_side"]; + + private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; + private _liveTube = _chestTubeArray select _side; + private _count = [_patient, "Etomidate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + + private _alive = alive _patient; + + if ((!_alive) || (_liveTube == 0)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _patient setVariable [QGVAR(etomidate_Pain), false] + }; + _activeLoadingDose = _patient getVariable [QEGVAR(pharma,activeEtomidateLoadingDose), false]; + + if (((GVAR(ChestTube_ConsciousnessRequirement) in [0,1]) && (!(IS_UNCONSCIOUS(_patient))) && (_count <= 0.2) && (_activeLoadingDose)) || (GVAR(Surgery_ConsciousnessRequirement) == 3 && _count <= 0.2 && (_activeLoadingDose))) exitWith { + if !(_patient getVariable [QGVAR(etomidate_Pain), false]) then { + [_patient, "Pain", 2, 10, 120, 0.6, 40] call ACEFUNC(medical_status,addMedicationAdjustment); + _patient setVariable [QGVAR(etomidate_Pain), true]}; + [_patient, true] call ACEFUNC(medical,setUnconscious); + }; + + if (GVAR(ChestTube_ConsciousnessRequirement) == 2 && _count <= 0.2) then { + if !(_patient getVariable [QGVAR(etomidate_Pain), false]) then { + [_patient, "Pain", 2, 10, 120, 0.6, 40] call ACEFUNC(medical_status,addMedicationAdjustment); + _patient setVariable [QGVAR(etomidate_Pain), true] + }; + }; +}, 5, [_patient, _side]] call CBA_fnc_addPerFrameHandler; + diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeKit.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeKit.sqf new file mode 100644 index 000000000..ccee571a4 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeKit.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Ends the treatment cycle for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTube + + * Public: No + */ + +params ["_medic", "_patient"]; + +[_medic, "kat_scalpel"] call ACEFUNC(common,addToInventory); +[_medic, "kat_clamp"] call ACEFUNC(common,addToInventory); +[_medic, "kat_retractor"] call ACEFUNC(common,addToInventory); +[_medic, "kat_chestTube"] call ACEFUNC(common,addToInventory); +[_medic, "kat_stitchKit"] call ACEFUNC(common,addToInventory); \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf new file mode 100644 index 000000000..247e0c3e1 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf @@ -0,0 +1,46 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhadcore + * Local call to remove hemothoraxes/tension pnumos after a placed chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveChestTube = _chestTubeArray select _side; + + +if (_liveChestTube == 0.7) exitWith { + _liveChestTube = 1; + + _chestTubeArray set [_side, _liveChestTube]; + _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; + [_patient, _side] call FUNC(handleHemothoraxTreatment); + private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; + if (_activeChestSeal select _side) then { + private _tensionPneumothorax = _patient getVariable [QGVAR(tensionPneumothorax), [false, false]]; + _tensionPneumothorax set [_side, false]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothorax, true]; + [_patient, 0, _side] call FUNC(handlePneumothoraxTreatment); + }; + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + _ht deleteAt (_ht find "tension"); + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; +}; + +private _output = LLSTRING(chest_tube_fail); +[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubePlacedCheck.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubePlacedCheck.sqf new file mode 100644 index 000000000..f50e9984c --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubePlacedCheck.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Local call to check if a patient has a chest Tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: chestTube Status + * 3: Side + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorObject, 3.1, 1] call kat_breathing_treatmentAdvanced_chestTubeCheck + * + * Public: No + */ + +params ["_medic", "_patient", "_number", "_side"]; +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveChestTube = _chestTubeArray select _side; +if (_number == _liveChestTube) exitWith {true}; + +false diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf new file mode 100644 index 000000000..0b4b9604e --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Progresses the treatment process for a Chest Tube + * Arguments: + * 0: Medic + * 1: Patient + * 2: Current Chest Tube Status + * 3: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "_entry", 1] call kat_breathing_treatmentAdvanced_chestTubeProgress; + * + * Public: No + */ + +params ["_medic", "_patient", "_entry", "_side"]; + +[QGVAR(chestTubeProgress), [_medic, _patient, _entry, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf new file mode 100644 index 000000000..a74f9ab88 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf @@ -0,0 +1,89 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Progresses the treatment process for a chest Tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Current Fracture Status + * 3: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 0.1, 1] call kat_breathing_fnc_treatmentAdvanced_chestTubeProgressLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_entry", "_side"]; + +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveTube = _chestTubeArray select _side; +private _surgeryString = ""; +private _number = _entry; + +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; +private _fentanylEffectiveness = 0; +private _ketamineEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select 2; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; + } forEach _medStack; + if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + (_localAnesthesia <= 0.8) + ) then { + [_patient, [0.7, 0.8, 0.9] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + }; +if (_number == 0.9) exitWith { + _surgeryString = LSTRING(ClosedIncision); + [_patient, "quick_view", LSTRING(ChestTube_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 2]] call ACEFUNC(medical_treatment,addToLog); + _chestTubeArray set [_side, 0]; + _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; + _patient setVariable [QGVAR(cricothyrotomy), 0, true]; +}; +if (_number == _liveTube) exitWith { + switch (_entry) do { + case (0.1):{ + _surgeryString = LSTRING(SPREAD); + }; + case (0.3):{ + _surgeryString = LSTRING(PREPARED); + }; + case (0.5):{ + _surgeryString = LSTRING(PLACED); + }; + }; + + [_patient, "quick_view", LSTRING(ChestTube_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 2]] call ACEFUNC(medical_treatment,addToLog); + + _liveTube = _liveTube + 0.2; + + _chestTubeArray set [_side, _liveTube]; + _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; +}; + +private _output = LLSTRING(chest_tube_fail); +[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf new file mode 100644 index 000000000..4707ab60e --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Treatment for hemopneumothorax/tensionPnumo + * Main function + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_breathing_fnc_treatmentAdvanced_fingerThoracostomy; + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +[_patient, "activity", LSTRING(FingerThoracostomy_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + +[QGVAR(fingerThoracostomyLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf new file mode 100644 index 000000000..01f309ffc --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf @@ -0,0 +1,89 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Treatment for hemopneumothorax/tensionPnumo + * Main function + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * call kat_breathing_fnc_treatmentAdvanced_fingerThoracostomyLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; +private _fentanylEffectiveness = 0; +private _ketamineEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select 2; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; + } forEach _medStack; + if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + (_localAnesthesia <= 0.8) + ) then { + [_patient, [0.7, 0.8, 0.9] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + }; +TRACE_5("FingerThora1",_fentanylEffectiveness,_ketamineEffectiveness,_nalbuphineEffectiveness,_morphineEffectiveness,_localAnesthesia); +if (random 100 <= 20) exitWith { + private _surface = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]); + private _surfaceArea = _surface - 60; + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea]; +}; +private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [0, 0]]; +_hemopneumothorax set [_side, (((_hemopneumothorax select _side) - 0.4) max 0)]; +_patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; +private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; +if ((_hemopneumothorax select _side) == 0) then { + _ht deleteAt (_ht find "hemo"); +}; +_patient setVariable [QEGVAR(circulation,ht), _ht, true]; +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [0, 0]]; + _hemopneumothorax set [_side, (((_hemopneumothorax select _side) - 0.4) max 0)]; + _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; + private _tensionPneumothorax = _patient getVariable [QGVAR(tensionPneumothorax), [false, false]]; + _tensionPneumothorax set [_side, false]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothorax, true]; + [_patient, 0, _side] call FUNC(handlePneumothoraxTreatment); + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + _ht deleteAt (_ht find "tension"); + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; +}; + +if ((_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side == 0) && + ((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select _side) == 0) && + !((_patient getVariable [QGVAR(tensionPneumothorax), [false, false]]) select _side)) then { + if (GVAR(clearChestSealAfterTreatment)) then { + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + }; +}; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf index 7bc0b13e1..13215fa76 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf @@ -21,9 +21,9 @@ * Public: No */ -params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; +params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem", "_side"]; [_patient, _usedItem] call ACEFUNC(medical_treatment,addToTriageCard); [_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call ACEFUNC(medical_treatment,addToLog); -[QGVAR(hemopneumothoraxLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent; +[QGVAR(hemopneumothoraxLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf index c7b6dbadf..b6e7ad339 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf @@ -17,20 +17,29 @@ * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", "_side"]; -if (_patient getVariable [QGVAR(activeChestSeal), false]) then { - _patient setVariable [QGVAR(hemopneumothorax), false, true]; - [_patient] call EFUNC(circulation,updateInternalBleeding); +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [0, 0]]; + _hemopneumothorax set [_side, 0]; + _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; + [_patient, 0, _side] call FUNC(handlePneumothoraxTreatment); }; private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; -_ht deleteAt (_ht find "tension"); + _ht deleteAt (_ht find "tension"); + _ht deleteAt (_ht find "hemo"); _patient setVariable [QEGVAR(circulation,ht), _ht, true]; -if ((_patient getVariable [QGVAR(pneumothorax), 0] == 0) && !(_patient getVariable [QGVAR(hemopneumothorax), false]) && !(_patient getVariable [QGVAR(tensionpneumothorax), false])) then { - [_patient, 0, 0, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange); +private _pneumothorax = _patient getVariable [QGVAR(pneumothorax), [0, 0]]; +private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [0, 0]]; + +if ((_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side == 0) && + ((_patient getVariable [QGVAR(hemopneumothorax), [0, 0]] select _side) == 0) && + !((_patient getVariable [QGVAR(tensionPneumothorax), [false, false]]) select _side)) then { if (GVAR(clearChestSealAfterTreatment)) then { - _patient setVariable [QGVAR(activeChestSeal), false, true]; + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; }; -}; +}; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_pulseoximeterLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_pulseoximeterLocal.sqf index 329d94ede..e192d4657 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_pulseoximeterLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_pulseoximeterLocal.sqf @@ -26,7 +26,12 @@ _patient setVariable [QGVAR(pulseoximeter), true, true]; _patient setVariable [QGVAR(PulseOximeter_VolumePatient), _medic getVariable QGVAR(PulseOximeter_Volume), true]; private _attachedPulseOximeter = _patient getVariable [QGVAR(PulseOximeter_Attached), [0,0]]; -_attachedPulseOximeter set [(ALL_BODY_PARTS find toLower _bodyPart)-2,1]; +if ((ALL_BODY_PARTS find toLower _bodyPart) == 4) then { + _attachedPulseOximeter set [0,1]; +}; +if ((ALL_BODY_PARTS find toLower _bodyPart) == 6) then { + _attachedPulseOximeter set [1,1]; +}; _patient setVariable [QGVAR(PulseOximeter_Attached), _attachedPulseOximeter, true]; [{ @@ -40,8 +45,10 @@ _patient setVariable [QGVAR(PulseOximeter_Attached), _attachedPulseOximeter, tru private _HR = GET_HEART_RATE(_patient); private _SpO2 = GET_KAT_SPO2(_patient); - - if (([_patient,_bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))) then { + private _bodyPartN = ALL_BODY_PARTS find _bodyPart; + private _isOccluded = [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck); + private _isDamaged = [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck); + if (_isOccluded || _isDamaged) then { _HR = 0; _SpO2 = 0; }; @@ -59,7 +66,9 @@ _patient setVariable [QGVAR(PulseOximeter_Attached), _attachedPulseOximeter, tru private _SpO2 = GET_KAT_SPO2(_patient); - if (([_patient,_bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))) then { + private _bodyPartN = ALL_BODY_PARTS find _bodyPart; + if (([_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck)) || [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck)) then { + _HR = 0; _SpO2 = 0; }; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_removePulseoximeter.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_removePulseoximeter.sqf index c7dc09c8f..9178cfcff 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_removePulseoximeter.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_removePulseoximeter.sqf @@ -22,7 +22,12 @@ _patient setVariable [QGVAR(pulseoximeter), false, true]; _medic setVariable [QGVAR(PulseOximeter_Volume), _patient getVariable QGVAR(PulseOximeter_VolumePatient), true]; private _attachedPulseOximeter = _patient getVariable [QGVAR(PulseOximeter_Attached), [0,0]]; -_attachedPulseOximeter set [(ALL_BODY_PARTS find toLower _bodyPart)-2,0]; +if ((ALL_BODY_PARTS find toLower _bodyPart) == 4) then { + _attachedPulseOximeter set [0,0]; +}; +if ((ALL_BODY_PARTS find toLower _bodyPart) == 6) then { + _attachedPulseOximeter set [1,0]; +}; _patient setVariable [QGVAR(PulseOximeter_Attached), _attachedPulseOximeter, true]; [_medic, "kat_Pulseoximeter", 1] call ACEFUNC(common,addToInventory); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf index c5911da88..4f7005173 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf @@ -21,9 +21,9 @@ * Public: No */ -params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; +params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem", "_side"]; [_patient, _usedItem] call ACEFUNC(medical_treatment,addToTriageCard); [_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call ACEFUNC(medical_treatment,addToLog); -[QGVAR(tensionpneumothoraxLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent; +[QGVAR(tensionpneumothoraxLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf index e1b42d999..70da505f2 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf @@ -17,19 +17,27 @@ * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", "_side"]; -if (_patient getVariable [QGVAR(activeChestSeal), false]) then { - _patient setVariable [QGVAR(tensionpneumothorax), false, true]; +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _tensionPneumothorax = _patient getVariable [QGVAR(tensionPneumothorax), [false, false]]; + _tensionPneumothorax set [_side, false]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothorax, true]; + [_patient, 0, _side] call FUNC(handlePneumothoraxTreatment); }; private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; -_ht deleteAt (_ht find "tension"); + _ht deleteAt (_ht find "tension"); _patient setVariable [QEGVAR(circulation,ht), _ht, true]; -if ((_patient getVariable [QGVAR(pneumothorax), 0] == 0) && !(_patient getVariable [QGVAR(hemopneumothorax), false]) && !(_patient getVariable [QGVAR(tensionpneumothorax), false])) then { - [_patient, 0, 0, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange); +if ((_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side > 0) && + !(_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select _side) && + !((_patient getVariable [QGVAR(tensionPneumothorax), [false, false]]) select _side)) then { + + if (GVAR(clearChestSealAfterTreatment)) then { - _patient setVariable [QGVAR(activeChestSeal), false, true]; + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; }; }; diff --git a/addons/breathing/functions/fnc_useBVM.sqf b/addons/breathing/functions/fnc_useBVM.sqf index 6682ca090..0442ba9f4 100644 --- a/addons/breathing/functions/fnc_useBVM.sqf +++ b/addons/breathing/functions/fnc_useBVM.sqf @@ -25,17 +25,73 @@ params ["_medic", "_patient", ["_pocket", false], ["_useOxygen", false], ["_oxygenOrigin", 0]]; _patient setVariable [QGVAR(BVMInUse), true, true]; - +_medic setVariable [QGVAR(isPerformingBVM), true, true]; GVAR(BVMTarget) = _patient; -GVAR(CPRCancel_EscapeID) = [0x01, [false, false, false], { +GVAR(BVMCancel_EscapeID) = [0x01, [false, false, false], { GVAR(BVMTarget) setVariable [QGVAR(BVMInUse), false, true]; }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; -GVAR(CPRCancel_MouseID) = [0xF0, [false, false, false], { +GVAR(BVMCancel_MouseID) = [0xF0, [false, false, false], { GVAR(BVMTarget) setVariable [QGVAR(BVMInUse), false, true]; }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; +GVAR(CPRDevice_Iterate) = [0xF1, [false, false, false], { + private _deviceCode = GVAR(BVMTarget) getVariable [QEGVAR(circulation,deviceCode), 0]; + _deviceCode = [(_deviceCode + 1), 1] select (_deviceCode == 2); + private _deviceArray = [true,(GVAR(BVMTarget) getVariable [QGVAR(pulseoximeter), false]),((GVAR(BVMTarget) getVariable [QEGVAR(circulation,DefibrillatorPads_Connected),false] && ((GVAR(BVMTarget) getVariable [QEGVAR(circulation,Defibrillator_Provider),[-1,-1,-1]] select 2) isEqualTo 'kat_X_AED')) || (GVAR(BVMTarget) getVariable [QEGVAR(circulation,AED_X_VitalsMonitor_Connected),false]))]; + while { !(_deviceArray select _deviceCode) } do { + _deviceCode = [0, (_deviceCode + 1)] select (_deviceCode < 2); + }; + GVAR(BVMTarget) setVariable [QEGVAR(circulation,deviceCode), _deviceCode, true]; + true +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + +[{ + params ["_args", "_idPFH"]; + _args params ["_medic", "_patient"]; + + private _deviceCode = _patient getVariable [QEGVAR(circulation,deviceCode), 0]; + + if !(_patient getVariable [QGVAR(BVMInUse), false]) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + GVAR(BVMDisplayActive) = false; + + "CPR_MONITOR" cutText ["", "PLAIN",0,true]; + _patient setVariable [QGVAR(deviceCode), 0, true]; + }; + + switch (true) do { + case (_deviceCode == 2): { + if ((_patient getVariable [QEGVAR(circulation,DefibrillatorPads_Connected),false] && ((_patient getVariable [QEGVAR(circulation,Defibrillator_Provider),[-1,-1,-1]] select 2) isEqualTo 'kat_X_AED')) || (_patient getVariable [QEGVAR(circulation,AED_X_VitalsMonitor_Connected),false])) then { + if !(GVAR(BVMDisplayActive)) then { + "CPR_MONITOR" cutText ["", "PLAIN",0,true]; + "CPR_MONITOR" cutRsc ["CPR_AED_X", "PLAIN", 0, true]; + GVAR(BVMDisplayActive) = true; + [_medic, GVAR(BVMTarget)] call EFUNC(circulation,AEDX_ViewMonitor_CPR); + }; + } else { + "CPR_MONITOR" cutText ["", "PLAIN",0,true]; + GVAR(BVMDisplayActive) = false; + }; + }; + case (_deviceCode == 1): { + if ((_patient getVariable [QGVAR(pulseoximeter), false])) then { + if !(GVAR(PulseOxDisplay)) then { + "CPR_MONITOR" cutText ["", "PLAIN",0,true]; + "CPR_MONITOR" cutRsc ["CPR_PulseOx", "PLAIN", 0, true]; + GVAR(PulseOxDisplay) = true; + [_medic, GVAR(BVMTarget)] call EFUNC(circulation,PulseOx_ViewMonitor); + }; + } else { + "CPR_MONITOR" cutText ["", "PLAIN",0,true]; + GVAR(PulseOxDisplay) = false; + }; + }; + case (_deviceCode == 0): { "CPR_MONITOR" cutText ["", "PLAIN"]; GVAR(PulseOxDisplay) = false; GVAR(BVMDisplayActive) = false;}; + }; +}, 2, [_medic, _patient]] call CBA_fnc_addPerFrameHandler; + ACEGVAR(medical_gui,pendingReopen) = false; // Prevent medical menu from reopening if (dialog) then { // If another dialog is open (medical menu) close it @@ -43,9 +99,8 @@ if (dialog) then { // If another dialog is open (medical menu) close it }; private _notInVehicle = isNull objectParent _medic; -totalProvided = 1; GVAR(BVM_loop) = false; - +totalProvided = 1; if (_notInVehicle) then { [_medic, "AinvPknlMstpSnonWnonDnon_AinvPknlMstpSnonWnonDnon_medic", 1] call ACEFUNC(common,doAnimation); GVAR(BVM_loop) = true; @@ -56,7 +111,7 @@ GVAR(BVM_timeOut) = true; [{ params ["_medic", "_patient", "_pocket", "_useOxygen", "_oxygenOrigin", "_notInVehicle"]; - [LLSTRING(UseBVM_PutAway), "", ""] call ACEFUNC(interaction,showMouseHint); + [LLSTRING(UseBVM_PutAway), LELSTRING(circulation,ChangeCPRDevice), ""] call ACEFUNC(interaction,showMouseHint); [LLSTRING(UseBVM_Start), 1.5, _medic] call ACEFUNC(common,displayTextStructured); [{ @@ -73,11 +128,12 @@ GVAR(BVM_timeOut) = true; _patient setVariable [QGVAR(BVMInUse), false, true]; _patient setVariable [QGVAR(oxygenTankConnected), false, true]; - + _medic setVariable [QGVAR(isPerformingBVM), false, true]; [] call ACEFUNC(interaction,hideMouseHint); - [GVAR(CPRCancel_EscapeID), "keydown"] call CBA_fnc_removeKeyHandler; - [GVAR(CPRCancel_MouseID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(BVMCancel_EscapeID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(BVMCancel_MouseID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(BVMDevice_Iterate), "keydown"] call CBA_fnc_removeKeyHandler; if (_notInVehicle) then { [_medic, "AinvPknlMstpSnonWnonDnon_medicEnd", 2] call ACEFUNC(common,doAnimation); @@ -96,6 +152,7 @@ GVAR(BVM_timeOut) = true; if (_useOxygen) then { _bvmType = format [LLSTRING(Activity_BVM_Oxygenated), _bvmType]; }; + [_patient, "activity", LSTRING(Activity_BVM), [[_medic, false, true] call ACEFUNC(common,getName), _bvmType, totalProvided]] call ACEFUNC(medical_treatment,addToLog); [LLSTRING(UseBVM_Cancelled), 1.5, _medic] call ACEFUNC(common,displayTextStructured); @@ -118,7 +175,7 @@ GVAR(BVM_timeOut) = true; }; } forEach magazinesAmmo _medic; - if (count _heldPreferredTanks > 0) then { + if (_heldPreferredTanks isNotEqualTo []) then { _carriedTanks = _heldPreferredTanks; }; } else { @@ -129,7 +186,7 @@ GVAR(BVM_timeOut) = true; } forEach magazinesAmmo _medic; }; - if (count _carriedTanks > 0) then { + if (_carriedTanks isNotEqualTo []) then { _patient setVariable [QGVAR(oxygenTankConnected), true, true]; private _tank = _carriedTanks select - 1; @@ -158,7 +215,7 @@ GVAR(BVM_timeOut) = true; }; } forEach (magazinesAmmoCargo _vehicle); - if (count _oxygenTanks > 0) then { + if (_oxygenTanks isNotEqualTo []) then { _patient setVariable [QGVAR(oxygenTankConnected), true, true]; private _tank = _oxygenTanks select - 1; @@ -183,15 +240,15 @@ GVAR(BVM_timeOut) = true; }; playSound3D [QPATHTOF_SOUND(audio\squeeze_BVM.ogg), _patient, false, getPosASL _patient, 8, 1, 15]; - + private _breathrate = GET_BREATHING_RATE(_patient); + private _bvmRate = 60/_breathrate; [{ // Squeeze BVM every 5 seconds params ["_patient"]; !(_patient getVariable [QGVAR(BVMInUse), false]); - }, {}, [_patient], 5, + }, {}, [_patient], _bvmRate, { GVAR(BVM_timeOut) = false; - totalProvided = totalProvided + 1; }] call CBA_fnc_waitUntilAndExecute; }; @@ -204,6 +261,7 @@ GVAR(BVM_timeOut) = true; !(_patient getVariable [QGVAR(BVMInUse), false]); }, {}, [_patient], 9, { GVAR(BVM_loop) = true; + totalProvided = totalProvided + 1; }] call CBA_fnc_waitUntilAndExecute; }; }, 0, [_medic, _patient, _pocket, _useOxygen, _oxygenOrigin, _notInVehicle]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_ventPFH.sqf b/addons/breathing/functions/fnc_ventPFH.sqf new file mode 100644 index 000000000..4146af486 --- /dev/null +++ b/addons/breathing/functions/fnc_ventPFH.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * vent PFH + * + * Arguments: + * 0: Medic + * + * Return Value: + * None + * + * Example: + * [player] call kat_breathing_fnc_ventPFH + * + * Public: No + */ + +params ["_unit"]; +private _inVehicle = ((IN_MED_VEHICLE(_unit)) || (IN_MED_FACILITY(_unit))); +private _attachedVent = _unit getVariable [QGVAR(attachedVent), false]; +if (!_inVehicle || !_attachedVent) exitWith { + _unit setVariable [QGVAR(attachedVent), false, true]; + _unit setVariable [QGVAR(attachedVentGUI), false, true]; +}; +[{ + params ["_unit"]; + playSound3D [QPATHTOF_SOUND(audio\squeeze_BVM.ogg), _unit, false, getPosASL _unit, 6, 1, 8]; + playSound3D [QPATHTOF_SOUND(audio\respiratorTone.ogg), _unit, false, getPosASL _unit, 6, 1, 8]; + _unit call FUNC(ventPFH); +}, [_unit], (_unit getVariable [QGVAR(ventRate), 2])] call CBA_fnc_waitAndExecute; diff --git a/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf b/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf index 33e0dc1f5..70f456cef 100644 --- a/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf +++ b/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf @@ -22,57 +22,62 @@ */ params ["_unit", "_allDamages"]; +if (_unit getVariable [QEGVAR(vitals,simpleMedical), false]) exitWith {_this}; (_allDamages select 0) params ["_engineDamage", "_bodyPart"]; // selection-specific -if !(GVAR(enable) && _bodyPart == "body") exitWith {_this}; +if !(GVAR(enable) && _bodyPart == "chest") exitWith {_this}; //Other mods can utilise KAT_Pneumothorax_Exclusion variable to prevent Pneumothorax from happening if (_engineDamage < GVAR(pneumothoraxDamageThreshold) || _unit getVariable ["KAT_Pneumothorax_Exlusion", false]) exitWith {_this}; private _chanceIncrease = 0; if (GVAR(pneumothoraxDamageThreshold_TakenDamage)) then { - _chanceIncrease = linearConversion [GVAR(pneumothoraxDamageThreshold), 3, _engineDamage, 0, 30, true]; + _chanceIncrease = linearConversion [GVAR(pneumothoraxDamageThreshold), 6, _engineDamage, 0, 30, true]; }; - +private _side = selectRandom [0, 1]; // Damage threshold passed & pneumothorax given -if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) exitWith { - private _hasTensionPneumothorax = _unit getVariable [QGVAR(tensionpneumothorax), false]; - private _initialPneumothorax = (_unit getVariable [QGVAR(pneumothorax), 0]) == 0; - - switch (true) do { - case (_hasTensionPneumothorax): { // fully deteriorate pneumothorax - _unit setVariable [QGVAR(pneumothorax), 4, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; - }; - case (_initialPneumothorax): { - // Set pain to at least 0.2 - [_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel); - - // add breathing sound - _unit setVariable [QGVAR(pneumothorax), 1, true]; - _unit setVariable [QGVAR(deepPenetratingInjury), true, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; - - // Start deteriorating after delay - [_unit, _chanceIncrease] call FUNC(handlePneumothoraxDeterioration); - }; - - case (GVAR(advPtxEnable)): { - // Roll chance to get advanced pneumothorax while afflicted with early stage of pneumothorax - [_unit, _chanceIncrease] call FUNC(inflictAdvancedPneumothorax); +if (floor (random 100) < (GVAR(hptxChance) + _chanceIncrease)) then { + private _amount = linearConversion [1, 9, _engineDamage, 1, 5, true]; + [_unit, _side, _amount] call FUNC(handleHemothoraxDeterioration); +}; +if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then { + private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; + private _deepPenetratingInjury = _unit getVariable [QGVAR(deepPenetratingInjury), [false, false]]; + private _activeChestSeal = _unit getVariable [QGVAR(activeChestSeal), [false, false]]; + private _tensionState = _unit getVariable [QGVAR(tensionpneumothorax), [false, false]]; + + if ((_pneumothoraxState select _side) isEqualTo 0 && !(_tensionState select _side)) then { + [_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel); + _pneumothoraxState set [_side, 1]; + _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; + _deepPenetratingInjury set [_side, true]; + _unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; + _activeChestSeal set [_side, false]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + + [_unit, _side] call FUNC(handlePneumothoraxDeterioration); + } else { + if (_tensionState select _side) then { + _pneumothoraxState set [_side, ((_pneumothoraxState select _side) + 4)]; + _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; + _activeChestSeal set [_side, false]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + } else { + [_unit, _side] call FUNC(inflictAdvancedPneumothorax); }; }; - - _this // return }; // Damage threshold was passed but no pneumothorax given, try to just give injury instead // No injury if (floor (random 100) >= GVAR(deepPenetratingInjuryChance)) exitWith {_this}; - -_unit setVariable [QGVAR(deepPenetratingInjury), true, true]; -_unit setVariable [QGVAR(activeChestSeal), false, true]; +private _deepPenetratingInjury = _unit getVariable [QGVAR(deepPenetratingInjury), [false, false]]; +private _activeChestSeal = _unit getVariable [QGVAR(activeChestSeal), [false, false]]; +_deepPenetratingInjury set [_side, true]; +_unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; +_activeChestSeal set [_side, false]; +_unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; // Check for tamponade diff --git a/addons/breathing/initSettings.inc.sqf b/addons/breathing/initSettings.inc.sqf index 3a40274d1..a55d34575 100644 --- a/addons/breathing/initSettings.inc.sqf +++ b/addons/breathing/initSettings.inc.sqf @@ -18,7 +18,7 @@ "'kat_mask_solr'", 1, { - private _array = [_this, "CfgGlasses"] call EFUNC(chemical,getList); + private _array = [_this, "CfgGlasses"] call FUNC(getList); missionNamespace setVariable [QGVAR(availOxyMaskList), _array, true]; }, true @@ -33,7 +33,7 @@ "'H_PilotHelmetFighter_B', 'H_PilotHelmetFighter_O', 'H_PilotHelmetFighter_I', 'H_PilotHelmetFighter_I_E'", 1, { - private _array = [_this, "CfgWeapons"] call EFUNC(chemical,getList); + private _array = [_this, "CfgWeapons"] call FUNC(getList); missionNamespace setVariable [QGVAR(availOxyHelmetList), _array, true]; }, true @@ -49,6 +49,24 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(enableVerboseBreathing), + "CHECKBOX", + [LLSTRING(SETTING_enableVerboseBreathing),LLSTRING(SETTING_enableVerboseBreathing_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(medLvl_VerboseBreathing), + "LIST", + [LLSTRING(medLvl_VerboseBreathing), LLSTRING(medLvl_VerboseBreathing_Desc)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + // Lethal SpO2 value [ QGVAR(SpO2_dieValue), @@ -218,6 +236,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(chestSealTreatmentLoopTime), + "SLIDER", + [LLSTRING(ChestSealLoopTime), LLSTRING(ChestSealLoopTime_desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [1, 120, 30, 1], + true +] call CBA_fnc_addSetting; + // Sets SpO2 level threshold for audible warning [ QGVAR(PulseOximeter_SpO2Warning), @@ -239,6 +266,7 @@ true ] call CBA_fnc_addSetting; + // % Chance of Hemopneumothorax and Tension Pneumothorax happening when a Pneumothorax happens [ QGVAR(advPtxChance), @@ -270,15 +298,17 @@ ] call CBA_fnc_addSetting; //Settable list for using Pulseoximeter per medical class + [ - QGVAR(medLvl_hemopneumothoraxTreatment), + QGVAR(medLvl_tensionpneumothoraxTreatment), "LIST", - [LLSTRING(HEMOPNEUMOTHORAX_TREATMENT_LEVEL), LLSTRING(HEMOPNEUMOTHORAX_TREATMENT_LEVEL_DESCRIPTION)], + [LLSTRING(TENSIONPNEUMOTHORAX_TREATMENT_LEVEL), LLSTRING(TENSIONPNEUMOTHORAX_TREATMENT_LEVEL_DESCRIPTION)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], - [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 1], true ] call CBA_fnc_addSetting; + //Damage Threshold for Pneumothorax [ QGVAR(pneumothoraxDamageThreshold), @@ -309,16 +339,6 @@ true ] call CBA_fnc_addSetting; -// Sets how much internal bleeding is applied while suffering from hemopneumothorax -[ - QGVAR(HPTXBleedAmount), - "SLIDER", - [LLSTRING(SETTING_HPTX_BleedAmount), LLSTRING(SETTING_HPTX_BleedAmount_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], - [0, 1, 0.06, 2], - true -] call CBA_fnc_addSetting; - //Chance for pneumothorax to deteriorate into tension pneumothorax [ QGVAR(deterioratingPneumothorax_chance), @@ -571,4 +591,89 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], [[0, 1, 2, 3], ["STR_ACE_Common_None", "STR_ACE_Common_Vehicle", "STR_ACE_Medical_Treatment_MedicalFacilities", "STR_ACE_Medical_Treatment_VehiclesAndFacilities"], 3], true -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting; + +[ + QGVAR(medLvl_FingerThoracostomyTreatment), + "LIST", + LLSTRING(SETTING_FingerThoracostomyTreatment_medLvl), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(incisionTime), + "SLIDER", + LLSTRING(INCISION_TIMER), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,10,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(ChestTubeintermediateTime), + "SLIDER", + [LLSTRING(INTERMEDIATE_TIMER), LLSTRING(INTERMEDIATE_TIMER_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,8,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(openTime), + "SLIDER", + LLSTRING(OPEN_TIMER), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,15,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(chestTubeAction_MedLevel), + "LIST", + LLSTRING(CHESTTUBE_ACTION_MEDLEVEL), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 2], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(chestTubeLocation), + "LIST", + LLSTRING(CHESTTUBE_LOCATION), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0,1,2,3],["STR_ACE_Common_Anywhere", "STR_ACE_Common_Vehicle", "STR_ACE_Medical_Treatment_MedicalFacilities", "STR_ACE_Medical_Treatment_VehiclesAndFacilities"],3], + true +] call CBA_fnc_addSetting; + +// 0 Surgery Causes Unconsciousness: If you do an incision (without anesthesia & sedative) patient will go into CA +// 1 Unconsciousness Required for Surgery: Surgery fails unless patient is unconscious, needs anesthesia +// 2 No Unconsciousness from Surgery: Patient can stay awake without anesthesia, causes pain +// 3 Surgery Anesthesia: The patient is able to stay awake through the entirety of the surgery. If Etomidate has not been applied, then the patient will go into CA. +[ + QGVAR(chestTube_ConsciousnessRequirement), + "LIST", + [LLSTRING(SETTING_ConsciousnessRequirement), LLSTRING(SETTING_ConsciousnessRequirement_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0, 1, 2, 3], [LLSTRING(SETTING_Causes_Unconsciousness), LLSTRING(SETTING_Unconsciousness_Required), LLSTRING(SETTING_No_Unconsciousness), LLSTRING(SETTING_Anesthesia)], 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(chestTubeDrainAmount), + "SLIDER", + [LLSTRING(chestTubeDrainAmount), LLSTRING(chestTubeDrainAmount_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,15,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(medLvl_Vent), + "LIST", + [LLSTRING(ALLOW_Vent), LLSTRING(TRAININGLEVEL_Vent)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Items)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; diff --git a/addons/breathing/stringtable.xml b/addons/breathing/stringtable.xml index f418ea6c4..d69877316 100644 --- a/addons/breathing/stringtable.xml +++ b/addons/breathing/stringtable.xml @@ -332,21 +332,7 @@ Staat geadvanceerde pneumothoraxen - hemopneumothorax en spanningspneumothorax - toe - Sets the chance for hemopneumothorax. Also sets the chance for tenstion pneumothorax (60% Hemo = 40% Tension) - Nastavuje šanci hemopneumotoraxu. Zároveň nastavuje šanci tenzního pneumotoraxu (60% Hemo = 40% Tenzní) - Règle la chance d'avoir un hémopneumothorax. Règle également la chance d'un pneumothorax sous tension (60% Hémo = 40% Tension) - Fija la probabilidad para Hemotórax y para Neumotórax a tensión (60% Hemo = 40% Tensión) - Imposta la probabilità per l'emopneumotorace. Imposta inoltre la probabilità per pneumotorace da tensione. (60% Emopn. = 40% Pneum. tensione) - Ustawia szansę na krwiaka opłucnej. \nPonadto ustawia szansę dla odmy prężnej (60% Krwiak = 40% Prężna) - Define a chance de hemotórax. Também define a chance de pneumotórax hipertensivo (60% Hemo = 40% Hipertensivo) - Определяет вероятность развития гемопневмоторакса. Также определяет вероятность развития напряженного пневмоторакса (60% Гемо = 40% напряжения) - Legt die Wahrscheinlichkeit für einen Hämatopneumothorax fest. Legt auch die Wahrscheinlichkeit auf einen Spannungspneumothorax fest(60 % Hämo = 40 % Spannungspneu - 혈기흉의 확률을 설정합니다. 또한 긴장성 기흉의 확률을 설정합니다. (혈기흉 60% = 긴장성 기흉 40%) - 血気胸の発生確率を設定します。緊張性気胸の発生確率も設定します (60% 血気胸 = 40% 緊張性) - 設定血氣胸的機率。同時設定張力性氣胸的機率(60%血氣胸= 40%張力性氣胸)。 - 设定血气胸的几率。同时设定张力性气胸的几率(60%血气胸= 40%张力性气胸)。 - Asettaa hemopneumotoraksin mahdollisuuden. Asettaa myös jännittyneen pneumotoraksin mahdollisuuden. (60% hemo = 40% jännitystä) - Legt de kans op een hemopneumothorax vast. Legt ook de kans voor spanningspneumothorax vast. (60% Hemo = 40% spanning) + Sets the chance for hemopneumothorax to develop, seperate from Pnuemothorax chances After reaching more than selected value (default 85), only then patient can get conscious @@ -418,7 +404,7 @@ Hemopneumothorax / spanningspneumothorax minimum behandelingsniveau - The minimum medical level required for someone to be able to perform the Needle Decompression and Drain Fluids treatment actions, used to treat Hemothorax or Tension Pneumothorax. + The minimum medical level required for someone to be able to perform the Needle Decompression and Drain Fluids treatment actions (With an AAT kit), used to treat Hemothorax or Tension Pneumothorax. Minimální úroveň zdravotnického výcviku potřebná k tomu, aby někdo mohl provést ošetření Dekompresní Jehlou, která je součástí AAT Sady a používá se k léčbě hemotoraxu či tenzního pneumotoraxu. Niveau médical minimum requis pour utiliser une aiguille de décompression et effectuer une aspiration des fluides, pour traiter un hémopneumothorax ou un pneumothorax sous tension El nivel médico mínimo requerido para que alguien pueda usar un AAT Kit, que se utiliza para tratar un hemotórax/neumotórax a tensión @@ -435,6 +421,12 @@ Vähimmäiskoulutustaso, joka vaaditaan, jotta joku pystyy suorittamaan neulan dekompression ja nesteenpoiston, jota käytetään hemothoraksin tai jännitysilmarintain hoitoon Het minimaal benodigde trainingsniveau voor het uitvoeren van de naalddecompressie- en vloeistof afvoerende handelingen, benodigd om een hemo- en spanningspneumothorax te behandelen + + Medical level to use a NCD kit + + + The minimum medical level required for someone to be able to perform the Needle Decompression (NCD) treatment actions, used to treat Tension Pneumothorax. + Hemopneumothorax Hemotorax @@ -2592,23 +2584,22 @@ AAT-laite AAT kit - - Auscultate Lung Sounds - Vyšetřit plíce poslechem - Ausculter les sons pulmonaires - Auscultar sonidos pulmonares - Auscultare i suoni polmonari - Osłuchaj płuca - Auscultar sons pulmonares - Выслушивайте легочные шумы - Lungengeräusche abhören - 폐음 청진 - 肺音を聴診 - 聽診肺音 - 听诊肺音 - Akciğer Seslerini Dinleyin - Kuuntele keuhkojen ääniä - Beluister de longen + + [KAM] General Items + [KAM] Obecné předměty + [KAM] Objets généraux + [KAM] Objetos Generales + [KAM] Oggetti generali + [KAM] Podstawowe przedmioty + [KAM] Itens gerais + [КАМ] Общие пункты + [KAM] Allgemeine Gegenstände + [KAM] 일반 아이템 + [KAM] 一般物資箱 + [KAM] 一般物品 + [KAM]一般项目 + [KAM] Yleiset kohteet + [KAM] Algemene items , slightly fruity @@ -2794,24 +2785,6 @@ Rintatiiviste Chest seal - - Drain Fluid - Odsát tekutiny - Aspirer le fluide - Drenar fluido - Drenare il liquido - Drenaż opłucnej - Drenar fluido - Слить жидкость - Flüssigkeit ablassen - 체액 배출 - 胸腔ドレナージ - 排出 胸腔積液 - 排出 胸腔液体 - Sıvıyı Boşaltın - Tyhjennä neste - Vloeistof afvoeren - 1x Hemopneumothorax 1x Hemopneumotorax @@ -3185,39 +3158,16 @@ Standaard staat deze optie uit. Wanneer dit aanstaat zal een spanningspneumothorax of een hemopneumothorax ook een pneumothorax tonen in het medische menu. - Needle Decompression (NCD Kit) - Dekompresní Jehla (NCD Kit) - Aiguille de décompression (NCD kit) - Descomprensión con aguja (Kit NCD) - Decompressione con ago (NCD Kit) - Igła dekompresyjna (NCD Kit) - Descompressão com Agulha (Kit NCD) - Декомпрессионная игла (NCD Набор) - Nadel Dekompression (NDK Kit) - 바늘 감압(NCD 키트) - 胸腔穿刺減圧 (NCDキット) - 針刺減壓(NCD套件) - 胸腔穿刺减压(NCD套件) - Neulan dekompressio (NCD Kit) - Naalddecompressie kit (ND kit) + Left Needle Decompression (NCD Kit) + + + Right Needle Decompression (NCD Kit) - Needle Decompression - Dekompresní Jehla - Aiguille de décompression - Descompresión con aguja - Decompressione con ago - Igła dekompresyjna - Descompressão com Agulha - Декомпрессия иглы - Nadel Dekompression - 바늘 감압 - 胸腔穿刺減圧 - 針刺減壓 - 胸腔穿刺减压 - İğne Dekompresyonu - Neulan dekompressio - Naalddecompressie + Left Needle Decompression + + + Right Needle Decompression 1x Tension Pneumothorax @@ -3255,5 +3205,399 @@ Hoito Behandelen + + Activate Hardcore Treatment options + + + Enables hardcore treatments including finger thoracostomies + + + Allow Finger Thoracostomies + + + %1 %2 the Chest Tube + + + %1 made an chest incision + + + Chest Tube Action Failed + + + Perform Left Side Incision + + + Perform Right Side Incision + + + Performing Incision + + + Expand Left Side Incision + + + Expand Right Side Incision + + + Expanding + + + Prepare Left Side Chest Tube + + + Prepare Right Side Chest Tube + + + Preparing Chest Tube + + + Place Left Side Chest Tube + + + Place Right Side Chest Tube + + + Placing Chest Tube + + + Spread + + + Prepared + + + Placed + + + Chest Tube Consciousness Controls + + + Surgery Causes Unconsciousness: Surgery without anesthesia and sedation results in unconsciousness from CA. \nUnconsciousness Required for Surgery: Surgery requires patient to be unconscious. \nNo Unconsciousness from Surgery: Surgery doesn't induce unconsciousness, causes pain. \nSurgery Anesthesia: Patient stays awake during surgery if given Etomidate, if not they will go into CA. + 手術で意識喪失する: 麻酔と鎮静剤を使用しないで手術すると、心停止が発生し意識喪失します。 \n手術に無意識を要求: 手術するには患者が意識を失っていることが必要になります。 \n手術による意識喪失なし: 手術で意識喪失しなくなりますが、痛みが発生します。 \n手術を麻酔下で行う: エトミデートを投与すると、手術中も患者が起きたままになります。投与しない場合は心停止します。 + La cirugía provoca inconsciencia: La cirugía sin anestesia ni sedación provoca inconsciencia por IC. \nInconsciencia necesaria para la cirugía: La cirugía requiere que el paciente esté inconsciente. \nLa cirugía no provoca inconsciencia: La cirugía no induce inconsciencia, causa dolor. \nAnestesia quirúrgica: El paciente permanece despierto durante la cirugía si se le administra etomidato. + La chirurgie provoque une perte de conscience: La chirurgie sans anesthésie ni sédation entraîne une perte de conscience due à l'arrêt cardiaque. \nInconscience requise pour la chirurgie: la chirurgie nécessite que le patient soit inconscient. \nPas d'inconscience due à la chirurgie: la chirurgie n'induit pas d'inconscience, elle provoque de la douleur. \nAnesthésie chirurgicale: le patient reste éveillé pendant la chirurgie s'il reçoit de l'étomidate. + 수술로 인해 의식불명 발생: 마취 및 진정제 없이 수술을 하면 심정지로 인해 의식을 잃습니다.\n수술에 필요한 의식불명: 수술을 하려면 환자가 의식을 잃어야 합니다.\n수술 중 의식불명 발생 없음: 수술이 의식불명을 유발시키지 않지만 통증을 발생시킵니다.\n수술 마취: 에토미데이트를 투여하면 환자는 수술 중 깨어 있게 됩니다. + Eine Operation führt zu Bewusstlosigkeit: Eine Operation ohne Anästhesie und Sedierung führt zu Bewusstlosigkeit aufgrund von CA. \nFür eine Operation ist Bewusstlosigkeit erforderlich: Bei einer Operation muss der Patient bewusstlos sein. \nKeine Bewusstlosigkeit durch eine Operation: Eine Operation führt nicht zur Bewusstlosigkeit, sondern verursacht Schmerzen. \nOperationsanästhesie: Der Patient bleibt während der Operation wach, wenn er Etomidat erhält. + A cirurgia causa inconsciência: A cirurgia sem anestesia e sedação resulta em inconsciência. \nInconsciência necessária para a cirurgia: A cirurgia requer que o paciente esteja inconsciente. \nSem inconsciência por cirurgia: A cirurgia não induz inconsciência, causa dor. \nAnestesia cirúrgica: O paciente permanece acordado durante a cirurgia se receber etomidato. + Leikkaus aiheuttaa tajuttomuuden: leikkaus ilman anestesiaa ja sedaatiota johtaa tajuttomuuteen sydämenpysähdyksestä. \nLeikkaukseen tarvitaan tajuttomuus: leikkaus ei aiheuta tajuttomuutta, aiheuttaa kipua. \nLeikkauksen anestesia: Potilas pysyy hereillä leikkauksen aikana, jos hänelle annetaan etomidaattia, jos ei, hän menettää sydämenpysähdyksen. + Операция вызывает потерю сознания: операция без анестезии или седативного средства приводит к потере сознания из-за остановки сердца. \nбессознательное состояние, необходимое для операции: операция требует, чтобы пациент был без сознания. \nнет бессознательного состояния из-за операции: операция не вызывает бессознательного состояния, она вызывает боль. \nхирургическая анестезия: пациент не спит во время операции, если ему вводят этомидат. + Operatie veroorzaakt bewustzijnsverlies: Operaties zonder anesthesie en sedatie lijdt tot bewustzijnsverlies door hartstilstand. \n Bewusteloosheid benodigd voor operatie: Operaties vereisen dat de patiënt bewusteloos is. \n Geen bewustzijnsverlies door operaties: Operaties lijden niet tot bewustzijnsverlies, maar veroorzaken pijn. \n Operatie met anesthesie: Patiënt blijft wakker tijdens de operatie als etomidaat gegeven is, anders lijdt de operatie tot een hartstilstand. + Una chirurgia causa incoscienza: Una chirurgia senza anestesia e sedazione porta all'incoscienza a causa di CA. \n Incoscienza richiesta per la chirurgia: Per la chirurgia, è necessario che il paziente sia incosciente. \n Nessuna incoscienza dalla chirurgia: La chirurgia non causa incoscienza, ma dolore. \n Anestesia chirurgica: Il paziente rimane sveglio durante l'intervento se gli viene somministrato Etomidato. + 手术导致昏迷:没有麻醉和镇静的手术会导致CA昏迷。\n手术需要昏迷:手术要求患者昏迷。\手术不会导致无意识:手术不会引起无意识,只会引起疼痛。\n手术麻醉:如果给予依托咪酯,患者在手术期间保持清醒,否则将进入CA。 + + + Surgery Causes Unconsciousness + 手術で意識喪失する + La cirugía causa inconsciencia + La chirurgie provoque une perte de conscience + 수술로 인해 의식불명 발생 + Eine Operation führt zu Bewusstlosigkeit + A cirurgia causa inconsciência + Leikkaus aiheuttaa tajuttomuuden + Хирургическое вмешательство приводит к потере сознания + Operatie veroorzaakt bewustijnsverlies + Chirurgia causa incoscienza + 手术导致昏迷 + + + Unconsciousness Required for Surgery + Se requiere inconsciencia para la cirugía + 手術に無意識を要求 + Nécessite un état inconscient + 수술에 필요한 의식불명 + Für die Operation ist Bewusstlosigkeit erforderlich + Inconsciência necessária para a cirurgia + Leikkaukseen tarvitaan tajuttomuus + Потеря сознания, необходимая для хирургического вмешательства + Bewusteloosheid + Incoscienza richiesta per la chirurgia + 手术需要昏迷 + + + No Unconsciousness from Surgery + 手術で意識喪失しない + No se pierde la consciencia por la cirugía + Pas d'inconscience due à la chirurgie + 수술 중 의식불명 발생 없음 + Keine Bewusstlosigkeit durch die Operation + Inconsciência não necessária para a cirurgia + Ei tajuttomuutta leikkauksesta + После операции никто не теряет сознание + Geen Bewustzijnsverlies door operaties + Nessuna incoscienza dalla chirurgia + 手术后无意识 + + + Surgery Anesthesia + 手术麻醉 + 手術を麻酔下で行う + Anestesia quirúrgica + Anesthésie chirurgicale + 수술 마취 + Chirurgische Anästhesie + Anestesia cirúrgica + Leikkauksen anestesia + Хирургическая анестезия + Operatie met anesthesie + Anestesia chirurgica + + + Locations to place a Chest Tube + + + Allow Chest Tube + + + Time to perform chest tube intermediate actions + + + Sets how long it takes to perform intermediate chest tube such as expanding and and preperation + + + Chest Tube Placement Time + + + Chest Tube Action Time + + + Perform Incision Time + + + Auscultate Left Lung Sounds + + + Auscultate Right Lung Sounds + + + Left Side Finger Thoracostomy + + + Right Side Finger Thoracostomy + + + Left Side Chest Tube + + + Right Side Chest Tube + + + Left Side Chest Seal + + + Right Side Chest Seal + + + %1 preformed a Finger Thoracostomy + + + Attach Ventilator + + + Attaching Ventilator + + + Detach Ventilator + + + Detaching Ventilator + + + Allow Ventilator + + + Medical Level to attach or detach Ventilator + + + Ventilator + + + Ventilator + + + %1 Attached a %2 + + + %1 Detached a %2 + + + Increase Ventilator Rate + + + Increasing Ventilator Rate + + + Decrease Ventilator Rate + + + Decreasing Ventilator Rate + + + Ventilator Rate is %1 Breaths Per Minute + + + BVM + + + Chest Seal Reduction Time + + + Time it takes per loop of the chest seal treatment + + + Open Chest Tube Kit + + + Opening Chest Tube Kit + + + Chest Tube + + + Auscultate Heart Sounds + + + Left Chest Tube + + + Left Incision + + + Left Incision Spread + + + Left Chest Tube Prepped + + + Left Chest Tube Placed + + + Right Chest Tube + + + Right Incision + + + Right Incision Spread + + + Right Chest Tube Prepped + + + Right Chest Tube Placed + + + Left Side + + + Right Side + + + %1 checked %2 Chest tube: %3 + + + Heavy Drainage Flow + + + Normal Drainage Flow + + + Slow Drainage Flow + + + Minimal Drainage Flow + + + Clear and Dry + + + Chest tube: Heavy Drainage Flow + + + Chest tube: Normal Drainage Flow + + + Chest tube: Slow Drainage Flow + + + Chest tube: Minimal Drainage Flow + + + Chest tube: Clear and Dry + + + Check Left Side Chest Tube + + + Check Right Side Chest Tube + + + Checking Chest Tube + + + Secure Left Side Chest Tube + + + Securing Chest Tube + + + Secure Right Side Chest Tube + + + Close Left Side Chest Tube Incision + + + Closing Chest Tube Incision + + + Close Right Side Chest Tube Incision + + + Closed Chest Tube Incision + + + Chest Tube Drain Amount + + + How much, In mLs, a Chest Tube drains per 5 seconds + + + Patient's breathing shows signs of Cheyne-Stokes + + + Patient's breathing is Irregular + + + Patient's breathing is agonal and slow + + + Patient's breathing is agonal and slow + + + Patient's breathing shows signs of Kussmaul's and is failing + + + Patient's breathing shows signs of Kussmaul's + + + Patient's breathing is in the start of respiratory failure + + + Patient's breathing is in established respiratory failure + + + Patient's breathing is in complete respiratory failure + + + Enable Verbose Check Breathing + + + Whether or not Check Breathing will tell you what the breathing state is exactly + + + Verbose Check Breathing Med Level + + + Med level for check breathing to tell you what the breathing state is + diff --git a/addons/breathing/ui/chestTube.paa b/addons/breathing/ui/chestTube.paa new file mode 100644 index 000000000..61102fc50 Binary files /dev/null and b/addons/breathing/ui/chestTube.paa differ diff --git a/addons/chemical/$PBOPREFIX$ b/addons/chemical/$PBOPREFIX$ deleted file mode 100644 index 1dcf022be..000000000 --- a/addons/chemical/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -x\kat\addons\chemical \ No newline at end of file diff --git a/addons/chemical/ACE_Medical_Treatment_Actions.hpp b/addons/chemical/ACE_Medical_Treatment_Actions.hpp deleted file mode 100644 index d3b32aca0..000000000 --- a/addons/chemical/ACE_Medical_Treatment_Actions.hpp +++ /dev/null @@ -1,12 +0,0 @@ -class ACE_Medical_Treatment_Actions { - class Diagnose; - class PutOnGasMask: Diagnose { - displayName = CSTRING(giveGasMask_action); - displayNameProgress = CSTRING(giveGasMask_progress); - allowedSelections[] = {"Head"}; - allowSelfTreatment = 0; - callbackSuccess = QFUNC(giveUnitGasMask); - condition = QUOTE([ARR_2(_player,_patient)] call FUNC(canPutGasMask)); - icon = QPATHTOF(ui\Gasmask_icon.paa); - }; -}; diff --git a/addons/chemical/CfgAmmo.hpp b/addons/chemical/CfgAmmo.hpp deleted file mode 100644 index 3e7892832..000000000 --- a/addons/chemical/CfgAmmo.hpp +++ /dev/null @@ -1,132 +0,0 @@ -class CfgAmmo { - - class SmokeShellArty; - class KAT_SmokeShellArty: SmokeShellArty { - smokeColor[] = {0,0,0,0}; - }; - - class Smoke_82mm_AMOS_White; - class Sh_82mm_AMOS_Type0: Smoke_82mm_AMOS_White { - KAT_projectile = 1; - KAT_lifetime = 90; - KAT_radius = 10; - KAT_toxicLvL = 1; - soundFakeFall[] = {"soundFakeFall0",0.25,"soundFakeFall1",0.25,"soundFakeFall2",0.25,"soundFakeFall3",0.25}; - soundFakeFall0[] = {"a3\Sounds_F\weapons\falling_bomb\fall_01.wss",3.16228,1,1000}; - soundFakeFall1[] = {"a3\Sounds_F\weapons\falling_bomb\fall_02.wss",3.16228,1,1000}; - soundFakeFall2[] = {"a3\Sounds_F\weapons\falling_bomb\fall_03.wss",3.16228,1,1000}; - soundFakeFall3[] = {"a3\Sounds_F\weapons\falling_bomb\fall_04.wss",3.16228,1,1000}; - whistleDist = 20; - whistleOnFire = 2; - submunitionAmmo = "KAT_SmokeShellArty"; - }; - - class Sh_82mm_AMOS_TypeCS: Sh_82mm_AMOS_Type0 { - KAT_projectile = 1; - KAT_lifetime = 60; - KAT_radius = 10; - KAT_toxicLvL = 0; //cs - }; - - class SmokeShell; - class KAT_G_M7A3: SmokeShell { - KAT_csGas = 1; - model = QPATHTOF(ui\m7a3_throw.p3d); - dangerRadiusHit = -1; - suppressionRadiusHit = 20; - typicalSpeed = 22; - cost = 40; - explosive = 1E-7; - deflecting = 15; - explosionTime = 4; - timeToLive = 20; - grenadeBurningSound[] = {}; - aiAmmoUsageFlags = "64"; // infantry - smokeColor[] = {0,0,0,0}; - effectsSmoke = "ACE_M84FlashbangEffect"; - whistleDist = 0; - grenadeFireSound[] = {}; - }; - - class APERSTripMine_Wire_Ammo; - class KAT_Gas_TripWireMine_Ammo: APERSTripMine_Wire_Ammo { - SoundSetExplosion[] = {}; - defaultMagazine = "KAT_Gas_TripWireMine_Mag"; //Mag that gets dropped after defuse - hit = 0; - indirectHit = 0; - indirectHitRange = 0; - soundHit[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3.wss",1.25893,1,100}; - explosionEffects = "KAT_TripWireGasEffect"; - CraterEffects = ""; - soundTrigger[] = {"",1,1}; - class CamShakeExplode { - power = 0; - duration = 0; - frequency = 0; - distance = 0; - }; - }; - - class KAT_GASTrip_SmokeEffect: SmokeShell { - triggerTime = 0.1; - ace_explosives_size = 0; - smokeColor[] = {0.671, 0.765, 0.184,1}; - }; - - class BombCore; - //class Bo_GBU12_LGB; - class BombCluster_01_Ammo_F; - class KAT_CAS_M43_Ammo: BombCluster_01_Ammo_F { - aiAmmoUsageFlags = 64 + 128 + 512; - allowAgainstInfantry = 1; - autoSeekTarget = 1; - canLock=1; - cameraViewAvailable = 1; - CraterEffects = "BombCrater"; - CraterWaterEffects = "ImpactEffectsWaterExplosion"; - cost = 0.1; - explosionTime = 2; - explosionForceCoef = 5; - explosive = 0.95; - ExplosionEffects = "BombExplosion"; - flightProfiles[] = {"LoalAltitude"}; - hit = 0; - indirectHit = 0; - indirectHitRange = 0; - irLock = 0; - laserLock = 1; - lightColor[] = {1, 0.15, 0, 1}; - maneuvrability = 16; - model = "\A3\Weapons_F\Ammo\Bomb_01_fly_F"; - nvLock = 1; - simulation = "shotMissile"; - soundFly[] = {"A3\Sounds_F\arsenal\weapons\launchers\RPG32\Fly_RPG32.wss",1,1,500}; - weaponLockSystem = 4; - weaponType = "Default"; - triggerDistance = 250; - triggerSpeedCoef[] = {0.8,1}; - submunitionAmmo="KAT_CAS_M43_Ammo_sub"; - class CamShakeExplode { - power = 20; - duration = 2; - frequency = 5; - distance = 250; - }; - }; - - class Mo_cluster_Bomb_01_F; - class KAT_CAS_M43_Ammo_sub: Mo_cluster_Bomb_01_F { - hit = 0; - indirectHit = 0; - indirectHitRange = 0; - explosionEffects = "KAT_GAS_ClusterExplosion"; - }; - - class R_80mm_HE; - class KAT_CAS_R_80mm_GAS_AMMO: R_80mm_HE { - hit = 0; - indirectHit = 0; - indirectHitRange = 0; - explosionEffects = "KAT_CAS_R_HYDRA_Explosion"; //HERocketExplosion - }; -}; diff --git a/addons/chemical/CfgCloudlets.hpp b/addons/chemical/CfgCloudlets.hpp deleted file mode 100644 index 1fac4e64c..000000000 --- a/addons/chemical/CfgCloudlets.hpp +++ /dev/null @@ -1,160 +0,0 @@ -class CfgCloudlets { - class Default; - class KAT_TripWireGas: Default { - lifeTime = 0; - beforeDestroyScript = QPATHTOF(functions\fnc_GasTripEffect.sqf); - }; - - class KAT_CAS_GAS_Explosion_FX_Script: Default { - lifeTime = 0; - beforeDestroyScript = QPATHTOF(functions\fnc_CASCreateGas.sqf); - }; - - class KAT_CAS_GAS_Explosion_FX: Default { - interval = 0.03; - circleRadius = 0; - circleVelocity[] = {0,0,0}; - particleFSNtieth = 16; - particleFSIndex = 7; - particleFSFrameCount = 48; - particleFSLoop = 1; - angleVar = 360; - particleShape = "\A3\data_f\ParticleEffects\Universal\Universal"; - particleType = "Billboard"; - timerPeriod = 1; - lifeTime = 3; - moveVelocity[] = {0,2,0}; - rotationVelocity = 0; - weight = 0.05; - volume = 0.04; - rubbing = 0.025; - size[] = {3,7,10}; - color[] = - { - {0.3,0.3,0.3,0}, - {0.3,0.3,0.3,0.2}, - {0.3,0.3,0.3,0.3}, - {0.3,0.3,0.3,0.3}, - {0.3,0.3,0.3,0.3}, - {0.3,0.3,0.3,0.32}, - {0.471, 0.565, 0.064,0.4}, - {0.571, 0.665, 0.084,0.3}, - {0.671, 0.765, 0.184,0.1}, - {0.671, 0.765, 0.184,0} - }; - animationSpeed[] = {0.5,0.3}; - randomDirectionPeriod = 0.2; - randomDirectionIntensity = 0.1; - onTimerScript = ""; - beforeDestroyScript = ""; - lifeTimeVar = 2.5; - positionVar[] = {0.2,0.2,0.2}; - moveVelocityVar[] = {1.8,1,1.8}; - rotationVelocityVar = 20; - sizeVar = 0.3; - colorVar[] = {0,0,0,0.3}; - randomDirectionPeriodVar = 0.2; - randomDirectionIntensityVar = 0.05; - coreIntensity = 0; - coreDistance = 0; - damageTime = 0; - damageType = ""; - angle = 0; - position[] = {0,0,0}; - }; - - class KAT_CAS_GAS_FX: Default { - interval = 0.03; - circleRadius = 0; - circleVelocity[] = {0,0,0}; - particleFSNtieth = 16; - particleFSIndex = 7; - particleFSFrameCount = 48; - particleFSLoop = 1; - angleVar = 360; - particleShape = "\A3\data_f\ParticleEffects\Universal\Universal.p3d"; - particleType = "Billboard"; - timerPeriod = 1; - lifeTime = 3; - moveVelocity[] = {1,0,1}; - rotationVelocity = 0; - weight = 0.05; - volume = 0.04; - rubbing = 0.025; - size[] = {1,3,4}; - color[] = - { - {0.3,0.3,0.3,0}, - {0.4,0.4,0.4,0.2}, - {0.371, 0.465, 0.044,0.3}, - {0.471, 0.565, 0.084,0.2}, - {0.671, 0.765, 0.184,0.1}, - {0.671, 0.765, 0.184,0} - }; - animationSpeed[] = {0.5,0.3}; - randomDirectionPeriod = 0.2; - randomDirectionIntensity = 0.1; - onTimerScript = ""; - beforeDestroyScript = ""; - lifeTimeVar = 2.5; - positionVar[] = {0,0,0}; - moveVelocityVar[] = {-1,0.5,-1}; - rotationVelocityVar = 20; - sizeVar = 0.3; - colorVar[] = {0,0,0,0.3}; - randomDirectionPeriodVar = 0.2; - randomDirectionIntensityVar = 0.05; - coreIntensity = 0; - coreDistance = 0; - damageTime = 0; - damageType = ""; - angle = 0; - position[] = {0,0.2,0}; - }; -}; - -class KAT_TripWireGasEffect { - class spawnGAS { - simulation = "particles"; - type = "KAT_TripWireGas"; - position = "explosionPos"; - }; -}; - -class KAT_GAS_ClusterExplosion { - class ExplosionEffect { - simulation = "particles"; - type = "KAT_CAS_GAS_Explosion_FX"; - position = "explosionPos"; - lifeTime = 2; - particleFSLoop = 1; - }; - class CAS_GAS_Effect { - simulation = "particles"; - type = "KAT_CAS_GAS_FX"; - position = "explosionPos"; - lifeTime = 240; - particleFSLoop = 1; - }; - class GAS_Script { - simulation = "particles"; - type = "KAT_CAS_GAS_Explosion_FX_Script"; - position = "explosionPos"; - }; -}; - -class KAT_CAS_R_HYDRA_Explosion { - class CAS_R_GAS_Effect { - simulation = "particles"; - type = "KAT_CAS_GAS_FX"; - position = "explosionPos"; - lifeTime = 240; - particleFSLoop = 1; - }; - class R_GAS_Script { - simulation = "particles"; - type = "KAT_CAS_GAS_Explosion_FX_Script"; - position = "explosionPos"; - }; -}; - diff --git a/addons/chemical/CfgGlasses.hpp b/addons/chemical/CfgGlasses.hpp deleted file mode 100644 index 17e002c4b..000000000 --- a/addons/chemical/CfgGlasses.hpp +++ /dev/null @@ -1,22 +0,0 @@ -class CfgGlasses -{ - class G_RegulatorMask_F; - class kat_mask_M50: G_RegulatorMask_F - { - author = "Assaultboy"; - displayname = "M50 Promask"; - model = QPATHTOF(models\kat_mask_m50.p3d); - picture = QPATHTOF(ui\maskM50.paa); - identityTypes[] = {}; - mass = 4; - - }; - - class kat_mask_M04: kat_mask_M50 - { - author = "Assaultboy"; - displayname = "M04 Promask"; - model = QPATHTOF(models\kat_mask_m04.p3d); - picture = QPATHTOF(ui\maskM04.paa); - }; -}; diff --git a/addons/chemical/CfgMagazineGroups.hpp b/addons/chemical/CfgMagazineGroups.hpp deleted file mode 100644 index 6fcc61888..000000000 --- a/addons/chemical/CfgMagazineGroups.hpp +++ /dev/null @@ -1,11 +0,0 @@ -//class ace_csw_groups; -class ace_csw_groups { - class KAT_1Rnd_82mm_Mo_Type0 { - KAT_1Rnd_82mm_Mo_Type0 = 1; - KAT_5Rnd_82mm_Mo_Type0_AI = 1; - }; - class KAT_1Rnd_82mm_Mo_TypeCS { - KAT_1Rnd_82mm_Mo_TypeCS = 1; - KAT_3Rnd_82mm_Mo_TypeCS_AI = 1; - }; -}; diff --git a/addons/chemical/CfgMagazines.hpp b/addons/chemical/CfgMagazines.hpp deleted file mode 100644 index f413164b3..000000000 --- a/addons/chemical/CfgMagazines.hpp +++ /dev/null @@ -1,89 +0,0 @@ -class CfgMagazines { - class ACE_1Rnd_82mm_Mo_HE; - class KAT_1Rnd_82mm_Mo_Type0: ACE_1Rnd_82mm_Mo_HE { - author="DiGii"; - ammo="Sh_82mm_AMOS_Type0"; - displayNameMFDFormat= CSTRING(ToxicGas_MFDNAME); - displayNameShort= CSTRING(ToxicGas_MFDNAME); - displayName= CSTRING(ToxicGas_DisplayName); - }; - class KAT_5Rnd_82mm_Mo_Type0_AI: KAT_1Rnd_82mm_Mo_Type0 { - scope = 1; - count = 5; - }; - class KAT_1Rnd_82mm_Mo_TypeCS: ACE_1Rnd_82mm_Mo_HE { - author="DiGii"; - ammo="Sh_82mm_AMOS_TypeCS"; - displayNameMFDFormat= CSTRING(CSGas_MFDNAME); - displayNameShort= CSTRING(CSGas_MFDNAME); - displayName= CSTRING(CSGas_DisplayName); - }; - class KAT_3Rnd_82mm_Mo_TypeCS_AI: KAT_1Rnd_82mm_Mo_TypeCS { - scope = 1; - count = 3; - }; - - class HandGrenade; - class KAT_M7A3: HandGrenade { - author = "DiGi"; - displayname = CSTRING(M7A3_CSGrenade_DisplayName); - descriptionShort = CSTRING(M7A3_DcsShort); - displayNameShort = CSTRING(M7A3_CSGrenade_ShortName); - model = QPATHTOF(ui\m7a3.p3d); - picture = QPATHTOF(ui\KAT_m7a3_ca.paa); - ammo = "KAT_G_M7A3"; - mass = 4; - }; - - class APERSTripMine_Wire_Mag; - class KAT_Gas_TripWireMine_Mag: APERSTripMine_Wire_Mag { - author = "DiGii"; - ammo = "KAT_Gas_TripWireMine_Ammo"; - ace_explosives_SetupObject = "ACE_Explosives_Place_APERSTripwireMine"; - displayName = CSTRING(TriWire_Gas_Name); - descriptionShort = CSTRING(TriWire_Gas_Desc); - class Library {libTextDesc = CSTRING(TriWire_Gas_Desc);}; - }; - - class Default; // External class reference - class VehicleMagazine; - class PylonMissile_Bomb_GBU12_x1; - class PylonRack_Bomb_GBU12_x2; - class KAT_CAS_M43_Mag: PylonMissile_Bomb_GBU12_x1 { - - ammo = "KAT_CAS_M43_Ammo"; - author = "DiGii"; - count = 1; - initSpeed = 0; - displayName = CSTRING(M43_DisplayName_1x); - displayNameShort = CSTRING(M43_ShortName_1x); - descriptionShort = CSTRING(M43_desc); - hardpoints[] = {"RHS_HP_KMGU2","RHS_HP_PTB1150","RHS_HP_JDAM_1000","RHS_HP_HELLFIRE_RACK","RHS_HP_BOMB_500","RHS_HP_LGB_500","I_GBU12","B_GBU12","B_BOMB_PYLON", "B_ASRAAM", "CUP_PylonPod_19Rnd_Rocket_FFAR_plane_M", "DAR","CUP_NATO_HELO_SMALL","CUP_NATO_HELO_LARGE","CUP_NATO_HELO_ROCKETS","CUP_19Rnd_FFAR", "RHS_HP_LONGBOW_RACK", "B_BOMB_FFAR21", "B_BOMB_FFAR7", "FIR_F16_Combined_HP","FIR_F16_AG_HP","FIR_FA18EF_Combined_HP","FIR_A10_BOMB_HP","FIR_AV8B_AG_HP","FIR_SH_AG_HP","FIR_BLUFOR_AG_HP","FIR_BLUFOR_Combined_HP","FIR_FA181E_AG_HP","FIR_F35B_Combined_HP","FIR_FA18_Combined_HP","RHS_HP_FFAR_ARMY","RHS_HP_FFAR_USMC","B_MISSILE_PYLON","B_AGM65_RAIL","I_AGM65_RAIL", "FIR_FA18_Wingtip_HP","FIR_F15E_AA_HP","FIR_F15C_AA_HP","FIR_F15A_AA_HP","FIR_F16_AA_HP","FIR_F16_Combined_HP","FIR_F2A_AA_HP","FIR_F2A_Combined_HP","FIR_BLUFOR_AA_HP","FIR_BLUFOR_Combined_HP", "FIR_F14_SW_LAU138_HP", "FIR_F14_AA_HP", "RHS_HP_INGWE", "RHS_HP_MELB_R", "RHS_HP_MELB","B_AH_99_PYLON","I_BOMB_PYLON","I_MISSILE_PYLON","RHS_HP_B8V20", "pook_SOV_AS18", "POOK_MIG25_CENTERLINE", "CUP_SUPER_PYLON","CUP_EAST_HELO_SMALL","CUP_EAST_HELO_LARGE","CUP_32Rnd_S5", "RHS_HP_INGWE", "RHS_HP_UB32","CUP_O_AA_MISSILE_PYLON","CUP_PylonPod_1Rnd_R73_Vympel", "FIR_OPFOR_Combined_HP","FIR_OPFOR_AG_HP","FIR_Su25_AG_HP","O_BOMB_PYLON","O_MISSILE_PYLON","O_KH25", "RHS_HP_9m120_Mi28", "pook_RPOD", "pook_BMB","pook_HELI_BMB", "pook_HELI_MISSILERACK", "POOK_GUNPOD","CUP_GSh23"}; - mass = 100; - pylonWeapon = "KAT_CAS_M43_Bomb"; - }; - - class KAT_CAS_M43_Mag_x2 : PylonRack_Bomb_GBU12_x2 { - ammo = "KAT_CAS_M43_Ammo"; - author = "DiGii"; - count = 2; - initSpeed = 0; - displayName = CSTRING(M43_DisplayName_2x); - displayNameShort = CSTRING(M43_ShortName_2x); - descriptionShort = CSTRING(M43_desc); - hardpoints[] = {"RHS_HP_KMGU2","RHS_HP_PTB1150","RHS_HP_JDAM_1000","RHS_HP_HELLFIRE_RACK","RHS_HP_BOMB_500","RHS_HP_LGB_500","I_GBU12","B_GBU12","B_BOMB_PYLON", "B_ASRAAM", "CUP_PylonPod_19Rnd_Rocket_FFAR_plane_M", "DAR","CUP_NATO_HELO_SMALL","CUP_NATO_HELO_LARGE","CUP_NATO_HELO_ROCKETS","CUP_19Rnd_FFAR", "RHS_HP_LONGBOW_RACK", "B_BOMB_FFAR21", "B_BOMB_FFAR7", "FIR_F16_Combined_HP","FIR_F16_AG_HP","FIR_FA18EF_Combined_HP","FIR_A10_BOMB_HP","FIR_AV8B_AG_HP","FIR_SH_AG_HP","FIR_BLUFOR_AG_HP","FIR_BLUFOR_Combined_HP","FIR_FA181E_AG_HP","FIR_F35B_Combined_HP","FIR_FA18_Combined_HP","RHS_HP_FFAR_ARMY","RHS_HP_FFAR_USMC","B_MISSILE_PYLON","B_AGM65_RAIL","I_AGM65_RAIL", "FIR_FA18_Wingtip_HP","FIR_F15E_AA_HP","FIR_F15C_AA_HP","FIR_F15A_AA_HP","FIR_F16_AA_HP","FIR_F16_Combined_HP","FIR_F2A_AA_HP","FIR_F2A_Combined_HP","FIR_BLUFOR_AA_HP","FIR_BLUFOR_Combined_HP", "FIR_F14_SW_LAU138_HP", "FIR_F14_AA_HP", "RHS_HP_INGWE", "RHS_HP_MELB_R", "RHS_HP_MELB","B_AH_99_PYLON","I_BOMB_PYLON","I_MISSILE_PYLON","RHS_HP_B8V20", "pook_SOV_AS18", "POOK_MIG25_CENTERLINE", "CUP_SUPER_PYLON","CUP_EAST_HELO_SMALL","CUP_EAST_HELO_LARGE","CUP_32Rnd_S5", "RHS_HP_INGWE", "RHS_HP_UB32","CUP_O_AA_MISSILE_PYLON","CUP_PylonPod_1Rnd_R73_Vympel", "FIR_OPFOR_Combined_HP","FIR_OPFOR_AG_HP","FIR_Su25_AG_HP","O_BOMB_PYLON","O_MISSILE_PYLON","O_KH25", "RHS_HP_9m120_Mi28", "pook_RPOD", "pook_BMB","pook_HELI_BMB", "pook_HELI_MISSILERACK", "POOK_GUNPOD","CUP_GSh23"}; - mass = 200; - pylonWeapon = "KAT_CAS_M43_Bomb"; - }; - - class PylonRack_19Rnd_Rocket_Skyfire; - class KAT_CAS_R_80mm_GAS_MAG: PylonRack_19Rnd_Rocket_Skyfire { - ammo = "KAT_CAS_R_80mm_GAS_AMMO"; - author = "DiGii"; - descriptionShort = CSTRING(HydraGas_desc); - displayName = CSTRING(HydraGas_DisplayName); - displayNameShort = CSTRING(HydraGas_ShortName); - pylonWeapon = "KAT_CAS_R_80mm_GAS_POD"; - hardpoints[] = {"RHS_HP_UPK23_KA52","RHS_HP_9m120_Mi28","RHS_HP_KH55SM_INT","RHS_HP_TU95MS6_INT","RHS_HP_FFAR_ARMY","RHS_HP_MELB","O_MISSILE_PYLON","O_SKYFIRE","B_MISSILE_PYLON","DAGR","DAR","B_SHIEKER","CUP_PylonPod_19Rnd_Rocket_FFAR_plane_M","CUP_NATO_HELO_ROCKETS","CUP_19Rnd_FFAR","B_AH_99_PYLON","CUP_SUPER_PYLON","CUP_32Rnd_S5","pook_RPOD","RHS_HP_FFAR_USMC", "RHS_HP_INGWE", "RHS_HP_MELB_R", "RHS_HP_MELB","RHS_HP_UB32","pook_HELI_BMB","pook_HELI_MISSILERACK"}; - }; -}; diff --git a/addons/chemical/CfgSounds.hpp b/addons/chemical/CfgSounds.hpp deleted file mode 100644 index b450407cc..000000000 --- a/addons/chemical/CfgSounds.hpp +++ /dev/null @@ -1,160 +0,0 @@ -class CfgSounds { - class GVAR(cough_0) { - name = QGVAR(cough_0); - sound[] = - { - QPATHTOF(audio\cough_0.ogg), - 2, - 1, - 10 - }; - titles[] = {}; - }; - class GVAR(cough_1) { - name = QGVAR(cough_1); - sound[] = - { - QPATHTOF(audio\cough_1.ogg), - 2, - 1, - 10 - }; - titles[] = {}; - }; - class GVAR(cough_2) { - name = QGVAR(cough_2); - sound[] = - { - QPATHTOF(audio\cough_2.ogg), - 2, - 1, - 10 - }; - titles[] = {}; - }; - class GVAR(cough_3) { - name = QGVAR(cough_3); - sound[] = - { - QPATHTOF(audio\cough_3.ogg), - 2, - 1, - 10 - }; - titles[] = {}; - }; - - class GVAR(mask_breath_1) { - name = QGVAR(mask_breath_1); - sound[] = - { - QPATHTOF(audio\breath1.ogg), - 2, - 1.0, - 10 - }; - titles[] = {}; - }; - - class GVAR(mask_breath_2) { - name = QGVAR(mask_breath_2); - sound[] = - { - QPATHTOF(audio\breath2.ogg), - 2, - 1.0, - 10 - }; - titles[] = {}; - }; - - class GVAR(mask_breath_heavy) { - name = QGVAR(mask_breath_heavy); - sound[] = - { - QPATHTOF(audio\heavyBreath.ogg), - 2, - 1.0, - 10 - }; - titles[] = {}; - }; - - class GVAR(chemDetectorSound) { - name = QGVAR(chemDetectorSound); - sound[] = - { - QPATHTOF(audio\chemDetector.ogg), - 4, - 1.0, - 10 - }; - titles[] = {}; - }; - class GVAR(chemBaseChime) { - name = QGVAR(chemBaseChime); - sound[] = - { - QPATHTOF(audio\baseChime.ogg), - 2, - 1.0, - 5 - }; - titles[] = {}; - }; - class GVAR(chemSlowChime) { - name = QGVAR(chemSlowChime); - sound[] = - { - QPATHTOF(audio\slowChime.ogg), - 2, - 1.0, - 5 - }; - titles[] = {}; - }; - class GVAR(chemNormalChime) { - name = QGVAR(chemNormalChime); - sound[] = - { - QPATHTOF(audio\normalChime.ogg), - 2, - 1.0, - 5 - }; - titles[] = {}; - }; - class GVAR(chemFastChime) { - name = QGVAR(chemFastChime); - sound[] = - { - QPATHTOF(audio\fastChime.ogg), - 2, - 1.0, - 5 - }; - titles[] = {}; - }; - class GVAR(chemRapidChime) { - name = QGVAR(chemRapidChime); - sound[] = - { - QPATHTOF(audio\rapidChime.ogg), - 2, - 1.0, - 5 - }; - titles[] = {}; - }; - class GVAR(chemTone) { - name = QGVAR(chemTone); - sound[] = - { - QPATHTOF(audio\tone.ogg), - 2, - 1.0, - 5 - }; - titles[] = {}; - }; -}; diff --git a/addons/chemical/CfgVehicles.hpp b/addons/chemical/CfgVehicles.hpp deleted file mode 100644 index 0ba4648da..000000000 --- a/addons/chemical/CfgVehicles.hpp +++ /dev/null @@ -1,251 +0,0 @@ -class CfgVehicles { - class Man; - class CAManBase: Man { - class ACE_SelfActions { - class KAT_Equipment { - class KAT_CheckGasMaskDur { - displayName = CSTRING(CheckGasMaskDurability); - condition = QUOTE([_player] call FUNC(hasGasMaskOn)); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE(_this call FUNC(checkGasMaskDur)); - showDisabled = 0; - icon = QPATHTOF(ui\Gasmask_icon.paa); - }; - class KAT_ChangeGasMaskFilter { - displayName = CSTRING(ChangeGasMaskFilter); - condition = QUOTE([_player] call FUNC(canReplaceFilter)); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE(_this call FUNC(changeGasMaskFilter)); - showDisabled = 0; - icon = QPATHTOF(ui\gasmaskfilter_ca.paa); - }; - class KAT_PutOnGasMask { - displayName = CSTRING(PutOnGasMask); - condition = QUOTE([_player] call FUNC(canPutOnGasMask)); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE([_player] call FUNC(putOnGasMask)); - showDisabled = 0; - icon = QPATHTOF(ui\Gasmask_icon.paa); - }; - class KAT_TakeOffGasMask { - displayName = CSTRING(TakeOffGasMask); - condition = QUOTE([_player] call FUNC(canTakeOffGasMask)); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE([_player] call FUNC(takeOffGasMask)); - showDisabled = 0; - icon = QPATHTOF(ui\Gasmask_icon.paa); - }; - - class KAT_ChemicalDetector { - displayName = CSTRING(ChemicalDetector_Menu); - icon = QPATHTOF(ui\kat_chemicalDet_icon.paa); - exceptions[] = {"isNotSwimming"}; - - class KAT_ChemicalDetector_Enable { - displayName = CSTRING(EnableDetector); - condition = QUOTE(([_player] call FUNC(hasDetector)) && !(_player getVariable [ARR_2(QQGVAR(detectorEnabled),false)])); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE([_player] call FUNC(enableChemDetector)); - showDisabled = 0; - icon = QPATHTOF(ui\kat_chemicalDet_icon.paa); - }; - class KAT_ChemicalDetector_SoundOn { - displayName = CSTRING(EnableDetectorSound); - condition = QUOTE(!(_player getVariable [ARR_2(QQGVAR(detectorSound),false)]) && ([_player] call FUNC(hasDetector))); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE(_player setVariable [ARR_3(QQGVAR(detectorSound),true,true)]); - showDisabled = 0; - icon = QPATHTOF(ui\kat_chemicalDet_icon.paa); - }; - class KAT_ChemicalDetector_SoundOff { - displayName = CSTRING(DisableDetectorSound); - condition = QUOTE((_player getVariable [ARR_2(QQGVAR(detectorSound),false)]) && ([_player] call FUNC(hasDetector))); - exceptions[] = {"isNotSwimming"}; - statement = QUOTE(_player setVariable [ARR_3(QQGVAR(detectorSound),false,true)]); - showDisabled = 0; - icon = QPATHTOF(ui\kat_chemicalDet_icon.paa); - }; - }; - }; - }; - }; - - class Item_Base_F; - - class kat_sealant_Item: Item_Base_F { - scope = 2; - scopeCurator = 2; - displayName = CSTRING(sealantItem); - author = "DiGii"; - vehicleClass = "Items"; - editorCategory = "EdCat_Equipment"; - editorSubcategory = "EdSubcat_InventoryItems"; - class TransportItems { - class _xx_kat_sealant { - name = "kat_sealant"; - count = 1; - }; - }; - }; - - class kat_gasmaskFilter_Item: Item_Base_F { - scope = 2; - scopeCurator = 2; - displayName = CSTRING(GasFilterItem); - author = "DiGii"; - vehicleClass = "Items"; - editorCategory = "EdCat_Equipment"; - editorSubcategory = "EdSubcat_InventoryItems"; - class TransportItems { - class _xx_kat_gasmaskFilter { - name = "kat_gasmaskFilter"; - count = 1; - }; - }; - }; - - class Logic; - class Module_F: Logic - { - class AttributesBase - { - class Default; - class Edit; // Default edit box (i.e., text input field) - class Combo; // Default combo box (i.e., drop-down menu) - class Checkbox; // Default checkbox (returned value is Boolean) - class CheckboxNumber; // Default checkbox (returned value is Number) - class ModuleDescription; // Module description - class Units; - }; - class ModuleDescription; - }; - - class kat_module_gas: Module_F - { - scope = 2; - side=7; - displayName = CSTRING(GasModule_Displayname); - category = QEGVAR(zeus,KAM); - function = QFUNC(gasmodule); - isTriggerActivated = 0; - functionPriority = 1; - isGlobal = 0; - - class Arguments: AttributesBase - { - class Radius - { - displayName = CSTRING(UI_max_range); - tooltip = CSTRING(GasModule_max_radius_dcs); - typeName = "NUMBER"; - defaultValue = 20; - }; - class GAS_Type - { - displayName = CSTRING(UI_gasType); - typeName = "NUMBER"; - class values { - class TearGas { - name = CSTRING(Lvl0_Gas); - value = 0; - }; - class ToxicGas { - name = CSTRING(Lvl1_Gas); - value = 1; - default = 1; - }; - }; - }; - class IsSealable - { - displayName = CSTRING(UI_sealable); - toolTip = CSTRING(UI_sealable_tooltip); - typeName = "BOOL"; - defaultValue = 0; - }; - }; - - class ModuleDescription: ModuleDescription { - description = CSTRING(GasModule_description); - sync[] = {"LocationArea_F"}; - - class LocationArea_F { - position = 0; - optional = 0; - duplicate = 1; - synced[] = {"Anything"}; - }; - }; - }; - - class kat_module_zeus_gas: Module_F - { - scope = 1; - scopeCurator = 2; - side=7; - curatorCanAttach = 1; - displayName = CSTRING(GasModule_Displayname); - category = QEGVAR(zeus,KAM); - function = QACEFUNC(common,dummy); - curatorInfoType = QGVAR(kat_RscGasModul); - isTriggerActivated = 0; - functionPriority = 1; - isGlobal = 0; - }; - - - class LandVehicle; - class StaticWeapon: LandVehicle { - class Turrets { - class MainTurret; - }; - }; - class StaticMortar: StaticWeapon { - class Turrets: Turrets { - class MainTurret: MainTurret {}; - }; - }; - class Mortar_01_base_F: StaticMortar { - class ace_csw { - proxyWeapon = "ace_mortar_82mm"; - }; - - class Turrets: Turrets { - class MainTurret: MainTurret { - magazines[] += {"KAT_5Rnd_82mm_Mo_Type0_AI","KAT_5Rnd_82mm_Mo_Type0_AI","KAT_5Rnd_82mm_Mo_Type0_AI","KAT_5Rnd_82mm_Mo_Type0_AI","KAT_3Rnd_82mm_Mo_TypeCS_AI","KAT_3Rnd_82mm_Mo_TypeCS_AI","KAT_3Rnd_82mm_Mo_TypeCS_AI"}; - }; - }; - }; - - class Box_NATO_AmmoOrd_F; - class ACE_Box_82mm_Mo_HE: Box_NATO_AmmoOrd_F { - class TransportMagazines; - }; - class ACE_Box_82mm_Mo_Combo: ACE_Box_82mm_Mo_HE { - class TransportMagazines { - MACRO_ADDMAGAZINE(KAT_1Rnd_82mm_Mo_Type0,8); - MACRO_ADDMAGAZINE(KAT_1Rnd_82mm_Mo_TypeCS,8); - }; - }; - class ACE_Box_82mm_Mo_Gas: ACE_Box_82mm_Mo_HE { - displayName = CSTRING(GasBox_Displayname); - class TransportMagazines { - MACRO_ADDMAGAZINE(KAT_1Rnd_82mm_Mo_Type0,8); - MACRO_ADDMAGAZINE(KAT_1Rnd_82mm_Mo_TypeCS,8); - }; - }; - - class APERSTripMine; - class KAT_Gas_TripWireMine: APERSTripMine { - author = "DiGii"; - ammo = "KAT_Gas_TripWireMine_Ammo"; - displayName = CSTRING(TriWire_Gas_Name); - }; - - - class Static; - class GVAR(logic): Static { - scope = 1; - displayName = ""; - }; -}; diff --git a/addons/chemical/CfgWeapons.hpp b/addons/chemical/CfgWeapons.hpp deleted file mode 100644 index 1225b9c08..000000000 --- a/addons/chemical/CfgWeapons.hpp +++ /dev/null @@ -1,100 +0,0 @@ -class CfgWeapons { - class ACE_ItemCore; - class CBA_MiscItem_ItemInfo; - - class kat_gasmaskFilter : ACE_ItemCore { - scope = 2; - author = "DiGii"; - displayName = CSTRING(GasFilterItem); - model = "\A3\weapons_F\ammo\mag_univ.p3d"; - picture = QPATHTOF(ui\gasmaskfilter_ca.paa); - descriptionShort = CSTRING(GasFilterItem_desc); - descriptionUse = CSTRING(GasFilterItem_desc); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - }; - }; - - class kat_sealant : ACE_ItemCore { - scope = 2; - author = "DiGii"; - displayName = CSTRING(sealantItem); - model = "\A3\Weapons_F\DummyItem.p3d"; - picture = QPATHTOF(ui\Sealant.paa); - descriptionShort = CSTRING(sealantItem_desc); - descriptionUse = CSTRING(sealantItem_desc); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 3; - }; - }; - - class ItemWatch; - class KAT_ChemicalDetector: ItemWatch { - ACE_hideItemType = "Watch"; - author = "Mazinski"; - descriptionShort = CSTRING(ChemicalDetectorDescription); - displayName = CSTRING(ChemicalDetectorDisplayName); - picture = QPATHTOF(UI\kat_chemicalDet_icon.paa); - model = "\a3\Weapons_F_Enoch\Items\ChemicalDetector_01_F.p3d"; - }; - - class CannonCore; - class mortar_82mm: CannonCore { - magazines[] += { - "KAT_5Rnd_82mm_Mo_Type0_AI", - "KAT_3Rnd_82mm_Mo_TypeCS_AI" - }; - }; - - class ACE_mortar_82mm: mortar_82mm { - magazines[] = {"ACE_1Rnd_82mm_Mo_HE","ACE_1Rnd_82mm_Mo_Smoke","ACE_1Rnd_82mm_Mo_Illum","ACE_1Rnd_82mm_Mo_HE_Guided","ACE_1Rnd_82mm_Mo_HE_LaserGuided", "KAT_1Rnd_82mm_Mo_Type0", "KAT_1Rnd_82mm_Mo_TypeCS"}; - }; - - class GrenadeLauncher; - class Throw: GrenadeLauncher { - muzzles[] += {"ACE_M7A3Muzzle"}; - - class ThrowMuzzle; - class ACE_M7A3Muzzle: ThrowMuzzle { - magazines[] = {"KAT_M7A3"}; - }; - }; - - class Default; - class Put: Default { - muzzles[]+= { - "ace_explosives_muzzle" - }; - class PutMuzzle: Default {}; - class ace_explosives_muzzle: PutMuzzle { - magazines[] += { - "KAT_Gas_TripWireMine_Mag" - }; - }; - }; - - class weapon_GBU12Launcher; - class KAT_CAS_M43_Bomb: weapon_GBU12Launcher { - author = "DiGii"; - canLock = 2; - scope=2; - displayName = "M43 BZ LGB"; - maxRange = 5000; - maxRangeProbab = 0.8; - midRange = 2000; - midRangeProbab = 0.85; - minRange = 150; - minRangeProbab = 0.6; - magazines[] = {"KAT_CAS_M43_Mag","KAT_CAS_M43_Mag_x2"}; - maxControlRange = 8000; - weaponLockDelay = 3; - weaponLockSystem = 4; - }; - - class rockets_Skyfire; - class KAT_CAS_R_80mm_GAS_POD: rockets_Skyfire { - displayName = "Hydra GAS 19x"; - magazines[] = {"KAT_CAS_R_80mm_GAS_MAG"}; - scope=2; - }; -}; diff --git a/addons/chemical/RscTitles.hpp b/addons/chemical/RscTitles.hpp deleted file mode 100644 index 0415928cf..000000000 --- a/addons/chemical/RscTitles.hpp +++ /dev/null @@ -1,83 +0,0 @@ -#define KAT_CHEM_GRID_WAbs (((safezoneW / safezoneH) min 0.7)) -#define KAT_CHEM_GRID_HAbs ((((safezoneW / safezoneH) min 1.2) / 1.6)) -#define KAT_CHEM_GRID_W ((((safeZoneW / safeZoneH) min 0.7) / 40)) -#define KAT_CHEM_GRID_H (((((safeZoneW / safeZoneH) min 1.2) / 1.2) / 25)) -#define KAT_CHEM_GRID_X ((safeZoneX + (safeZoneW - ((safeZoneW / safeZoneH) min 1.2)) / 11)) -#define KAT_CHEM_GRID_Y ((safeZoneY + (safeZoneH - (((safeZoneW / safeZoneH) min 1.2) / 1.2)) / 0.8)) - -#define KAT_CHEM_POS_H(N) ((N) * KAT_CHEM_GRID_H) - -#define ST_LEFT 0 -#define ST_CENTER 2 -#define ST_RIGHT 1 - -#define pixelW (1 / (getResolution select 2)) -#define pixelH (1 / (getResolution select 3)) -#define pixelScale 0.50 - -// pixel grids macros -#define UI_GRID_W (pixelW * pixelGridBase) -#define UI_GRID_H (pixelH * pixelGridBase) - -#define SAFEZONE_X_RIGHTEDGE ((safeZoneX - 1) * -1) -#define SAFEZONE_Y_LOWEDGE ((safeZoneY - 1) * -1) - -#define FRAME_W(N) ((UI_GRID_W * (N)) * (1.7777 / (getResolution select 4))) -#define FRAME_H(N) ((UI_GRID_H * (N))) - -class RscTitles -{ - class KAT_ChemicalDetector - { - idd = 18835; - enableSimulation = 1; - movingEnable = 0; - fadeIn=0; - fadeOut=1; - duration = 10e10; - onLoad = "uiNamespace setVariable ['KAT_ChemicalDetector', _this select 0];"; - class controls - { - class KatChemIcon: RscPicture - { - idc = 18801; - text = "\x\kat\addons\chemical\UI\kat_chemicalDet.paa"; - x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(15)); - y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(25)); - w = QUOTE(FRAME_W(25)); - h = QUOTE(FRAME_H(25)); - }; - class KatChemTime: RscText - { - idc = 18804; - style = ST_CENTER; - shadow = 0; - font = "PuristaBold"; - text = "12:00"; //--- ToDo: Localize; - x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(7.2)); - y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(6)); - w = QUOTE(FRAME_W(7.5)); - h = QUOTE(FRAME_H(4)); - colorBackground[] = {0,0,0,0}; - colorText[] = {0.3,0.3,0.3,0.8}; - sizeEx = QUOTE(FRAME_H(2)); - }; - class KatChemStrength: RscText - { - idc = 18805; - style = ST_RIGHT; - valign = "middle"; - shadow = 0; - font = "PuristaBold"; - text = "0"; //--- ToDo: Localize; - x = QUOTE(SAFEZONE_X_RIGHTEDGE - FRAME_W(25) - FRAME_W(2.1)); - y = QUOTE(SAFEZONE_Y_LOWEDGE - FRAME_H(7.5)); - w = QUOTE(FRAME_W(5)); - h = QUOTE(FRAME_H(3)); - colorBackground[] = {0,0,0,0}; - colorText[] = {0.3,0.3,0.3,0.8}; - sizeEx = QUOTE(FRAME_H(2.2)); - }; - }; - }; -}; diff --git a/addons/chemical/XEH_PREP.hpp b/addons/chemical/XEH_PREP.hpp deleted file mode 100644 index 6836f4f19..000000000 --- a/addons/chemical/XEH_PREP.hpp +++ /dev/null @@ -1,38 +0,0 @@ -PREP(AttributeRadius); -PREP(breathing); -PREP(canPutGasMask); -PREP(canPutOnGasMask); -PREP(canReplaceFilter); -PREP(canTakeOffGasMask); -PREP(CASCreateGas); -PREP(changeGasMaskFilter); -PREP(checkGasMaskDur); -PREP(createSealAction); -PREP(csGrenade); -PREP(displayGasMaskDur); -PREP(enableChemDetector); -PREP(fullHealLocal); -PREP(gasManagerPFH); -PREP(gasmodule); -PREP(GasTripEffect); -PREP(getList); -PREP(giveUnitGasMask); -PREP(gui_updateBodyImage); -PREP(gui_updateInjuryListGeneral); -PREP(handleFired); -PREP(handleGasMaskDur); -PREP(handleRespawn); -PREP(hasDetector); -PREP(hasGasmask); -PREP(hasGasMaskON); -PREP(hideChemDetector); -PREP(init); -PREP(initModule); -PREP(poison); -PREP(putOnGasMask); -PREP(showChemDetector); -PREP(spawnSmoke); -PREP(takeOffGasMask); -PREP(throwGrenade); -PREP(treatmentAdvanced_AtropineLocal); -PREP(ui_gasModule); \ No newline at end of file diff --git a/addons/chemical/XEH_postInit.sqf b/addons/chemical/XEH_postInit.sqf deleted file mode 100644 index f6fa04993..000000000 --- a/addons/chemical/XEH_postInit.sqf +++ /dev/null @@ -1,125 +0,0 @@ -#include "script_component.hpp" - -#define CBA_SETTINGS_CAT LSTRING(cba_name) - -//Events -["ace_glassesChanged", LINKFUNC(breathing)] call CBA_fnc_addEventHandler; -[QGVAR(poison), LINKFUNC(poison)] call CBA_fnc_addEventHandler; -[QGVAR(handleGasMaskDur), LINKFUNC(handleGasMaskDur)] call CBA_fnc_addEventHandler; -[QGVAR(addSealAction), LINKFUNC(createSealAction)] call CBA_fnc_addEventHandler; - -[QGVAR(playTone), { - params ["_unit", "_tone"]; - _unit say3D [_tone, 5]; -}] call CBA_fnc_addEventHandler; - -// ACE Events -[QACEGVAR(medical_gui,updateInjuryListGeneral), LINKFUNC(gui_updateInjuryListGeneral)] call CBA_fnc_addEventHandler; -[QACEGVAR(medical_gui,updateBodyImage), LINKFUNC(gui_updateBodyImage)] call CBA_fnc_addEventHandler; -[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; - -// Handlers -[QEGVAR(pharma,atropineLocal), LINKFUNC(treatmentAdvanced_AtropineLocal)] call CBA_fnc_addEventHandler; -[QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; - -//Mortar Events -["Mortar_01_base_F", "fired", {call FUNC(handleFired)}] call CBA_fnc_addClassEventHandler; -KAT_ProjectileCache = ("([_x, 'KAT_projectile', 0] call BIS_fnc_returnConfigEntry) != 0" configClasses (configFile >> "cfgAmmo")) apply {configName _x}; - -//Grenade Events -["ace_firedPlayer", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; -["ace_firedPlayerNonLocal", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; -["ace_firedNonPlayer", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; - -private _items = missionNamespace getVariable [QGVAR(availGasmask), "'G_AirPurifyingRespirator_01_F'"]; -private _array = [_items, "CfgGlasses"] call FUNC(getList); -missionNamespace setVariable [QGVAR(availGasmaskList), _array, true]; - -[CBA_SETTINGS_CAT, QGVAR(showChemDetector), "Show Chemical Detector", { - // Conditions: canInteract - if (!([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call ACEFUNC(common,canInteractWith)) || {!('KAT_ChemicalDetector' in assignedItems ACE_player)}) exitWith { false }; - - if !(GETMVAR(GVAR(ChemDetectorActive),false)) then { - [ACE_player] call FUNC(showChemDetector); - } else { - call FUNC(hideChemDetector); - }; - - true -}, { false }, [24, [false, false, false]], false] call CBA_fnc_addKeybind; - -if (!isServer) exitWith {}; - -GVAR(gasSources) = createHashMap; - -[QGVAR(addGasSource), { - params [ - ["_source", objNull, [objNull, []]], - ["_radius", 0, [0]], - ["_gasLevel", 0, [0]], - ["_key", ""], - ["_condition", {true}, [{}]], - ["_conditionArgs", []], - ["_isSealable", false] - ]; - - private _isObject = _source isEqualType objNull; - - // Check if the source is valid - if !(_isObject || {_source isEqualTypeParams [0, 0, 0]}) exitWith {}; - - if (_isObject && {isNull _source}) exitWith {}; - if (_radius == 0) exitWith {}; - if (_key isEqualTo "") exitWith {}; // key can be many types - - // hashValue supports more types than hashmaps do by default, but not all (e.g. locations) - private _hashedKey = hashValue _key; - - if (isNil "_hashedKey") exitWith { - ERROR_2("Unsupported key type used: %1 - %2",_key,typeName _key); - }; - - // If a position is passed, create a static object at said position - private _sourcePos = if (_isObject) then { - getPosATL _source - } else { - ASLToATL _source - }; - - private _gasLogic = createVehicle [QGVAR(logic), _sourcePos, [], 0, "CAN_COLLIDE"]; - - // If an object was passed, attach logic to the object - if (_isObject) then { - _gasLogic attachTo [_source]; - }; - - // To avoid issues, remove existing entries first before overwriting - if (_hashedKey in GVAR(gasSources)) then { - [QGVAR(removeGasSource), _key] call CBA_fnc_localEvent; - }; - - if (_isSealable) then { - private _jipID = [QGVAR(addSealAction), [_source, _gasLogic, _key]] call CBA_fnc_globalEventJIP; - [_jipID, _source] call CBA_fnc_removeGlobalEventJIP; - _source setVariable [QGVAR(sealable), true, true]; - }; - - GVAR(gasSources) set [_hashedKey, [_gasLogic, _radius, _gasLevel, _condition, _conditionArgs]]; -}] call CBA_fnc_addEventHandler; - -[QGVAR(removeGasSource), { - params ["_key"]; - private _hashedKey = hashValue _key; - - if (isNil "_hashedKey") exitWith { - ERROR_2("Unsupported key type used: %1 - %2",_key,typeName _key); - }; - - (GVAR(gasSources) deleteAt _hashedKey) params [["_gasLogic", objNull]]; - - detach _gasLogic; - deleteVehicle _gasLogic; -}] call CBA_fnc_addEventHandler; - -[LINKFUNC(gasManagerPFH), GAS_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler; - diff --git a/addons/chemical/audio/baseChime.ogg b/addons/chemical/audio/baseChime.ogg deleted file mode 100644 index 1b76678a7..000000000 Binary files a/addons/chemical/audio/baseChime.ogg and /dev/null differ diff --git a/addons/chemical/audio/breath1.ogg b/addons/chemical/audio/breath1.ogg deleted file mode 100644 index cfa78b6b6..000000000 Binary files a/addons/chemical/audio/breath1.ogg and /dev/null differ diff --git a/addons/chemical/audio/breath2.ogg b/addons/chemical/audio/breath2.ogg deleted file mode 100644 index 920f63347..000000000 Binary files a/addons/chemical/audio/breath2.ogg and /dev/null differ diff --git a/addons/chemical/audio/chemDetector.ogg b/addons/chemical/audio/chemDetector.ogg deleted file mode 100644 index c870ab36d..000000000 Binary files a/addons/chemical/audio/chemDetector.ogg and /dev/null differ diff --git a/addons/chemical/audio/cough_0.ogg b/addons/chemical/audio/cough_0.ogg deleted file mode 100644 index 2a38c91f0..000000000 Binary files a/addons/chemical/audio/cough_0.ogg and /dev/null differ diff --git a/addons/chemical/audio/cough_1.ogg b/addons/chemical/audio/cough_1.ogg deleted file mode 100644 index a061cbe78..000000000 Binary files a/addons/chemical/audio/cough_1.ogg and /dev/null differ diff --git a/addons/chemical/audio/cough_2.ogg b/addons/chemical/audio/cough_2.ogg deleted file mode 100644 index c237c6746..000000000 Binary files a/addons/chemical/audio/cough_2.ogg and /dev/null differ diff --git a/addons/chemical/audio/cough_3.ogg b/addons/chemical/audio/cough_3.ogg deleted file mode 100644 index f04a4bc7f..000000000 Binary files a/addons/chemical/audio/cough_3.ogg and /dev/null differ diff --git a/addons/chemical/audio/fastChime.ogg b/addons/chemical/audio/fastChime.ogg deleted file mode 100644 index a527d8230..000000000 Binary files a/addons/chemical/audio/fastChime.ogg and /dev/null differ diff --git a/addons/chemical/audio/heavyBreath.ogg b/addons/chemical/audio/heavyBreath.ogg deleted file mode 100644 index fae75158c..000000000 Binary files a/addons/chemical/audio/heavyBreath.ogg and /dev/null differ diff --git a/addons/chemical/audio/normalChime.ogg b/addons/chemical/audio/normalChime.ogg deleted file mode 100644 index ad09cbe5e..000000000 Binary files a/addons/chemical/audio/normalChime.ogg and /dev/null differ diff --git a/addons/chemical/audio/rapidChime.ogg b/addons/chemical/audio/rapidChime.ogg deleted file mode 100644 index a5ceaf32d..000000000 Binary files a/addons/chemical/audio/rapidChime.ogg and /dev/null differ diff --git a/addons/chemical/audio/slowChime.ogg b/addons/chemical/audio/slowChime.ogg deleted file mode 100644 index c2ce41335..000000000 Binary files a/addons/chemical/audio/slowChime.ogg and /dev/null differ diff --git a/addons/chemical/audio/tone.ogg b/addons/chemical/audio/tone.ogg deleted file mode 100644 index b5c644575..000000000 Binary files a/addons/chemical/audio/tone.ogg and /dev/null differ diff --git a/addons/chemical/config.cpp b/addons/chemical/config.cpp deleted file mode 100644 index aac13d177..000000000 --- a/addons/chemical/config.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - requiredVersion = REQUIRED_VERSION; - units[] = { - "kat_sealant_Item", - "kat_module_gas", - "kat_module_zeus_gas", - "KAT_Gas_TripWireMine" - }; - weapons[] = { - "kat_sealant", - "kat_gasmaskFilter", - "KAT_M7A3", - "KAT_CAS_M43_Bomb", - "KAT_CAS_R_80mm_GAS_POD", - "KAT_ChemicalDetector" - }; - ammo[] = { - "KAT_Gas_TripWireMine_Ammo", - "KAT_TripWireGasEffect", - "KAT_GASTrip_SmokeEffect", - "KAT_CAS_M43_Ammo", - "KAT_CAS_M43_Ammo_sub", - "KAT_CAS_R_80mm_GAS_AMMO" - }; - magazines[] = { - "KAT_CAS_M43_Mag" - }; - requiredAddons[] = { - "kat_main", - "cba_settings", - "ace_medical", - "ace_medical_ai", - "ace_medical_blood", - "ace_medical_damage", - "ace_medical_engine", - "ace_medical_feedback", - "ace_medical_gui", - "ace_medical_statemachine", - "ace_medical_status", - "ace_medical_treatment", - "ace_medical_vitals", - "ace_mk6mortar", - "ace_csw" - }; - author = "DiGii"; - url = ECSTRING(main,URL); - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" -#include "CfgMagazineGroups.hpp" -#include "CfgAmmo.hpp" -#include "CfgCloudlets.hpp" -#include "CfgMagazines.hpp" -#include "CfgWeapons.hpp" -#include "CfgVehicles.hpp" -#include "CfgSounds.hpp" -#include "ui\RscAttributes.hpp" -#include "RscTitles.hpp" -#include "ACE_Medical_Treatment_Actions.hpp" -#include "CfgGlasses.hpp" diff --git a/addons/chemical/functions/fnc_AttributeRadius.sqf b/addons/chemical/functions/fnc_AttributeRadius.sqf deleted file mode 100644 index 9accdfccc..000000000 --- a/addons/chemical/functions/fnc_AttributeRadius.sqf +++ /dev/null @@ -1,78 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * - * Return Value: - * NONE - * - * Example: - * [] call kat_chemical_fnc_AttributeRadius; - * - * Public: No - * - * -*/ - -params ["_control"]; - -private _display = ctrlParent _control; -private _logic = missionNamespace getVariable ["BIS_fnc_initCuratorAttributes_target",objNull]; -_control ctrlRemoveAllEventHandlers "SetFocus"; - -private _sealCheckBox = _display displayCtrl 1613; -private _sealText = _display displayCtrl 1614; -private _placeText = _display displayCtrl 1616; -// Specific onLoad stuff -if !(isNull attachedTo _logic) then { - _sealCheckBox ctrlShow true; - _sealText ctrlShow true; - _placeText ctrlSetText LLSTRING(GasModule_createContaminatedObject); -} else { - _sealCheckBox ctrlShow false; - _sealText ctrlShow false; - _placetext ctrlSetText LLSTRING(GasModule_createContaminatedZone); -}; - -private _gasTypeCombo = _display displayCtrl 1615; -private _maxEdit = _control controlsGroupCtrl 1611; - -_maxEdit ctrlSetText "100"; - -private _fnc_onKeyUp = { - params ["_display"]; - - private _maxEdit = _display displayCtrl 1611; - private _maxradius = parseNumber (ctrlText _maxEdit); - - // Handle invalid radius (non-numerical input) - if (_maxradius == 0) then { - _maxEdit ctrlSetTooltip (ACELSTRING(Zeus,AttributeRadiusInvalid)); - _maxEdit ctrlSetTextColor [1,0,0,1]; - } else { - _maxEdit ctrlSetTooltip ""; - _maxEdit ctrlSetTextColor [1,1,1,1]; - _display setVariable [QGVAR(ui_radius),_maxradius]; - }; -}; - -private _fnc_onCheckChange = { - params ["_sealCheckBox"]; - _display = ctrlParent _sealCheckBox; - private _canBeSealed = cbChecked(_display displayCtrl 1613); - _display setVariable [QGVAR(ui_sealable),_canBeSealed]; -}; - -private _fnc_onLBSelChange = { - params ["_gasTypeCombo"]; - _display = ctrlParent _gasTypeCombo; - private _gastype = lbCurSel _gasTypeCombo; - _display setVariable [QGVAR(ui_gastype), _gastype]; -}; - -[_display] call _fnc_onKeyUp; -[_sealCheckBox] call _fnc_onCheckChange; -[_gasTypeCombo] call _fnc_onCheckChange; -_display displayAddEventHandler ["KeyUp", _fnc_onKeyUp]; -_sealCheckBox ctrlAddEventHandler ["CheckedChanged", _fnc_onCheckChange]; -_gasTypeCombo ctrlAddEventHandler ["LBSelChanged", _fnc_onLBSelChange]; diff --git a/addons/chemical/functions/fnc_CASCreateGas.sqf b/addons/chemical/functions/fnc_CASCreateGas.sqf deleted file mode 100644 index 903c5845b..000000000 --- a/addons/chemical/functions/fnc_CASCreateGas.sqf +++ /dev/null @@ -1,38 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii -* -* Arguments: -* 0: Position -* -* Return Value: -* NONE -* -* Example: -* [getPos player] call kat_chemical_fnc_CASCreateGas; -* -* Public: No -* -* Gets position of droped bombs and creates a Gas zone there -*/ - -params ["_posX", "_posY", "_posZ"]; - -private _projectile = QGVAR(logic) createVehicle [_posX,_posY,_posZ]; - -if (isServer) then { - private _radius = 15; - private _timeToLive = 240; - private _gasLevel = 1; - - [QGVAR(addGasSource), [_projectile, _radius, _gasLevel, _projectile, { - params ["_endTime", "_projectile"]; - - // If projectile no longer exists, exit - if (isNull _projectile) exitWith { - false // return - }; - - CBA_missionTime < _endTime // return - }, [CBA_missionTime + _timeToLive, _projectile]]] call CBA_fnc_serverEvent; -}; diff --git a/addons/chemical/functions/fnc_GasTripEffect.sqf b/addons/chemical/functions/fnc_GasTripEffect.sqf deleted file mode 100644 index 0afe374f9..000000000 --- a/addons/chemical/functions/fnc_GasTripEffect.sqf +++ /dev/null @@ -1,20 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii -* -* Arguments: -* 0: NONE -* -* Return Value: -* NONE -* -* Example: -* [] call kat_chemical_fnc_GastripEffect; -* -* Public: No -* -* Creates effects when Trip wire explodes. -* Cant be called manualy! -*/ - -[FUNC(spawnSmoke), _this] call CBA_fnc_directCall; diff --git a/addons/chemical/functions/fnc_breathing.sqf b/addons/chemical/functions/fnc_breathing.sqf deleted file mode 100644 index 60c7150c8..000000000 --- a/addons/chemical/functions/fnc_breathing.sqf +++ /dev/null @@ -1,54 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii -* -* Handles the breathing sound for gasMasks -* -* Arguments: -* 0: Unit -* 1: Glasses Class -* -* Return Value: -* NONE -* -* Example: -* [player, "kat_mask_M50"] call kat_chemical_fnc_breathing; -* -* Public: No -* -*/ -params ["_unit", "_glassesClass"]; - -if !(_glassesClass in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) exitWith {}; - -GVAR(soundPlaying) = false; -[ - { - params["_args", "_handler"]; - _args params ["_unit", "_volume"]; - if (!(goggles _unit in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) || !(alive _unit) || (_unit getVariable [QACEGVAR(medical,inCardiacArrest), false])) then { - [_handler] call CBA_fnc_removePerFrameHandler; - } else { - if (!GVAR(soundPlaying)) then { - if ((GET_PAIN_PERCEIVED(_unit) >= 0.4) || (_unit getVariable [QACEGVAR(medical,heartrate), 80] >= 105)) then { - playSoundUI [QPATHTOF(audio\heavyBreath.ogg), GVAR(gasMaskSoundVolume), 1]; - GVAR(soundPlaying) = true; - } else { - if (round random 1 >= 0.5) then { - playSoundUI [QPATHTOF(audio\breath1.ogg), GVAR(gasMaskSoundVolume), 1]; - GVAR(soundPlaying) = true; - } else { - playSoundUI [QPATHTOF(audio\breath2.ogg), GVAR(gasMaskSoundVolume), 1]; - GVAR(soundPlaying) = true; - }; - }; - [{ - GVAR(soundPlaying) = false; - }, [], 4] call CBA_fnc_waitAndExecute; - }; - }; - }, - 0, - [_unit] -] call CBA_fnc_addPerFrameHandler; - diff --git a/addons/chemical/functions/fnc_canPutGasMask.sqf b/addons/chemical/functions/fnc_canPutGasMask.sqf deleted file mode 100644 index d89a4e1b7..000000000 --- a/addons/chemical/functions/fnc_canPutGasMask.sqf +++ /dev/null @@ -1,22 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Caller - * 1: Target - * - * Return Value: - * NONE - * - * Example: - * [player, cursorTarget] call kat_chemical_fnc_canPutGasMask; - * - * Public: No -*/ - -params ["_medic", "_patient"]; - -if (missionNamespace getVariable [QGVAR(availGasmaskList), []] isEqualTo []) exitWith {false}; - -!(_patient call ACE_common_fnc_isAwake) && ([_medic, _patient] call FUNC(hasGasmask)) && !((goggles _patient) in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) diff --git a/addons/chemical/functions/fnc_canPutOnGasMask.sqf b/addons/chemical/functions/fnc_canPutOnGasMask.sqf deleted file mode 100644 index 5688a31de..000000000 --- a/addons/chemical/functions/fnc_canPutOnGasMask.sqf +++ /dev/null @@ -1,6 +0,0 @@ -#include "..\script_component.hpp" - -params ["_player"]; - -(((_player call ACEFUNC(common,uniqueItems)) findAny GVAR(availGasmaskList)) != -1) && -(!((goggles _player) in GVAR(availGasmaskList))) diff --git a/addons/chemical/functions/fnc_canReplaceFilter.sqf b/addons/chemical/functions/fnc_canReplaceFilter.sqf deleted file mode 100644 index 9bcc0fcd5..000000000 --- a/addons/chemical/functions/fnc_canReplaceFilter.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Target - * - * Return Value: - * BOOL - * - * Example: - * [player] call kat_chemical_fnc_canReplaceFilter; - * - * Public: No -*/ - -params ["_unit"]; - -if (missionNamespace getVariable [QGVAR(availGasmaskList), []] isEqualTo []) exitWith {false}; - -(goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), []]) && 'kat_gasmaskFilter' in (items _unit); diff --git a/addons/chemical/functions/fnc_canTakeOffGasMask.sqf b/addons/chemical/functions/fnc_canTakeOffGasMask.sqf deleted file mode 100644 index 67e9e48b4..000000000 --- a/addons/chemical/functions/fnc_canTakeOffGasMask.sqf +++ /dev/null @@ -1,5 +0,0 @@ -#include "..\script_component.hpp" - -params ["_player"]; - -((goggles _player) in GVAR(availGasmaskList)) diff --git a/addons/chemical/functions/fnc_changeGasMaskFilter.sqf b/addons/chemical/functions/fnc_changeGasMaskFilter.sqf deleted file mode 100644 index 7ea103422..000000000 --- a/addons/chemical/functions/fnc_changeGasMaskFilter.sqf +++ /dev/null @@ -1,22 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Target - * - * Return Value: - * NONE - * - * Example: - * [player] call kat_chemical_fnc_changeGasMaskFilter; - * - * Public: No -*/ - -params ["_target"]; - -[_target, "AinvPknlMstpSlayWlnrDnon_medicOther"] call ACEFUNC(common,doAnimation); -_target removeItem "kat_gasmaskFilter"; - -_target setVariable [QGVAR(gasmask_durability), 10, true]; diff --git a/addons/chemical/functions/fnc_checkGasMaskDur.sqf b/addons/chemical/functions/fnc_checkGasMaskDur.sqf deleted file mode 100644 index e0dcaedf8..000000000 --- a/addons/chemical/functions/fnc_checkGasMaskDur.sqf +++ /dev/null @@ -1,24 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Patient - * 1: Medic - * - * Return Value: - * NONE - * - * Example: - * [player, cursorObject] call kat_chemical_fnc_checkGasMaskDur; - * - * Public: No -*/ - -params ["_patient","_medic"]; - -if (_medic isEqualTo _patient) then { - [_medic, "Gear", 1] call ACEFUNC(common,doGesture); -}; - -[{call FUNC(displayGasMaskDur)}, [_patient], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/chemical/functions/fnc_createSealAction.sqf b/addons/chemical/functions/fnc_createSealAction.sqf deleted file mode 100644 index a7451dfed..000000000 --- a/addons/chemical/functions/fnc_createSealAction.sqf +++ /dev/null @@ -1,67 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii, MiszczuZPolski - * - * Arguments: - * 0: Target - * - * Return Value: - * NONE - * - * Example: - * [] call kat_chemical_fnc_createSealAction; - * - * Public: No -*/ -params ["_target", "_logic", "_key"]; - -[_target, 0, ["ACE_MainActions", QGVAR(sealLeak)]] call ACEFUNC(interact_menu,removeActionFromObject); - -private _action = [ - QGVAR(sealLeak), - LLSTRING(sealLeak), - "", - { - params ["_target", "_player", "_params"]; - _params params ["_key"]; - - [_player, "Acts_carFixingWheel"] call ACEFUNC(common,doAnimation); - - //add time to addon options - [ - 5, - [_target, _player, _key], - { - params ["_args"]; - _args params ["_target","_player", "_key"]; - [_player, "kat_sealant"] call ACEFUNC(common,useItem); - [QGVAR(removeGasSource), _key] call CBA_fnc_serverEvent; - _target setVariable [QGVAR(sealable), false, true]; - [_target, 0, ["ACE_MainActions", QGVAR(sealLeak)]] call ACEFUNC(interact_menu,removeActionFromObject); - }, - { - params["_args"]; - _args params ["_target","_player"]; - [_player, "",1] call ACEFUNC(common,doAnimation); - }, - LLSTRING(GasModule_SealLeak), - {[_player, _player, ["kat_sealant"]] call ACEFUNC(medical_treatment,hasItem);},//conditions - ["isNotInside"] - ] call ace_common_fnc_progressBar; - }, - { - params ["_target","_player"]; - - ([_player, _target] call ACEFUNC(common,canInteractWith)) && - ([_player, _player, ["kat_sealant"]] call ACEFUNC(medical_treatment,hasItem)) && - (_target getVariable [QGVAR(sealable), false]) - }, - {}, - [_key] -] call ACEFUNC(interact_menu,createAction); - - -[_target, 0, ["ACE_MainActions"], _action] call ACEFUNC(interact_menu,addActionToObject); - - - diff --git a/addons/chemical/functions/fnc_csGrenade.sqf b/addons/chemical/functions/fnc_csGrenade.sqf deleted file mode 100644 index 55657d0cb..000000000 --- a/addons/chemical/functions/fnc_csGrenade.sqf +++ /dev/null @@ -1,96 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii, MiszczuPolski - * Spawns Patricles for the Gas zone - * - * Arguments: - * 0: Postiton - * 1: Radius - * 2: Lifetime - * - * Return Value: - * NONE - * - * Example: - * [getPosASL player, 25, 60] call kat_chemical_fnc_spawnGasSmoke; - * - * Public: No -*/ - -#define ALERT_NEAR_ENEMY_RANGE 60 - -#define PARTICLE_LIFE_TIME 2 -#define PARTICLE_DENSITY 20 -#define PARTICLE_SIZE 1 -#define PARTICLE_SPEED 1 - -#define PARTICLE_SMOKE_LIFE_TIME 5 -#define PARTICLE_SMOKE_DENSITY 5 -#define PARTICLE_SMOKE_SIZE 0.5 -#define PARTICLE_SMOKE_SPEED 1 -#define PARTICLE_SMOKE_LIFTING 1 -#define PARTICLE_SMOKE_WIND_EFFECT 1 - -#define EXPANSION 1 - -#define EFFECT_SIZE 1 - -params ["_projectile", "_timeToLive", "_center"]; - -private _position = position _projectile; - -// Alert nearby hostile AI -{ - if (local _x && {[_center, side group _x] call BIS_fnc_sideIsEnemy} && {behaviour _x in ["SAFE", "AWARE"]}) then { // WE WANT THE OBJECT'S SIDE HERE! - _x setBehaviour "COMBAT"; - }; -} forEach ([_position, ALERT_NEAR_ENEMY_RANGE, ALERT_NEAR_ENEMY_RANGE, 0, false] nearEntities [["CAManBase"], false, true, true]); - -private _particleSource = "#particlesource" createVehicleLocal _position; - -//Particle options -_particleSource setParticleParams [ - ["\A3\data_f\cl_basic",1,0,1], // File,Ntieth,Index,Count,Loop - "", //Animation name - "Billboard", //Type - 1, //Timer Period (We do this to spread the updates out and reduce overhead) - PARTICLE_SMOKE_LIFE_TIME, //Lifetime - [0,0,0], - [0, 0, PARTICLE_SMOKE_SPEED], //Move velocity - 5 + random 10, //Rotation velocity - 0.05, //Weight - 0.04 * PARTICLE_SMOKE_LIFTING, //Volume - 0.05 * PARTICLE_SMOKE_WIND_EFFECT, //Rubbing - [1 * PARTICLE_SMOKE_SIZE + 1, 1.8 * PARTICLE_SMOKE_SIZE + 15], //Size - [[0.9294,0.9843,1] + [0.001], [0.9294,0.9843,1] + [0.1], [1,1,1,0]], //Color - [0,0], //Animation speed - 0.1, //Random direction period - 0.08 * EXPANSION, //Random direction intensity - "", - "", //Before destroy script - _projectile //This -]; - -_particleSource setParticleRandom [PARTICLE_SMOKE_LIFE_TIME / 2, [0.5 * EFFECT_SIZE, 0.5 * EFFECT_SIZE, 0.2 * EFFECT_SIZE], [0.3,0.3,0.5], 1, 0, [0,0,0,0.06], 0, 0]; -_particleSource setDropInterval (1 / PARTICLE_SMOKE_DENSITY); - -if (isServer) then { - private _radius = 6; - private _gasLevel = 0; - - [QGVAR(addGasSource), [_projectile, _radius, _gasLevel, _projectile, { - params ["_endTime", "_projectile"]; - - // If incendiary no longer exists, exit - if (isNull _projectile) exitWith { - false // return - }; - - // Need to get the position every time, as grenade might have been moved - private _position = position _projectile; - - CBA_missionTime < _endTime // return - }, [CBA_missionTime + _timeToLive, _projectile]]] call CBA_fnc_serverEvent; -}; - -[{deleteVehicle _this}, _particleSource, _timeToLive] call CBA_fnc_waitAndExecute; diff --git a/addons/chemical/functions/fnc_displayGasMaskDur.sqf b/addons/chemical/functions/fnc_displayGasMaskDur.sqf deleted file mode 100644 index 5ad4d171f..000000000 --- a/addons/chemical/functions/fnc_displayGasMaskDur.sqf +++ /dev/null @@ -1,39 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Target - * - * Return Value: - * NONE - * - * Example: - * [player] call kat_chemical_fnc_displayGasMaskDur; - * - * Public: No -*/ - -params ["_target"]; - -private _durability = _target getVariable [QGVAR(gasmask_durability), 10]; -private _durabilityStructuredText = if (_durability >= 0) then { - - private _color = [((2 * (1 - _durability / 10)) min 1), ((2 * _durability / 10) min 1), 0]; - - private _string = ""; - for "_a" from 1 to _durability do { - _string = _string + "|"; - }; - private _text = [_string, _color] call ACEFUNC(common,stringToColoredText); - - _string = ""; - for "_a" from (_durability + 1) to (10) do { - _string = _string + "|"; - }; - - composeText [_text, [_string, "#808080"] call ACEFUNC(common,stringToColoredText)]; - -}; -private _picture = QPATHTOF(ui\Gasmask_icon.paa); -[_durabilityStructuredText, _picture] call ACEFUNC(common,displayTextPicture); diff --git a/addons/chemical/functions/fnc_enableChemDetector.sqf b/addons/chemical/functions/fnc_enableChemDetector.sqf deleted file mode 100644 index 7d45fdee7..000000000 --- a/addons/chemical/functions/fnc_enableChemDetector.sqf +++ /dev/null @@ -1,50 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Mazinski - * Enables the audio on the Chemical Detector. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call kat_chemical_enableChemDetector - * - * Public: No - */ - -params ["_unit"]; - -_unit setVariable [QGVAR(detectorEnabled), true, true]; - -[{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; - - private _alive = alive _unit; - - if (!_alive) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - if !("KAT_ChemicalDetector" in assignedItems _unit) exitWith { - _unit setVariable [QGVAR(detectorEnabled), false, true]; - _idPFH call CBA_fnc_removePerFrameHandler; - }; - - private _detectorSound = _unit getVariable [QGVAR(detectorSound), false]; - private _intensity = _unit getVariable [QGVAR(areaIntensity), 0]; - - if (_detectorSound) then { - switch true do { - case (_intensity > 0.9): { [QGVAR(playTone), [_unit, QGVAR(chemTone)], _unit] call CBA_fnc_targetEvent; }; - case (_intensity > 0.7): { [QGVAR(playTone), [_unit, QGVAR(chemRapidChime)], _unit] call CBA_fnc_targetEvent; }; - case (_intensity > 0.5): { [QGVAR(playTone), [_unit, QGVAR(chemFastChime)], _unit] call CBA_fnc_targetEvent; }; - case (_intensity > 0.3): { [QGVAR(playTone), [_unit, QGVAR(chemNormalChime)], _unit] call CBA_fnc_targetEvent; }; - case (_intensity > 0): { [QGVAR(playTone), [_unit, QGVAR(chemSlowChime)], _unit] call CBA_fnc_targetEvent; }; - default { [QGVAR(playTone), [_unit, QGVAR(chemBaseChime)], _unit] call CBA_fnc_targetEvent; }; - }; - }; -}, 5, [_unit]] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/chemical/functions/fnc_fullHealLocal.sqf b/addons/chemical/functions/fnc_fullHealLocal.sqf deleted file mode 100644 index a5f155169..000000000 --- a/addons/chemical/functions/fnc_fullHealLocal.sqf +++ /dev/null @@ -1,26 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Glowbal, Brett Mayson - * Local callback for fully healing a patient. - * - * Arguments: - * 0: Patient - * - * Return Value: - * None - * - * Example: - * [player] call ace_medical_treatment_fnc_fullHealLocal - * - * Public: No - */ - -params ["_patient"]; -TRACE_1("fullHealLocal kat chemical",_patient); - -_patient setVariable [QGVAR(gasmask_durability), 10, true]; -_patient setVariable [QGVAR(CSGas), 0, true]; -_patient setVariable [QGVAR(airPoisoning), false, true]; -_patient setVariable [QGVAR(infectionTime), missionNamespace getVariable [QGVAR(infectionTime), 60], true]; -_patient setVariable [QGVAR(infectionArray), [], true]; -_patient setVariable [QGVAR(CoughCooldown), false, true]; \ No newline at end of file diff --git a/addons/chemical/functions/fnc_gasManagerPFH.sqf b/addons/chemical/functions/fnc_gasManagerPFH.sqf deleted file mode 100644 index c49c3058b..000000000 --- a/addons/chemical/functions/fnc_gasManagerPFH.sqf +++ /dev/null @@ -1,53 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: tcvm, johnb43 - * Modified by: MiszczuZPolski - * Handles various objects on gas and determines if units close to objects deserve to get poisoned - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * kat_chemical_fnc_gasManagerPFH call CBA_fnc_addPerFrameHandler - * - * Public: No - */ - -{ - _y params ["_gasLogic", "_radius", "_gasLevel", "_condition", "_conditionArgs", "_isSealable"]; - TRACE_2("gasManagerPFH loop",_x,_y); - - private _infectedObject = _y; - - // Remove when condition is no longer valid - if !(_conditionArgs call _condition) then { - TRACE_2("condition no longer valid, deleting",_x,_y); - - detach _gasLogic; - deleteVehicle _gasLogic; - - GVAR(gasSources) deleteAt _x; - - continue; - }; - - // Poison units (alive or dead) close to the gas source - { - // Get the distance of the unit from the center of the sphere (_gasLogic) - private _distance = _x distance _gasLogic; - - // Ensure the distance does not exceed the radius (prevents going beyond the sphere) - _distance = _distance min _radius; - - // Calculate the intensity as a normalized value (1 at center, 0 at the edge) - private _intensity = 1 - (_distance / _radius); - - _x setVariable [QGVAR(areaIntensity), _intensity, true]; - - [QGVAR(poison), [_x, _gasLevel, _infectedObject], _x] call CBA_fnc_targetEvent; - - } forEach nearestObjects [_gasLogic, ["CAManBase"], _radius]; -} forEach GVAR(gasSources); diff --git a/addons/chemical/functions/fnc_gasmodule.sqf b/addons/chemical/functions/fnc_gasmodule.sqf deleted file mode 100644 index 41c8b51df..000000000 --- a/addons/chemical/functions/fnc_gasmodule.sqf +++ /dev/null @@ -1,49 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii, MiszczuZPolski -* This cant be called manualy! -* -* Arguments: -* 0: Logic -* 1: Affected Units (not used) -* 2: Activated -* -* Return Value: -* NONE -* -* Example: -* [] call kat_chemical_fnc_gasmodule; -* -* Public: No -*/ -params ["_logic", "_units", "_activated"]; - -private _radius = _logic getVariable ["Radius", 20]; -private _gasLevel = _logic getVariable ["GAS_type", 1]; -private _isSealable = _logic getVariable ["IsSealable", false]; - -if (count _units == 0) then {_units pushBack _logic;}; - -if (!_activated) exitWith {}; -if (isServer) then { - - [{ - params ["_logic", "_radius", "_gasLevel", "_isSealable", "_units"]; - - { - [QGVAR(addGasSource), [_x, _radius, _gasLevel, _x, { - params ["_endTime", "_logic"]; - - // If logic no longer exists, exit - if (isNull _logic) exitWith { - false // returns - }; - - CBA_missionTime < _endTime // return - }, [CBA_missionTime + 1e10, _logic], _isSealable]] call CBA_fnc_serverEvent; - - } forEach _units; - - }, [_logic, _radius, _gasLevel, _isSealable, _units], 1] call CBA_fnc_waitAndExecute; - -}; diff --git a/addons/chemical/functions/fnc_giveUnitGasMask.sqf b/addons/chemical/functions/fnc_giveUnitGasMask.sqf deleted file mode 100644 index 66524eeb0..000000000 --- a/addons/chemical/functions/fnc_giveUnitGasMask.sqf +++ /dev/null @@ -1,44 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Player - * 1: Target - * - * Return Value: - * NONE - * - * Example: - * [player, cursorTarget] call kat_chemical_fnc_giveUnitGasMask; - * - * Public: No -*/ - -params ["_medic", "_patient"]; - -private _itemArr = _medic call ACEFUNC(common,uniqueItems); -private _playerHasGasmask = false; -private _playerGasMask = ""; -{ if (_x in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) then {_playerHasGasmask = true; _playerGasMask = _x} } forEach _itemArr; - -private _fnc_replaceItem = { - params["_medic", "_patient", "_playerGasMask"]; - - if (goggles _patient == "") then { - _patient linkItem _playerGasMask; - } else { - private _pCurGoggles = goggles _patient; - [_patient, _pCurGoggles] call ACEFUNC(common,addToInventory); - _patient linkItem _playerGasMask; - }; -}; - -if (_playerHasGasmask) then { - [_medic,_playerGasMask] call ACEFUNC(common,useItem); - [_medic,_patient,_playerGasMask] call _fnc_replaceItem; -} else { - _itemArr = _patient call ACEFUNC(common,uniqueItems); - { if (_x in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) then {_playerGasMask = _x} } forEach _itemArr; - [_medic,_patient,_playerGasMask] call _fnc_replaceItem; -}; diff --git a/addons/chemical/functions/fnc_gui_updateBodyImage.sqf b/addons/chemical/functions/fnc_gui_updateBodyImage.sqf deleted file mode 100644 index 4dfc12897..000000000 --- a/addons/chemical/functions/fnc_gui_updateBodyImage.sqf +++ /dev/null @@ -1,27 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Blue - * Updates the body image for given target. - * - * Arguments: - * 0: Body image controls group - * 1: Target - * 2: Body part - * - * Return Value: - * None - * - * Example: - * [CONTROL, _target, 0] call kat_chemical_fnc_gui_updateBodyImage - * - * Public: No - */ - -params ["_ctrlGroup", "_target", "_selectionN"]; - -private _ctrlAirInfected = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_I; -if ((_target getVariable [QGVAR(airPoisoning), false]) && (missionNamespace getVariable [QGVAR(showPoisoning), true])) then { - _ctrlAirInfected ctrlShow true; -} else { - _ctrlAirInfected ctrlShow false; -}; diff --git a/addons/chemical/functions/fnc_handleFired.sqf b/addons/chemical/functions/fnc_handleFired.sqf deleted file mode 100644 index 03b934ec0..000000000 --- a/addons/chemical/functions/fnc_handleFired.sqf +++ /dev/null @@ -1,53 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii -* -* Arguments: -* 0: Object -* 1: None -* 2: None -* 3: None -* 4: ammo -* 5: Magazine -* 6: Projectile -* -* Return Value: -* NONE -* -* Example: -* [player, "", "", "", ammo, magazine, projectile] call kat_chemical_fnc_handlefired; -* -* Public: No -* -* See handlefires Eventhandler in BI-WIKI -*/ - -params ["_vehicle", "", "", "", "_ammo", "_magazine", "_projectile"]; - -// Large enough distance to not simulate any wind deflection -if (_vehicle distance ACE_player > 8000) exitWith {}; - -if !(_ammo in KAT_ProjectileCache) exitWith {}; - -private _configClass = (configFile >> "CfgAmmo" >> _ammo); - -private _lifetime = [_configClass, "KAT_lifetime", 60] call BIS_fnc_returnConfigEntry; -private _radius = [_configClass, "KAT_radius", 10] call BIS_fnc_returnConfigEntry; -private _gasLevel = [_configClass, "KAT_toxicLvL", 1] call BIS_fnc_returnConfigEntry; - -[{ - params ["_args", "_handler"]; - _args params ["_projectile", "_gasInfo"]; - _gasInfo params ["_lifetime", "_radius", "_gasLeveL"]; - - if (isNull _projectile || {!alive _projectile}) exitWith { - [_handler] call CBA_fnc_removePerFrameHandler; - }; - - [QGVAR(addGasSource), [_projectile, _radius, _gasLevel, _projectile, { - params ["_endTime"]; - - CBA_missionTime < _endTime // return - }, [CBA_missionTime + _lifetime]]] call CBA_fnc_serverEvent; - -}, 0, [_projectile, [_lifetime, _radius, _gasLevel]]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/chemical/functions/fnc_handleGasMaskDur.sqf b/addons/chemical/functions/fnc_handleGasMaskDur.sqf deleted file mode 100644 index 1b0d62ca6..000000000 --- a/addons/chemical/functions/fnc_handleGasMaskDur.sqf +++ /dev/null @@ -1,50 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: MiszczuZPolski - * - * Arguments: - * 0: Unit - * - * Return Value: - * NONE - * - * Example: - * [player] call kat_chemical_fnc_handleGasMaskDur; - * - * Public: No -*/ - -params ["_unit"]; - -if !(goggles _unit in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) exitWith {}; - -// Get the maximum time the gas mask filter can last (from settings) -private _maxTime = missionNamespace getVariable [QGVAR(gasmask_durability), 60]; // Max durability in seconds - -// Get the current health (0-10) of the gas mask filter for this unit -private _currentHealth = _unit getVariable [QGVAR(gasmask_durability), 10]; // Default to full health (10) if not set - -// Scale the current health (0-10) to the actual time left based on maxTime -private _timeLeft = (_currentHealth / 10) * _maxTime; // Convert 0-10 health scale to time left - -// Reduce the time left by 1 seconds (each tick reduces by 1 seconds) -_timeLeft = _timeLeft - 1; - -// Prevent negative durability -_timeLeft = _timeLeft max 0; - -// Convert the remaining time back to the 0-10 health scale -private _newHealth = (_timeLeft / _maxTime) * 10; - -// Calculate percentage of health remaining -private _percent = (_newHealth / 10) * 100; - -// Exit if the gas mask health reaches 0 or the unit is dead -if (_newHealth <= 0) exitWith { - _unit setVariable [QGVAR(gasmask_durability), 0, true]; -}; - -// Update the gas mask health if it has changed -if (_currentHealth != _newHealth) then { - _unit setVariable [QGVAR(gasmask_durability), _newHealth, true]; -}; diff --git a/addons/chemical/functions/fnc_hasDetector.sqf b/addons/chemical/functions/fnc_hasDetector.sqf deleted file mode 100644 index fb79a915e..000000000 --- a/addons/chemical/functions/fnc_hasDetector.sqf +++ /dev/null @@ -1,24 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Player - * 1: Target - * - * Return Value: - * Bool - * - * Example: - * [player, cursorTarget] call kat_chemical_fnc_hasGasmask; - * - * Public: No -*/ - -params ["_unit"]; - -if ("KAT_ChemicalDetector" in assignedItems _unit) exitWith { - true -}; - -false \ No newline at end of file diff --git a/addons/chemical/functions/fnc_hasGasMaskON.sqf b/addons/chemical/functions/fnc_hasGasMaskON.sqf deleted file mode 100644 index 59631a20a..000000000 --- a/addons/chemical/functions/fnc_hasGasMaskON.sqf +++ /dev/null @@ -1,21 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Target - * - * Return Value: - * Players googles (BOOL) - * - * Example: - * [player] call kat_chemical_fnc_hasGasMaskOn; - * - * Public: No - */ - -params ["_target"]; - -if (missionNamespace getVariable [QGVAR(availGasmaskList), []] isEqualTo []) exitWith {false}; - -goggles _target in (missionNamespace getVariable [QGVAR(availGasmaskList), []]); diff --git a/addons/chemical/functions/fnc_hasGasmask.sqf b/addons/chemical/functions/fnc_hasGasmask.sqf deleted file mode 100644 index 5422bba97..000000000 --- a/addons/chemical/functions/fnc_hasGasmask.sqf +++ /dev/null @@ -1,28 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: Player - * 1: Target - * - * Return Value: - * Bool - * - * Example: - * [player, cursorTarget] call kat_chemical_fnc_hasGasmask; - * - * Public: No -*/ - -params [["_player", objNull, [objNull]], ["_patient", objNull, [objNull]]]; - -private _playerArr = _player call ACEFUNC(common,uniqueItems); -private _playerHasGasmask = false; -{ if (_x in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) then {_playerHasGasmask = true} } forEach _playerArr; - -private _patientarr = _patient call ACEFUNC(common,uniqueItems); -private _patientHasGasmask = false; -{ if (_x in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) then {_patientHasGasmask = true} } forEach _patientarr; - -[true, false] select (!_playerHasGasmask && !_patientHasGasmask); diff --git a/addons/chemical/functions/fnc_hideChemDetector.sqf b/addons/chemical/functions/fnc_hideChemDetector.sqf deleted file mode 100644 index 078732747..000000000 --- a/addons/chemical/functions/fnc_hideChemDetector.sqf +++ /dev/null @@ -1,19 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Garth 'L-H' de Wet - * Modified: Mazinski - * Removes the KWatch from the screen. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call kat_watch_fnc_hideKWatch - * - * Public: No - */ -GVAR(ChemDetectorActive) = false; -"KAT_ChemicalDetector" cutText ["","PLAIN",0,true]; \ No newline at end of file diff --git a/addons/chemical/functions/fnc_init.sqf b/addons/chemical/functions/fnc_init.sqf deleted file mode 100644 index 1810233b1..000000000 --- a/addons/chemical/functions/fnc_init.sqf +++ /dev/null @@ -1,22 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii -* -* Arguments: -* 0: player -* -* Return Value: -* NONE -* -* Example: -* [] call kat_chemical_fnc_init; -* -* Public: No -*/ -params ["_unit", ["_isRespawn", true]]; - -if (!local _unit) exitWith {}; - -[_unit] call FUNC(fullHealLocal); - -_unit setVariable [QGVAR(detectorSound), false, true]; \ No newline at end of file diff --git a/addons/chemical/functions/fnc_initModule.sqf b/addons/chemical/functions/fnc_initModule.sqf deleted file mode 100644 index 611b8a16f..000000000 --- a/addons/chemical/functions/fnc_initModule.sqf +++ /dev/null @@ -1,41 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * Initializes placed Module - * - * Arguments: - * 0: Logic - * - * Return Value: - * NONE - * - * Example: - * [logic] call kat_chemical_fnc_initModule; - * - * Public: No -*/ - -params ["_logic"]; - -if (isServer) then { - [{ - params ["_logic"]; - - private _category = getText (configOf _logic >> "category"); - private _logicMain = missionNamespace getVariable ["bis_functions_mainscope", objNull]; - private _group = missionNamespace getVariable [format ["bis_fnc_initModules_%1", _category], group _logicMain]; - [_logic] joinSilent _group; - }, _logic] call CBA_fnc_execNextFrame; -}; - -private _function = getText (configOf _logic >> "function"); -if (_function isEqualTo "") exitWith {}; - - -if (isNil _function) then { - _function = compile _function; -} else { - _function = missionNamespace getVariable _function; -}; - -[_function, _logic] call CBA_fnc_execNextFrame; diff --git a/addons/chemical/functions/fnc_poison.sqf b/addons/chemical/functions/fnc_poison.sqf deleted file mode 100644 index 1d9b58459..000000000 --- a/addons/chemical/functions/fnc_poison.sqf +++ /dev/null @@ -1,82 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: MiszczuZPolski - * Handles various objects on fire and determines if units close to objects deserve to get burned. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * ace_fire_fnc_fireManagerPFH call CBA_fnc_addPerFrameHandler - * - * Public: No - */ - -params ["_unit", "_gasLevel", "_infectedObject"]; - -// Check if unit is remote (objNull is remote) -if (!local _unit) exitWith { - TRACE_1("unit is null or not local",_unit); -}; - -// Check if the unit can poison (takes care of spectators and curators) -if (getNumber (configOf _unit >> "isPlayableLogic") == 1 || {!(_unit isKindOf "CAManBase")}) exitWith { - TRACE_1("unit is virtual or not a man",_unit); -}; - -// If unit is invulnerable, don't poison the unit -if !(isDamageAllowed _unit && {_unit getVariable [QACEGVAR(medical,allowDamage), true]}) exitWith { - TRACE_1("unit is invulnerable",_unit); -}; - -if ((goggles _unit in (missionNamespace getVariable [QGVAR(availGasmaskList), []])) && {_unit getVariable [QGVAR(gasmask_durability), 10] > 0}) exitWith { - TRACE_1("unit has gas mask",_unit); - [QGVAR(handleGasMaskDur), _unit, _unit] call CBA_fnc_targetEvent; -}; - -if (_gasLevel == 0) exitWith { - _unit setVariable [QGVAR(CSGas), 30, true]; - if (random 1 <= GVAR(tearGasDropChance)) then { - [QACEGVAR(hitreactions,dropWeapon), _unit, _unit] call CBA_fnc_targetEvent; - }; -}; - -// We assume that oxygen masks only cover the mouth and nose, leaving the eyes exposed to CS gas -if ((_unit getVariable [QEGVAR(breathing,oxygenMaskActive), false])) exitWith { - TRACE_1("unit has oxygen mask",_unit); -}; - -private _currentInfectionArray = _unit getVariable [QGVAR(infectionArray), []]; - -if ((_currentInfectionArray findIf { _x isEqualTo _infectedObject}) == -1) then { - _currentInfectionArray append [_infectedObject]; -}; - -_unit setVariable [QGVAR(infectionArray), _currentInfectionArray, true]; - -//Get max infection time -private _infectionTime = missionNamespace getVariable [QGVAR(infectionTime), 60]; - -//Get current time left for player -private _currentInfection = _unit getVariable [QGVAR(infectionTime), 60]; - -private _timeLeft = _currentInfection - 1; -_timeLeft = _timeLeft max 0; - -private _newTime = _timeLeft; - -if (_currentInfection != _newTime) then { - _unit setVariable [QGVAR(infectionTime), _newTime, true]; -}; - -// Exit if infection reaches 0 -if (_newTime <= 0) then { - if !(_unit getVariable [QGVAR(airPoisoning), false]) then { - [QEGVAR(breathing,playCough), [_unit], _unit] call CBA_fnc_targetEvent; - }; - - _unit setVariable [QGVAR(airPoisoning), true, true]; -}; \ No newline at end of file diff --git a/addons/chemical/functions/fnc_putOnGasMask.sqf b/addons/chemical/functions/fnc_putOnGasMask.sqf deleted file mode 100644 index 878ba9f62..000000000 --- a/addons/chemical/functions/fnc_putOnGasMask.sqf +++ /dev/null @@ -1,13 +0,0 @@ -#include "..\script_component.hpp" - -params ["_player"]; - -private _itemList = _player call ACEFUNC(common,uniqueItems); - -{ - if (_x in GVAR(availGasmaskList)) then { - _player assignItem _x; - break; - }; - -} forEach _itemList; diff --git a/addons/chemical/functions/fnc_showChemDetector.sqf b/addons/chemical/functions/fnc_showChemDetector.sqf deleted file mode 100644 index d7b5f1a34..000000000 --- a/addons/chemical/functions/fnc_showChemDetector.sqf +++ /dev/null @@ -1,71 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Garth 'L-H' de Wet - * Modified: Mazinski - * Displays the JCAD on screen. - * - * Arguments: - * 0: unit - * - * Return Value: - * None - * - * Example: - * [player] call kat_chemical_fnc_showChemDetector - * - * Public: Yes - */ - -params ["_unit"]; - -"KAT_ChemicalDetector" cutRsc ["KAT_ChemicalDetector", "PLAIN", 0, true]; - -if (isNull (uiNamespace getVariable ["KAT_ChemicalDetector", displayNull])) exitWith {}; - -GVAR(ChemDetectorActive) = true; - -private _display = uiNamespace getVariable ["KAT_ChemicalDetector", displayNull]; -private _background = _display displayCtrl 18801; -private _time = _display displayCtrl 18804; -private _exposure = _display displayCtrl 18805; - -[{ - _this params ["_args", "_pfhID"]; - _args params ["_unit", "_time", "_exposure"]; - - if !(GVAR(ChemDetectorActive)) exitWith { - _pfhID call CBA_fnc_removePerFrameHandler; - }; - - if !(alive _unit) exitWith { - call FUNC(hideChemDetector); - _pfhID call CBA_fnc_removePerFrameHandler; - }; - - if !("KAT_ChemicalDetector" in assignedItems _unit) exitWith { - call FUNC(hideChemDetector); - _pfhID call CBA_fnc_removePerFrameHandler; - }; - - private _intensity = _unit getVariable [QGVAR(areaIntensity), 0]; - - if ((_unit getVariable [QGVAR(detectorEnabled), false])) then { - - private _hour = floor dayTime; - private _minute = floor ((dayTime - _hour) * 60); - - _time ctrlSetText (format ["%1:%2", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber]); - - _exposure ctrlSetText (_intensity toFixed 2); - - _unit setVariable [QGVAR(areaIntensity), _intensity, true]; - } else { - _time ctrlSetText (LLSTRING(ChemicalDetector_Off)); - _exposure ctrlSetText ("-.--"); - }; - -}, 1, [ - _unit, - _time, - _exposure -]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/chemical/functions/fnc_spawnSmoke.sqf b/addons/chemical/functions/fnc_spawnSmoke.sqf deleted file mode 100644 index 67cb83127..000000000 --- a/addons/chemical/functions/fnc_spawnSmoke.sqf +++ /dev/null @@ -1,42 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii - * - * Arguments: - * 0: PosX - * 1: PosY - * 2: PosZ - * - * Return Value: - * NONE - * - * Example: - * [0,0,0] call kat_chemical_fnc_spawnSmoke; - * - * Public: No - * - * -*/ -params ["_posX","_posY","_posZ"]; - -private _smoke = "KAT_GASTrip_SmokeEffect" createVehicle [_posX,_posY,_posZ]; -hideObjectGlobal _smoke; -[_smoke, 0, ["ACE_MainActions", "ACTION"]] call ACEFUNC(interact_menu,removeActionFromObject); - -if (isServer) then { - private _timeToLive = 10; - private _radius = 10; - private _gasLevel = 1; - - [QGVAR(addGasSource), [_smoke, _radius, _gasLevel, _smoke, { - params ["_endTime", "_smoke"]; - - // If smoke no longer exists, exit - if (isNull _smoke) exitWith { - false // return - }; - - CBA_missionTime < _endTime // return - }, [CBA_missionTime + _timeToLive, _smoke]]] call CBA_fnc_serverEvent; -}; - diff --git a/addons/chemical/functions/fnc_takeOffGasMask.sqf b/addons/chemical/functions/fnc_takeOffGasMask.sqf deleted file mode 100644 index 0d64c4bce..000000000 --- a/addons/chemical/functions/fnc_takeOffGasMask.sqf +++ /dev/null @@ -1,5 +0,0 @@ -#include "..\script_component.hpp" - -params ["_player"]; - -_player unassignItem (goggles _player); diff --git a/addons/chemical/functions/fnc_throwGrenade.sqf b/addons/chemical/functions/fnc_throwGrenade.sqf deleted file mode 100644 index 920612de0..000000000 --- a/addons/chemical/functions/fnc_throwGrenade.sqf +++ /dev/null @@ -1,28 +0,0 @@ -#include "..\script_component.hpp" -/* -* Author: DiGii -* -* Arguments: -* -* -* Return Value: -* NONE -* -* Example: -* Cant be called manualy. -* -* Public: No -*/ - -//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; - -private _config = configFile >> "CfgAmmo" >> _ammo; - -if (getNumber (_config >> "KAT_csGas") != 1) exitWith {}; - -private _timeToLive = getNumber (_config >> "timeToLive"); -private _fuzeTimeBase = getNumber (_config >> "explosionTime"); -private _fuzeTime = _fuzeTimeBase + random [-0.8, 0, 1.2]; -private _currentime = CBA_missiontime; - -[FUNC(csGrenade), [_projectile, _timeToLive, side _unit], _fuzeTime] call CBA_fnc_waitAndExecute; // WE WANT THE OBJECTS SIDE HERE! diff --git a/addons/chemical/functions/fnc_treatmentAdvanced_AtropineLocal.sqf b/addons/chemical/functions/fnc_treatmentAdvanced_AtropineLocal.sqf deleted file mode 100644 index fd15874e9..000000000 --- a/addons/chemical/functions/fnc_treatmentAdvanced_AtropineLocal.sqf +++ /dev/null @@ -1,20 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Mazinski.H - * Locates and Removes Bradycardia Effect. - * - * Arguments: - * 0: Patient - * - * Return Value: - * None - * - * Example: - * [player] call kat_chemical_fnc_treatmentAdvanced_AtropineLocal; - * - * Public: No - */ - -params ["_patient"]; - -_patient setVariable [QGVAR(airPoisoning), false, true]; diff --git a/addons/chemical/functions/fnc_ui_gasModule.sqf b/addons/chemical/functions/fnc_ui_gasModule.sqf deleted file mode 100644 index 7a229d7ce..000000000 --- a/addons/chemical/functions/fnc_ui_gasModule.sqf +++ /dev/null @@ -1,103 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: DiGii, MiszczuZPolski - * Creates the UI for the Zeus Module - * - * Arguments: - * 0: Control - * - * Return Value: - * NONE - * - * Example: - * [1105] call kat_chemical_fnc_ui_gasModule; - * - * Public: No -*/ - -params ["_control"]; - -private _display = ctrlParent _control; -private _ctrlButtonOK = _display displayCtrl 1; -private _ctrlButtonCancel = _display displayCtrl 2; -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); - -_control ctrlRemoveAllEventHandlers "SetFocus"; - -scopeName "Main"; -private _fnc_errorAndClose = { - params ["_msg"]; - _display closeDisplay 0; - deleteVehicle _logic; - [_msg] call ACEFUNC(zeus,showMessage); - breakOut "Main"; -}; - -if !(isNull attachedTo _logic) then { - private _object = attachedTo _logic; - switch (true) do { - case (isNull _object): { - [ACELSTRING(zeus,NothingSelected)] call _fnc_errorAndClose; - }; - case (isPlayer _object): { - ["str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer"] call _fnc_errorAndClose; - }; - case (!alive _object): { - [ACELSTRING(zeus,OnlyAlive)] call _fnc_errorAndClose; - }; - default {}; - }; -}; - -private _fnc_onUnload = { - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); - if (isNull _logic) exitWith {}; - if !(_display getVariable [QGVAR(Confirmed), false]) then - { - if !(isNull attachedTo _logic) then { - deleteVehicle _logic; - } else { - detach (attachedTo _logic); - deleteVehicle _logic; - }; - }; -}; - -private _fnc_onConfirm = { - params [["_ctrlButtonOK", controlNull, [controlNull]]]; - - private _display = ctrlParent _ctrlButtonOK; - if (isNull _display) exitWith {}; - - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); - if (isNull _logic) exitWith {}; - - private _gasLevel = _display getVariable [QGVAR(ui_gastype), 0]; - private _radius = _display getVariable [QGVAR(ui_radius), 20]; - private _isSealable = _display getVariable [QGVAR(ui_sealable), false]; - private _center = objNull; - - if (isNull attachedTo _logic) then { - _center = _logic; - } else { - _center = attachedTo _logic; - }; - - [QGVAR(addGasSource), [_center, _radius, _gasLevel, _logic, { - params ["_endTime", "_logic"]; - - // If logic no longer exists, exit - if (isNull _logic) exitWith { - false // return - }; - - CBA_missionTime < _endTime // return - }, [CBA_missionTime + 1e10, _logic], _isSealable]] call CBA_fnc_serverEvent; - - _display setVariable [QGVAR(Confirmed), true]; - -}; - -_display displayAddEventHandler ["Unload", _fnc_onUnload]; -_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; - diff --git a/addons/chemical/initSettings.inc.sqf b/addons/chemical/initSettings.inc.sqf deleted file mode 100644 index e5e7443a1..000000000 --- a/addons/chemical/initSettings.inc.sqf +++ /dev/null @@ -1,77 +0,0 @@ - -[ - QGVAR(availGasmask), - "EDITBOX", - [LLSTRING(SETTING_AVAIL_GASMASK), LLSTRING(SETTING_AVAIL_GASMASK_DISC)], - CBA_SETTINGS_CAT, - "'G_AirPurifyingRespirator_01_F', 'kat_mask_M50', 'kat_mask_M04'", - 1, - { - private _array = [_this, "CfgGlasses"] call FUNC(getList); - missionNamespace setVariable [QGVAR(availGasmaskList), _array, true]; - }, - true -] call CBA_fnc_addSetting; - -[ - QGVAR(gasmask_durability), - "TIME", - [LLSTRING(SETTING_GASMASK_DURABILITY), LLSTRING(SETTING_GASMASK_DURABILITY_DISC)], - CBA_SETTINGS_CAT, - [1, 3600, 900], - true -] call CBA_fnc_addSetting; - -// Sets sound volume of gas mask breathing -[ - QGVAR(gasMaskSoundVolume), - "SLIDER", - [LLSTRING(SETTING_gasMaskSoundVolume), LLSTRING(SETTING_gasMaskSoundVolume_DESC)], - CBA_SETTINGS_CAT, - [0, 2, 1, 1], - 2, - { - player setVariable [QGVAR(gasMaskSoundVolume), _this, true]; - }, - false -] call CBA_fnc_addSetting; - -// Should gas mask affect stamina -[ - QGVAR(maskStaminaLoss), - "CHECKBOX", - [LLSTRING(SETTING_gasMaskStaminaLoss)], - CBA_SETTINGS_CAT, - [false], - true -] call CBA_fnc_addSetting; - -// Chance of weapon drop by tear gas -[ - QGVAR(tearGasDropChance), - "SLIDER", - [LLSTRING(SETTING_dropWeaponChance), LLSTRING(SETTING_dropWeaponChance_DESC)], - CBA_SETTINGS_CAT, - [0, 1, 0, 2, true], - true -] call CBA_fnc_addSetting; - -// Infection time -[ - QGVAR(infectionTime), - "TIME", - [LLSTRING(SETTING_infectionTime), LLSTRING(SETTING_infectionTime_DESC)], - CBA_SETTINGS_CAT, - [0, 3600, 60], - true -] call CBA_fnc_addSetting; - -// Shows poisioning image -[ - QGVAR(showPoisoning), - "CHECKBOX", - [LLSTRING(SETTING_showPoisoning), LLSTRING(SETTING_showPoisoning_DESC)], - CBA_SETTINGS_CAT, - [true], - true -] call CBA_fnc_addSetting; \ No newline at end of file diff --git a/addons/chemical/models/NBC_M50_glasses.rvmat b/addons/chemical/models/NBC_M50_glasses.rvmat deleted file mode 100644 index 9f6c0710b..000000000 --- a/addons/chemical/models/NBC_M50_glasses.rvmat +++ /dev/null @@ -1,82 +0,0 @@ -class StageTI -{ - texture="#(argb,8,8,3)color(0.5,0,0,0,TI)"; -}; -ambient[]={0,0.38431373,0.59215689,1}; -diffuse[]={0,0.38431373,0.59215689,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={0.99999988,0.9999997,0.69099993,1}; -specularPower=150; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="#(argb,8,8,3)color(0.5,0.5,1,1,NOHQ)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage4 -{ - texture="x\kat\addons\chemical\models\NBC_M50_glasses_AS.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage5 -{ - texture="x\kat\addons\chemical\models\NBC_M50_glasses_SMDI.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage6 -{ - texture="#(ai,64,64,1)fresnel(1,1)"; - uvSource="none"; -}; -class Stage7 -{ - texture="a3\data_f\env_co.paa"; - uvSource="none"; -}; diff --git a/addons/chemical/models/NBC_M50_glasses_AS.paa b/addons/chemical/models/NBC_M50_glasses_AS.paa deleted file mode 100644 index dee6db377..000000000 Binary files a/addons/chemical/models/NBC_M50_glasses_AS.paa and /dev/null differ diff --git a/addons/chemical/models/NBC_M50_glasses_CO.paa b/addons/chemical/models/NBC_M50_glasses_CO.paa deleted file mode 100644 index ab00241d4..000000000 Binary files a/addons/chemical/models/NBC_M50_glasses_CO.paa and /dev/null differ diff --git a/addons/chemical/models/NBC_M50_glasses_SMDI.paa b/addons/chemical/models/NBC_M50_glasses_SMDI.paa deleted file mode 100644 index d26f5a4bb..000000000 Binary files a/addons/chemical/models/NBC_M50_glasses_SMDI.paa and /dev/null differ diff --git a/addons/chemical/models/NBC_M50_mask.rvmat b/addons/chemical/models/NBC_M50_mask.rvmat deleted file mode 100644 index 8132c6904..000000000 --- a/addons/chemical/models/NBC_M50_mask.rvmat +++ /dev/null @@ -1,82 +0,0 @@ -class StageTI -{ - texture="#(argb,8,8,3)color(0.5,0,0,0,TI)"; -}; -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={1,1,0.83529413,1}; -specularPower=55; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="x\kat\addons\chemical\models\NBC_M50_mask_NoHQ.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage4 -{ - texture="x\kat\addons\chemical\models\NBC_M50_mask_AS.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage5 -{ - texture="x\kat\addons\chemical\models\NBC_M50_mask_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage6 -{ - texture="#(ai,64,64,1)fresnel(1,1)"; - uvSource="none"; -}; -class Stage7 -{ - texture="a3\data_f\env_co.paa"; - uvSource="none"; -}; diff --git a/addons/chemical/models/NBC_M50_mask_AS.paa b/addons/chemical/models/NBC_M50_mask_AS.paa deleted file mode 100644 index 5f0c04046..000000000 Binary files a/addons/chemical/models/NBC_M50_mask_AS.paa and /dev/null differ diff --git a/addons/chemical/models/NBC_M50_mask_CO.paa b/addons/chemical/models/NBC_M50_mask_CO.paa deleted file mode 100644 index a4a40b813..000000000 Binary files a/addons/chemical/models/NBC_M50_mask_CO.paa and /dev/null differ diff --git a/addons/chemical/models/NBC_M50_mask_NoHQ.paa b/addons/chemical/models/NBC_M50_mask_NoHQ.paa deleted file mode 100644 index 0b9f81061..000000000 Binary files a/addons/chemical/models/NBC_M50_mask_NoHQ.paa and /dev/null differ diff --git a/addons/chemical/models/NBC_M50_mask_SMDI.paa b/addons/chemical/models/NBC_M50_mask_SMDI.paa deleted file mode 100644 index 8d0764eb5..000000000 Binary files a/addons/chemical/models/NBC_M50_mask_SMDI.paa and /dev/null differ diff --git a/addons/chemical/models/kat_mask_m04.p3d b/addons/chemical/models/kat_mask_m04.p3d deleted file mode 100644 index 0b0cd6593..000000000 Binary files a/addons/chemical/models/kat_mask_m04.p3d and /dev/null differ diff --git a/addons/chemical/models/kat_mask_m50.p3d b/addons/chemical/models/kat_mask_m50.p3d deleted file mode 100644 index c9d7bb3bc..000000000 Binary files a/addons/chemical/models/kat_mask_m50.p3d and /dev/null differ diff --git a/addons/chemical/models/kat_mask_m50.rvmat b/addons/chemical/models/kat_mask_m50.rvmat deleted file mode 100644 index 8a91888b0..000000000 --- a/addons/chemical/models/kat_mask_m50.rvmat +++ /dev/null @@ -1,82 +0,0 @@ -class StageTI -{ - texture="#(argb,8,8,3)color(0.5,0,0,0,TI)"; -}; -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={1,1,0.83529413,1}; -specularPower=55; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="skn_nbc_units\data_m50\NBC_M50_mask_NoHQ.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage4 -{ - texture="skn_nbc_units\data_M50\NBC_M50_mask_AS.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage5 -{ - texture="skn_nbc_units\data_m50\NBC_M50_mask_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage6 -{ - texture="#(ai,64,64,1)fresnel(1,1)"; - uvSource="none"; -}; -class Stage7 -{ - texture="a3\data_f\env_co.paa"; - uvSource="none"; -}; diff --git a/addons/chemical/models/kat_mask_m50_texture.paa b/addons/chemical/models/kat_mask_m50_texture.paa deleted file mode 100644 index a4a40b813..000000000 Binary files a/addons/chemical/models/kat_mask_m50_texture.paa and /dev/null differ diff --git a/addons/chemical/models/m04_hood_dry.rvmat b/addons/chemical/models/m04_hood_dry.rvmat deleted file mode 100644 index ef478d3ea..000000000 --- a/addons/chemical/models/m04_hood_dry.rvmat +++ /dev/null @@ -1,82 +0,0 @@ -class StageTI -{ - texture="#(argb,8,8,3)color(0.5,0,0,0,TI)"; -}; -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={0.89999998,0.89999998,0.89999998,1}; -specularPower=75; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="x\kat\addons\chemical\models\m04_mask_hood_nohq.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage4 -{ - texture="x\kat\addons\chemical\models\m04_mask_hood_dry_as.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage5 -{ - texture="x\kat\addons\chemical\models\m04_mask_hood_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage6 -{ - texture="#(ai,64,64,1)fresnel(1,1)"; - uvSource="none"; -}; -class Stage7 -{ - texture="a3\data_f\env_co.paa"; - uvSource="none"; -}; diff --git a/addons/chemical/models/m04_mask_glass_dry.rvmat b/addons/chemical/models/m04_mask_glass_dry.rvmat deleted file mode 100644 index 6627148c8..000000000 --- a/addons/chemical/models/m04_mask_glass_dry.rvmat +++ /dev/null @@ -1,82 +0,0 @@ -class StageTI -{ - texture="#(argb,8,8,3)color(0.5,0,0,0,TI)"; -}; -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={0.85496026,1,1,1}; -specularPower=150; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="#(argb,8,8,3)color(0.5,0.5,1,1,NOHQ)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage4 -{ - texture="#(argb,8,8,3)color(1,1,1,1,AS)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage5 -{ - texture="x\kat\addons\chemical\models\m04_mask_glass_dry_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,1}; - pos[]={0,0,0}; - }; -}; -class Stage6 -{ - texture="#(ai,64,64,1)fresnelGlass()"; - uvSource="none"; -}; -class Stage7 -{ - texture="a3\data_f\env_co.paa"; - uvSource="none"; -}; diff --git a/addons/chemical/models/m04_mask_glass_dry_co.paa b/addons/chemical/models/m04_mask_glass_dry_co.paa deleted file mode 100644 index 3e786c1dc..000000000 Binary files a/addons/chemical/models/m04_mask_glass_dry_co.paa and /dev/null differ diff --git a/addons/chemical/models/m04_mask_glass_dry_smdi.paa b/addons/chemical/models/m04_mask_glass_dry_smdi.paa deleted file mode 100644 index d35322579..000000000 Binary files a/addons/chemical/models/m04_mask_glass_dry_smdi.paa and /dev/null differ diff --git a/addons/chemical/models/m04_mask_hood_blu_co.paa b/addons/chemical/models/m04_mask_hood_blu_co.paa deleted file mode 100644 index c9a62e266..000000000 Binary files a/addons/chemical/models/m04_mask_hood_blu_co.paa and /dev/null differ diff --git a/addons/chemical/models/m04_mask_hood_dry_as.paa b/addons/chemical/models/m04_mask_hood_dry_as.paa deleted file mode 100644 index 9e59bdc96..000000000 Binary files a/addons/chemical/models/m04_mask_hood_dry_as.paa and /dev/null differ diff --git a/addons/chemical/models/m04_mask_hood_nohq.paa b/addons/chemical/models/m04_mask_hood_nohq.paa deleted file mode 100644 index f568adb3f..000000000 Binary files a/addons/chemical/models/m04_mask_hood_nohq.paa and /dev/null differ diff --git a/addons/chemical/models/m04_mask_hood_smdi.paa b/addons/chemical/models/m04_mask_hood_smdi.paa deleted file mode 100644 index 9c9f9bac3..000000000 Binary files a/addons/chemical/models/m04_mask_hood_smdi.paa and /dev/null differ diff --git a/addons/chemical/models/model.cfg b/addons/chemical/models/model.cfg deleted file mode 100644 index 17899da9d..000000000 --- a/addons/chemical/models/model.cfg +++ /dev/null @@ -1,164 +0,0 @@ - -class CfgSkeletons -{ - class Default - { - isDiscrete = 1; - skeletonInherit = ""; - skeletonBones[] = {}; - }; - class OFP2_ManSkeleton - { - isDiscrete = 0; - skeletonInherit = ""; - skeletonBones[] = - { - "Pelvis","", - "Spine","Pelvis", - "Spine1","Spine", - "Spine2","Spine1", - "Spine3","Spine2", - "Camera","Pelvis", - "weapon","Spine1", - "launcher","Spine1", - - // Head skeleton in hierarchy - "neck","Spine3", - "neck1","neck", - "head","neck1", - - // New facial features - "Face_Hub","head", - "Face_Jawbone","Face_Hub", - "Face_Jowl","Face_Jawbone", - "Face_chopRight","Face_Jawbone", - "Face_chopLeft","Face_Jawbone", - "Face_LipLowerMiddle","Face_Jawbone", - "Face_LipLowerLeft","Face_Jawbone", - "Face_LipLowerRight","Face_Jawbone", - "Face_Chin","Face_Jawbone", - "Face_Tongue","Face_Jawbone", - "Face_CornerRight","Face_Hub", - "Face_CheekSideRight","Face_CornerRight", - "Face_CornerLeft","Face_Hub", - "Face_CheekSideLeft","Face_CornerLeft", - "Face_CheekFrontRight","Face_Hub", - "Face_CheekFrontLeft","Face_Hub", - "Face_CheekUpperRight","Face_Hub", - "Face_CheekUpperLeft","Face_Hub", - "Face_LipUpperMiddle","Face_Hub", - "Face_LipUpperRight","Face_Hub", - "Face_LipUpperLeft","Face_Hub", - "Face_NostrilRight","Face_Hub", - "Face_NostrilLeft","Face_Hub", - "Face_Forehead","Face_Hub", - "Face_BrowFrontRight","Face_Forehead", - "Face_BrowFrontLeft","Face_Forehead", - "Face_BrowMiddle","Face_Forehead", - "Face_BrowSideRight","Face_Forehead", - "Face_BrowSideLeft","Face_Forehead", - "Face_Eyelids","Face_Hub", - "Face_EyelidUpperRight","Face_Hub", - "Face_EyelidUpperLeft","Face_Hub", - "Face_EyelidLowerRight","Face_Hub", - "Face_EyelidLowerLeft","Face_Hub", - "EyeLeft","Face_Hub", - "EyeRight","Face_Hub", - - // Left upper side - "LeftShoulder","Spine3", - "LeftArm","LeftShoulder", - "LeftArmRoll","LeftArm", - "LeftForeArm","LeftArmRoll", - "LeftForeArmRoll","LeftForeArm", - "LeftHand","LeftForeArmRoll", - "LeftHandRing","LeftHand", - "LeftHandRing1","LeftHandRing", - "LeftHandRing2","LeftHandRing1", - "LeftHandRing3","LeftHandRing2", - "LeftHandPinky1","LeftHandRing", - "LeftHandPinky2","LeftHandPinky1", - "LeftHandPinky3","LeftHandPinky2", - "LeftHandMiddle1","LeftHand", - "LeftHandMiddle2","LeftHandMiddle1", - "LeftHandMiddle3","LeftHandMiddle2", - "LeftHandIndex1","LeftHand", - "LeftHandIndex2","LeftHandIndex1", - "LeftHandIndex3","LeftHandIndex2", - "LeftHandThumb1","LeftHand", - "LeftHandThumb2","LeftHandThumb1", - "LeftHandThumb3","LeftHandThumb2", - - // Right upper side - "RightShoulder","Spine3", - "RightArm","RightShoulder", - "RightArmRoll","RightArm", - "RightForeArm","RightArmRoll", - "RightForeArmRoll","RightForeArm", - "RightHand","RightForeArmRoll", - "RightHandRing","RightHand", - "RightHandRing1","RightHandRing", - "RightHandRing2","RightHandRing1", - "RightHandRing3","RightHandRing2", - "RightHandPinky1","RightHandRing", - "RightHandPinky2","RightHandPinky1", - "RightHandPinky3","RightHandPinky2", - "RightHandMiddle1","RightHand", - "RightHandMiddle2","RightHandMiddle1", - "RightHandMiddle3","RightHandMiddle2", - "RightHandIndex1","RightHand", - "RightHandIndex2","RightHandIndex1", - "RightHandIndex3","RightHandIndex2", - "RightHandThumb1","RightHand", - "RightHandThumb2","RightHandThumb1", - "RightHandThumb3","RightHandThumb2", - - // Left lower side - "LeftUpLeg","Pelvis", - "LeftUpLegRoll","LeftUpLeg", - "LeftLeg","LeftUpLegRoll", - "LeftLegRoll","LeftLeg", - "LeftFoot","LeftLegRoll", - "LeftToeBase","LeftFoot", - - // Right lower side - "RightUpLeg","Pelvis", - "RightUpLegRoll","RightUpLeg", - "RightLeg","RightUpLegRoll", - "RightLegRoll","RightLeg", - "RightFoot","RightLegRoll", - "RightToeBase","RightFoot" - }; - // location of pivot points (local axes) for hierarchical animation - pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d"; - }; -}; - -class CfgModels -{ - class Default - { - sectionsInherit=""; - sections[] = {}; - skeletonName = ""; - }; - class ArmaMan : Default - { - htMin = 60; // Minimum half-cooling time (in seconds) - htMax = 1800; // Maximum half-cooling time (in seconds) - afMax = 30; // Maximum temperature in case the model is alive (in celsius) - mfMax = 0; // Maximum temperature when the model is moving (in celsius) - mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)). - tBody = 37; // Metabolism temperature of the model (in celsius) - - sections[] = - { - "osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury","injury_body", "injury_legs", "injury_hands", - "clan","clan_sign","Camo","CamoB","Camo1","Camo2","personality","hl", "injury_head" - }; - skeletonName = "OFP2_ManSkeleton"; - }; - - class kat_mask_m04 : ArmaMan {}; - class kat_mask_m50 : ArmaMan {}; -}; diff --git a/addons/chemical/script_component.hpp b/addons/chemical/script_component.hpp deleted file mode 100644 index 93a09c3cc..000000000 --- a/addons/chemical/script_component.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#define COMPONENT chemical -#define COMPONENT_BEAUTIFIED Chemical -#include "\x\kat\addons\main\script_mod.hpp" -#include "\x\kat\addons\gui\gui_defines.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_CHEMICAL - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_CHEMICAL - #define DEBUG_SETTINGS DEBUG_SETTINGS_CHEMICAL -#endif - -#include "\x\kat\addons\main\script_macros.hpp" - -// UI grid -#define SIZEX ((safeZoneW / safeZoneH) min 1.2) -#define SIZEY (SIZEX / 1.2) -#define W_PART(num) (num * (SIZEX / 40)) -#define H_PART(num) (num * (SIZEY / 25)) -#define X_PART(num) (W_PART(num) + (safeZoneX + (safeZoneW - SIZEX) / 2)) -#define Y_PART(num) (H_PART(num) + (safeZoneY + (safeZoneH - SIZEY) / 2)) - -#define GAS_MANAGER_PFH_DELAY 1 diff --git a/addons/chemical/stringtable.xml b/addons/chemical/stringtable.xml deleted file mode 100644 index 53dcee503..000000000 --- a/addons/chemical/stringtable.xml +++ /dev/null @@ -1,978 +0,0 @@ - - - - - 82mm CS-Gas Round - 82mm Granát s CS-Plynem - Cartouche de 82mm de gaz CS - Granada lacrimogena de 82mm - Colpo 82mm di CS-Gas - Pocisk gazu łzawiącego kal.82mm - Cartucho de gás CS de 82mm - 82-мм CS-Газовый патрон - [CSW] 82mm Reizgas Mörser Granate - [CSW] 82mm CS가스탄 - [CSW] 82mm CSガス弾 - 82毫米CS瓦斯彈藥 - 82毫米CS燃气轮 - 82mm CS-kaasulaastikuori - 82mm CS-Gasgranaat - - - CS-Gas - CS-Plyn - Gaz CS - Gas lacrimogeno - CS-Gas - Gaz łzawiący - Gás CS - CS-газ - CS-Gas (Reizgas) - CS가스 - CSガス - CS瓦斯 - CS毒气 - CS-kaasu - CS-Gas - - - Replace gas mask filter - Vyměnit filtr Plynové masky - Remplacer le filtre du masque à gaz - Reemplazar filtro de la mascara - Sostituisci il filtro della maschera a gas - Wymień filtr - Substituir o filtro da máscara de gás - Заменить фильтр противогаза - Filter der Gasmaske tauschen - 방독면 정화통 교체 - フィルターを交換する - 更換防毒面具濾芯 - 更换防毒面具过滤器 - Vaihda kaasunaamarin suodatin - Vervang het filter van de gasmasker - - - Check gas mask durability - Zkontrolovat odolnost Plynové masky - Vérifier la durabilité du masque à gaz - Revisar durabilidad de la mascara - Controlla la durabilità della maschera a gas - Sprawdź wytrzymałość maski gazowej - Checar a durabilidade da máscara de gás - Проверьте время действия противогаза - Haltbarkeit der Gasmaske prüfen - 방독면 지속시간 확인 - ガスマスクの耐久寿命を確認 - 檢查防毒面具耐用度 - 检查防毒面具的耐用性 - Tarkista kaasunaamarin kestävyys - Check levensduur Gasmasker - - - Used to detect KAT toxic chemicals - Používá se k detekování toxických chemikálií KAT - Utilisé pour détecter les produits chimiques toxiques KAT - Utilizzato per rilevare sostanze chimiche tossiche KAT - zum Nachweis toxischer KAT-Chemikalien - KAT毒性化学物質の検出に使用 - 用於偵測 KAT 有毒化學物質 - 用于检测KAT有毒化学物质 - - - JCAD Chemical Detector - Chemický detektor JCAD - Détecteur de produits chimiques JCAD - Rilevatore chimico JCAD - JCAD Chemiedetektor - JCAD 化学剤検知器 - JCAD 化學偵測器 - JCAD化学检测仪 - - - JCAD - JCAD - JCAD - JCAD - JCAD - JCAD - JCAD - JCAD - - - OFF - OFF - ÉTEINT - Spento - AUS - オフ - 關閉 - 关闭 - - - Disable Warning Tone - Vypnout tón varování - Désactiver les avertissements sonores - Disabilita il segnale acustico d'avviso - Warnton ausschalten - 警告音を無効化 - 停用警告音 - 禁用警告音 - - - Turn On Detector - Zapnout detektor - Mise en marche du détecteur - Attiva il rilevatore - Detektor einschalten - 検知器をつける - 打開探測器 - 打开探测器 - - - Enable Warning Tone - Povolit tón varování - Activer les avertissements sonores - Abilita il segnale acustico d'avviso - Warnton einschalten - 警告音を有効化 - 啟用警告音 - 启用警告音 - - - [ACE] 82mm Gas Rounds Box - [ACE] 82mm Gas Rounds Box - [ACE] Boîte de cartouches de gaz de 82mm - [ACE] Caja de rondas de 82mm de gas - [ACE] Box colpi a gas 82mm - [ACE] Skrzynka amunicji gazowej 82mm - [ACE] Caixa de cartuchos de gás tóxico de 82 mm - [ACE] Коробка с 82-мм газовыми патронами - [ACE] 82mm Gaspatronenkiste - [ACE] 82mm 가스 탄약상자 - [ACE] 82mm ガス弾入り弾薬箱 - [ACE] 82毫米毒氣彈藥箱 - [ACE]82毫米燃气轮箱 - [ACE] 82mm kaasulaastin kuorilaatikko - [ACE] 82mm Gasgranatenkist - - - Gas mask filter - Filtr Plynových masek - Filtre de masque à gaz - Filtro de la mascara de gas - Filtro della maschera a gas - Filtr do maski gazowej - Filtro de máscara de gás - Фильтр противогаза - Gasmaskenfilter - 방독면 정화통 - ガスマスク用フィルター - 防毒面具濾芯 - 防毒面具过滤器 - Kaasunaamariin suodatin - Gasmasker filter - - - Replacement filter for gas mask - Náhradní filtr pro Plynové masky - Filtre de rechange pour masque à gaz - Recambio de filtro para la mascara de gas - Filtro di ricambio per la maschera a gas - Filtr zastępczy do maski gazowej - Filtro substituto para máscara de gás - Сменный фильтр для противогаза - Ersatzfilter für Gasmaske - 방독면의 정화통을 교체합니다. - ガスマスクの為の交換用フィルター - 用於更換防毒面具的濾芯 - 更换防毒面具过滤器 - Vaihtosuodatin kaasunaamariin - Vervangend filter voor gasmaskers - - - Create contaminated area / object - Vytvořit kontaminovanou oblast / objekt - Créer une zone / objet contaminé.e - Crear area contaminada / objeto - Crea un oggetto/zona contaminata - Stwórz skażony obszar/obiekt - Criar área/objeto contaminado - Создать загрязненную область/объект - Kontaminierten Bereich / Gegenstand erstellen - 오염지대/오염된 개체 생성 - 汚染エリア/オブジェクトの作成 - 創建污染區域/物體 - 创建污染区域/物体 - Saastuta alue/esine - Creëer gecontamineerd gebied / object - - - Seal leak - Utěsnit netěsnost - Sceller la fuite - Sellar fuga - Fuga di gas - Uszczelnij wyciek - Vazamento de gás - Герметизация утечки - Leck abdichten - 누출 밀봉 - ガス漏れをシールする - 密封洩漏 - 密封泄漏 - Tuki vuoto - Dicht lek - - - You are about to create a contaminated Object. - Chystáte se vytvořit kontaminovaný objekt - Vous êtes sur le point de créer un objet contaminé. - Estas creando un objeto contaminado - Stai creando un oggetto contaminato. - Zaraz stworzysz skażony obiekt - Você está prestes a criar um objeto contaminado. - Вы собираетесь создать зараженный объект. - Du erstellst gerade einen kontaminierten Gegenstand. - 오염된 개체를 생성 중입니다. - 汚染されたオブジェクトを作成しようとしています。 - 您即將創建一個受污染的物體。 - 您将创建一个受污染的对象。 - Olet saastuttamassa esineen. - Je staat op het punt een gecontamineerd object te creëeren. - - - You are about to create a contaminated Zone. - Chystáte se vytvořit kontaminovou oblast - Vous êtes sur le point de créer une zone contaminée. - Estas creando una zona contaminada - Stao creando una zona contaminata. - Zaraz stworzysz skażony obszar - Você está prestes a criar uma zona contaminada. - Вы собираетесь создать загрязненную зону. - Du erstellst gerade eine kontaminierte Zone. - 오염지대를 생성 중입니다. - 汚染されたゾーンを作成しようとしています。 - 您即將創建一個受污染的區域。 - 您将创建一个污染区。 - Olet saastuttamassa alueen. - Je staat op het punt om een gecontamineerd gebied te creëeren. - - - Radius around the module which is filled with gas. - Poloměr kolem modulu která bude zamořen plynem - Zone autour du module remplie de gaz - Radio alrededor del modulo que se llenará de gas - Raggio attorno al modulo che sarà riempito di gas. - Zasięg wokół modułu, który jest skażony - Raio ao redor do módulo que está cheio de gás. - Радиус вокруг модуля, заполненного газом. - Radius um das Modul, welcher mit Gas gefüllt ist. - 가스로 채워진 모듈 주변 반경을 설정합니다. - モジュール周囲の半径がガスで満たされます - 模塊周圍充滿氣體的半徑。 - 充满毒气的模块周围的半径。 - Kaasulla täytetyn alueen ympärillä oleva säde - Radius om de module dat gevuld is met gas. - - - The Maximum Range is a range around the Minimal Range where the gas is less lethal and you have a longer chance of survival.(distance from module to outer ring) - Maximální vzdálenost je vzdálenost kolem Minimální vzdálenosti kde je plyn méně smrtící a máte větší šanci na přežití (vzdálenost od modulu k vnějšímu kruhu). - Le rayon maximal est le rayon autour du rayon minimal où le gaz est moins létal et où vous avez une plus longue chance de survie. (Distance depuis le module jusqu'au cercle extérieur) - El rango maximo es el rango alrededor del rango minimo en el cual el gas es menos letal y tienes mas posibilidades de sobrevivir (distancia desde el modulo al anillo exterior) - Il raggio massimo è un raggio attorno al raggio minimo dove il gas è meno letale e hai una possibilità maggiore di sopravvivenza (distanza dal modulo all'anello esterno) - Maksymalny zasięg określa obszar wokół modułu, gdzie gaz jest mniej zabójczy i masz większe szanse na przeżycie (odległość od modułu do zewnętrznego pierścienia) - O Alcance Máximo é um alcance ao redor do Alcance Mínimo onde o gás é menos letal e você tem uma chance maior de sobrevivência (distância do módulo ao anel externo) - Максимальный радиус-это радиус вокруг минимального радиуса, при котором газ менее смертоносен и у вас больше шансов на выживание. (Расстояние от модуля до внешнего круга) - Die maximale Reichweite ist der Bereich über der minimalen Reichweite hinaus, in welcher das Gas weniger tödlich wirkt und man eine längere Überlebenschance hat (Distanz von Modul bis äußerer Ring). - 최대 범위는 가스가 덜 치명적이고 생존 가능성이 더 긴 최소 범위 주변의 범위입니다.(모듈에서 외부 고리까지의 거리) - 最大範囲は、ガスの致死量が少なく、生存率が高くなる最小範囲の周辺を指します(モジュールから外周範囲までの距離) - 最大範圍是最小範圍周圍的區域,氣體毒性較小,您有更長的生存機會。(從模塊到外環的距離) - 最大射程是最小射程附近的一个范围,在这个范围内,毒气的致命性较低,你有更长的生存机会。(模块到外环的距离) - Maksimietäisyys on vähimmäisalue, jossa kaasu on vähemmän tappava ja sinulla on pidempi mahdollisuus selviytyä. (etäisyys moduulista ulkorenkaaseen) - Het maximaal bereik is het bereik om het minimale bereik waar het gas minder dodelijk is, en je een langere overlevings hebt. (afstand van module tot buitenste ring) - - - To create a contaminated object place the module on a empty object. - Pro vytvoření kontaminovaného objektu položte modul na prázdný objekt. - Pour créer un objet contaminé placez le module sur un objet vide. - Para crear un objeto contaminado situa el modulo en un objeto vacio - Per creare un oggetto contaminato piazza il modulo su un oggetto vuoto. - Aby stworzyć skażony obiekt, umieść moduł na pustym obiekcie. - Para criar um objeto contaminado, coloque o módulo em um objeto vazio. - Чтобы создать зараженный объект, поместите модуль на пустой объект. - Um einen kontaminierten Gegenstand zu erstellen, platziere das Modul auf einem leeren Objekt. - 오염된 개체를 만들려면 모듈을 비어있는 개체 위에 놓아야 합니다. - 汚染されたオブジェクトを作成するには、モジュールを空のオブジェクトに配置します。 - 要創建受污染的物體,請將模塊放置在一個空的物體上。 - 要创建受污染的对象,请将模块放置在空对象上。 - Luodaksesi saastuneen objektin aseta moduuli tyhjälle objektille. - Om een gecontamineerd object te creëeren, moet je de module op een leeg object plaatsen. - - - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - Hydra GAS 19x - 독가스 히드라 로켓 19발 - ハイドラ 有毒ガス 19x - Hydra毒氣火箭 19x - 九头蛇毒气 19x - Hydra KAASU 19x - Hydra GAS 19x - - - 70mm GAS - 70mm GAS - 70mm GAS - 70mm GAS - 70mm GAS - 70mm GAS - 70mm GAS - 70mm GAS - 70mm GAS - 70mm 독가스 - 70mm 有毒ガス - 70毫米毒氣火箭 - 70mm毒气 - 70mm KAASU - 70mm GAS - - - Unguided rockets with Toxic-gas warhead. - Neřízené rakety s bojovou hlavicí s toxickým plynem - Roquettes non-guidées contenant un gaz toxique - Cohetes no-guiados con cabeza de gas toxico - Razzo non guidato con una carica di gas tossico. - Rakiety niekierowane z głowicą zawierającą toksyczny gaz - Foguetes não guiados com ogiva de gás tóxico. - Неуправляемые ракеты с боеголовкой из токсичного газа. - Ungelenkte Raketen mit Senfgas Gefechtskopf. - 독성 가스 탄두가 장착된 무유도 로켓입니다. - 有毒ガス弾頭を搭載した無誘導ロケット。 - 裝有毒氣彈頭的無導引火箭。 - 装有有毒气体弹头的非制导火箭。 - Ohjaamattomat raketit, joissa on myrkyllinen kaasukärje - Ongestuurde rakketen met een gifgas kop. - - - Intoxication - Intoxikace - Intoxication - Intoxicación - Intossicazione - Zatrucie - Intoxicação - Интоксикация - Intoxikation - 중독 - 中毒 - 中毒 - 中毒 - Päihtymys - Intoxicatie - - - Tear gas (Level 0) - Slzný plyn (Level 0) - Gaz lacrymogène (Niveau 0) - Gas Lacrimogeno (Livello 0) - Tränengas (Level 0) - 催涙ガス (レベル 0) - - - Toxic gas (Level 1) - Toxický plyn (Úroveň 1) - Gaz toxique (Niveau 1) - Gas toxico (Nivel 1) - Gas Lacrimogeno (Livello 1) - Toksyczny gaz ( Poziom 1) - Gás tóxico (Nível 1) - Токсичный газ (уровень 1) - Senfgas (Level 1) - 유독가스 (레벨 1) - 有毒ガス (レベル 1) - 有毒氣體(1級) - 有毒气体(1级) - Myrkyllinen kaasu (taso 1) - Gifgas (Level 1) - - - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB 집속탄 - M43 BZガス クラスターLGB - M43 BZ LGB 集束炸彈 - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - - - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB 집속탄 - 2x M43 BZガス クラスターLGB - 2x M43 BZ LGB 集束炸彈 - 2x M43 BZ轻型卡车 - 2x M43 BZ LGB - 2x M43 BZ LGB - - - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB 집속탄 - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - M43 BZ LGB - - - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ LGB 집속탄 - 2x M43 BZ LGB - 2x M43 BZ LGB - 2x M43 BZ轻型卡车 - 2x M43 BZ LGB - 2x M43 BZ LGB - - - Laser Guided Cluster Bomb with a chemical gas payload. - Laserem naváděná kazetová munice s obsahem chemického plynu - Bombe à sous-munitions à guidée laser contenant un gaz chimique. - Bomba de fragmentacion guiada por laser con una carga de gas toxico - Bombe cluster laser guidate con un carico di gas tossico. - Laser Guided Cluster Bomb z ładunkiem chemicznym - Bomba de fragmentação guiada por laser com uma carga útil de gás químico. - Кассетная бомба с лазерным наведением и боевой нагрузкой из химического газа. - Laser gelenkte Streubombe mit Senfgas Gefechtskopf. - 화학가스가 탑재된 레이저 유도 집속탄입니다. - 化学ガスを搭載したレーザー誘導クラスター爆弾。 - 裝有化學毒氣彈頭的雷射制導集束炸彈。 - 带有化学毒气有效载荷的激光制导集束炸弹。 - Laserohjattu rypälepommi kemiallisen kaasun hyötykuormalla - Laser gestuurde clusterbom met een chemisch gas als lading. - - - M7A3 Riot CS gas grenade - Granát M7A3 s CS-Plynem - Grenace à gaz CS anti-émeute M7A3 - Granada antidisturbios de gas lacrimogeno M7A3 - Granate CS-Gas antisommossa M7A3 - M7A3 Granat gazowy - Granada de gás CS M7A3 - Газовая граната M7A3 Riot CS - M7A3 CS Reizgas Granate - M7A3 진압용 CS가스 수류탄 - M7A3 鎮圧用CSガス手榴弾 - M7A3 防暴CS瓦斯手榴彈 - M7A3防暴CS瓦斯手榴弹 - M7A3 CS kaasukranaatti - M7A3 CS Traangasgranaat - - - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - M7A3 - - - The M7A3 CS gas grenade is a non-lethal tear gas grenade that causes severe burning of the mucous membranes and eyes on contact. - M7A3 CS je plynový granát s nesmrtícím slzným plynem, který způsobuje závažná popálení sliznic a očí při kontaktu s nimi. - La grenade à gaz M7A3 CS est une grenade à gaz lacrymogène non-létale qui crée de graves brûlures sur les membranes muqueuses et les yeux au contact. - La granada M7A3 CS es una granada no-letal que se utiliza para causar quemaduras severas en las membranas mucosas y en los ojos al contacto. - La granata a gas M7A3 CS è una granata con gas non letale che causa bruciature importanti alle membrane mucose e al contatto con gli occhi. - Granat gazowy M7A3 CS to nieśmiercionośny granat z gazem łzawiącym, który przy kontakcie powoduje silne pieczenie błon śluzowych i oczu. - A granada de gás M7A3 CS é uma granada de gás lacrimogêneo não letal que causa queimaduras graves nas membranas mucosas e nos olhos ao entrar em contato. - Газовая граната M7A3 CS - это несмертельная граната со слезоточивым газом, которая при попадании вызывает сильное жжение слизистых оболочек и глаз. - Die M7A3 CS Reizgas Granate ist eine nicht tödliche Tränengas Granate, die bei Kontakt starkes Brennen der Schleimhäute und Augen auslöst. - M7A3 CS 가스 수류탄은 접촉 시 점막과 눈에 심한 화상을 입히는 비치명적 최루탄입니다. - M7A3 CSガス手榴弾は、接触すると粘膜や目に激しい火傷のような痛みを負わせる非致死性の催涙ガス手榴弾である。 - M7A3 CS催淚瓦斯手榴彈是一種非致命性手榴彈,接觸後會引起粘膜和眼睛嚴重灼痛。 - M7A3 CS毒气手榴弹是一种非致命性催泪瓦斯手榴弹,接触后会严重灼伤粘膜和眼睛。 - M7A3 CS -kaasukranaatti on ei-tappava kyynelkaasukranaatti, joka koskettaa limakalvoja ja silmiä vakavasti. - The M7A3 CS gasgranaat is een niet-dodelijke traangasgranaat dat op contact een ernstig brandend gevoel in het slijmvlies en de ogen creëerd. - - - Put on gas mask - Nasadit Plynovou Masku - Mettre le masque à gaz - Indossa la maschera antigas - Gasmaske aufsetzen - ガスマスクを装着 - 戴上防毒面具 - 戴上防毒面具 - - - Accepted gas masks - Povolené plynové masky - Masques à gaz acceptés - Máscaras de gas aceptadas - Maschere antigas accettate - Dozwolone maski gazowe - Permitir máscaras de gás - Разрешенные противогазы - Akzeptierte Gasmasken - 방독면 허용 - 認証済みのガスマスク - 可使用的防毒面具 - 被接受的防毒面具 - Hyväksytyt kaasunaamarit - Geaccepteerde gasmaskers - - - Enter here the classname of the masks that should work with the system. - Zde vložte "classname" plynových masek, které mají spolupracovat s tímto systémem. - Entrez ici le classname des masques à gaz fonctionnant avec le système - Introduce aqui los classnames de las máscaras para que funcionen - Inserisci qui la classname delle maschere a gas che dovrebbero funzionare con il sistema. - Wpisz classname maski, która ma działać z systemem - Digite aqui o classname das máscaras que devem funcionar com o sistema. - Введите здесь имя класса масок, которые должны работать с системой. - Um externe Gasmasken zu integrieren, hier Classnames eintragen. - 시스템에서 작동해야 하는 마스크의 클래스네임을 입력합니다. - システムで動作させたいガスマスクのクラス名をここに入力します。 - 在此處輸入應與系統配合使用的面罩的類名。 - 在此处输入应与系统配合使用的掩码的类名。 - Anna niiden maskien luokan nimet, joiden pitäisi toimia järjestelmän kanssa - Voer hier de classnames toe van gasmaskers die zouden moeten werken met het systeem. - - - Gas masks durability - Odolnost Plynových masek - Durabilité des masques à gaz - Durabilida de las máscaras de gas - Durabilità delle maschere a gas - Wytrzymałość maski gazowej - Durabilidade das máscaras de gás - Время действия противогазов - Haltbarkeit der Gasmaske - 방독면의 지속시간 - ガスマスクの耐久寿命 - 防毒面具耐用度 - 防毒面具耐用性 - Kaasunaamarien kestävyys - Levensduur van gasmaskers - - - Determines how long you can stand in the gas with a gas mask without getting infected. - Určuje jak dlouho můžete stát v plynu s plynovou maskou bez následků. - Détermine la durée où vous pouvez tenir dans un gaz avec un masque à gaz sans être infecté - Determina cuanto puedes resistir en el gas sin mascara de gas y no resultando infectado - Determina per quanto tempo puoi stare nel gas con la maschera a gas prima di risultare intossicato. - Ustala jak długo możesz stać w gazie z maską bez zagrożenia infekcją - Determina quanto tempo você pode ficar no gás com uma máscara de gás sem ser infectado. - Определяет, как долго вы можете находиться в газе с противогазом без заражения. - Bestimmt die Dauer, mit welcher man mit Gasmaske im Gas stehen kann, ohne infiziert zu werden. - 방독면을 사용하여 중독되지 않고 가스에 얼마나 오래 있을 수 있는지 결정합니다. - ガスの中でガスマスクを装備した時に毒状態にならないで立っていられる時間を定義します - 確定您在佩戴防毒面具的情況下,可以在毒氣中停留多長時間,而不會受到感染。 - 确定戴防毒面具在毒气中站立多长时间而不会感染。 - Määrittää, kuinka kauan voit seistä kaasussa kaasunaamarin kanssa vaikuttamatta siihen - Bepaald hoelang je in gas kan staan zonder dat je geïnfecteerd raakt. - - - Drop Weapon Chance - Šance na upuštění zbraně - Chance de lâcher l'arme - Possibilità di perdere l'arma - Chance, die Waffe unter Tränengas zu verlieren - 武器を落とす確率 - 丟下武器機會 - 投掷武器机会 - - - Determines chance for dropping weapon while in tear gas - Určuje šanci na upuštění zbraně v přítomnosti slzného plynu - Détermine les chances de lâcher l'arme en cas d'exposition aux gaz lacrymogènes. - Determina la probabilità di perdere l'arma mentre si è nel gas lacrimogeno - Bestimmt die Wahrscheinlichkeit, die Waffe zu verlieren, während man unter dem Einfluss von Tränengas steht - 催涙ガスの中で武器を落とす確率を定義します - 確定在催淚瓦斯中丟下武器的機率 - 确定在催泪瓦斯中投掷武器的几率 - - - Gas Mask Sound Volume - Hlasitost zvuků plynové masky - Volume sonore du masque à gaz - Volume effetti maschera antigas - Lautstärke der Gasmaske - ガスマスクの音量 - 防毒面具音量 - 防毒面具音量 - - - Determines how loud the breathing sounds are when using the gas mask - Určuje, jak hlasité jsou dýchací zvuky při používání plynové masky - Détermine l'intensité des bruits respiratoires lors de l'utilisation du masque à gaz. - Determina quanto è alto il volume del respiro mentre si utilizza la maschera antigas - Bestimmt die Lautstärke der Atemgeräusche während des Tragens einer Gasmaske - ガスマスク使用時の呼吸音の大きさを定義します - 確定使用防毒面具時呼吸聲的音量 - 确定使用防毒面具时呼吸声的音量 - - - Enable Stamina Loss when using Gas Mask - Povolit ztrátu staminy při použití plynové masky - Perte d'endurance avec l'utilisation du masque à gaz - Abilità la perdita di Resistenza mentre si usa la maschera antigas - Ausdauerverlust bei der Nutzung von Gasmasken aktivieren - ガスマスク使用時のスタミナ減少を有効化 - 啟用使用防毒面具時的體力流失 - - - Time until infection - Čas do infekce - Durée avec l'infection - Tiempo hasta la infeccion - Tempo massimo prima dell'intossicazione - Czas do infekcji - Tempo até a infecção - Время до заражения - Zeit bis zur Infektion - 중독까지 걸리는 시간 - 感染までの時間 - 感染所需時間 - 感染前的时间 - Aikaa tartunnan saamiseen - Tijd tot infectie - - - Time you can stand in the gas before you get infected or need a gas mask. - Čas po který můžete stát v plynu bez infikování se či potřeby plynové masky - Durée où vous pouvez tenir dans un gaz avant d'être infecté ou d'avoir besoin d'un masque à gaz - Tiempo que puedes resistir en el gas hasta que resultes infectado o requieras una mascara de gas - Tempo che puoi restare nel gas prima di rimanere intossicato o aver bisogno di una maschera antigas. - Ustala jak długo możesz stać w gazie zanim zostaniesz zainfekowany lub będziesz potrzebował maski gazowej. - Tempo que você pode ficar no gás antes de ser infectado ou precisar de uma máscara de gás. - Время, когда вы сможете постоять в газе, прежде чем заразитесь или вам понадобится противогаз. - Die Zeit, in der man im Gas stehen kann, bevor man infiziert wird bzw. eine Gasmaske benötigt. - 당신이 중독되거나 방독면이 필요하기 전에 가스 속에서 견딜 수 있는 시간입니다. - ガスの中でガスマスクを装備していない時に毒状態にならないで立っていられる時間を定義します - 您可以在毒氣中停留多長時間而不會受到感染或需要防毒面具。 - 在感染或需要防毒面具之前,你可以站在毒气中。 - Aika, jonka voit seistä kaasussa, ennen kuin sinulla on vaikutusta tai tarvitset kaasunaamaria - Tijd dat je in gas kan staan voordat je geïnfecteerd raakt of een gasmasker nodig hebt - - - Show Poisoning - Zobrazit otravu - Afficher les intoxications - Visualizza avvelenamento - Vergiftungen anzeigen - 中毒状態を表示 - 顯示中毒 - 显示中毒 - - - Determines if poisoning and intoxication is shown in the medical menu - Určuje, zda otrava a intoxikace budou zobrazovány ve zdravotnické tabulce - Détermine si l'empoisonnement et l'intoxication sont affichés dans le menu médical - Determina se avvelenamento ed intossicazione sono visualizzati nel menù medico - Bestimmt, ob Vergiftungen im Behandlungsmenü angezeigt werden - 中毒(poisoningとintoxication)状態を医療メニューに表示するかどうかを定義します - 確定醫療選單中是否顯示中毒 - 确定医疗菜单中是否显示中毒 - - - Take off gas mask - Sundat Plynovou Masku - Enlever le masque à gaz - Rimuovi maschera antigas - Gasmaske abnehmen - ガスマスクを外す - 摘下防毒面具 - 摘下防毒面具 - - - 82mm Toxic Gas Round - 82mm Granát s Toxickým Plynem - Cartouche de 82mm de gaz toxique - Ronda de 82mm de gas toxico - Colpo 82mm di gas tossico - Pocisk gazu toksycznego kal.82mm - Cartucho de gás tóxico de 82mm - Снаряд с токсичным газом диаметром 82 мм - [CSW] 82mm Senfgas Mörser Granate - [CSW] 82mm 유독가스탄 - [CSW] 82mm 有毒ガス弾 - 82毫米有毒氣體彈藥 - 82mm圆形有毒气体 - 82 mm myrkyllinen kaasulaastikuori - 82mm Gifgasgranaat - - - Toxic gas - Toxický plyn - Gaz toxique - Gas toxico - Gas tossico - Toksyczny gaz - Gás tóxico - Токсичный газ - Senfgas (Giftgas) - 유독가스 - 有毒ガス - 有毒氣體 - 有毒气体 - Myrkyllinen kaasu - Gifgas - - - Type: Tripwire gas - Sprays a poisonous gas when triggered.<br />Rounds: 1<br />Used on: Ground - Typ: Nástražný drát s plynovým granátem - Při aktivaci vypustí do ovzduší jedovatý plyn.<br/>Ran: 1<br/>Použití: Země - Type : Gaz Tripwire - Spraye un gaz empoisonné quand activé.<br />Munitions: 1<br />Utilisé sur : le sol - Tipo: Cable trampa de Gas - Cuando se activa despliega un gas toxico. <br />Rondas: 1<br />Usado en: Tierra - Tipo: Innesco a cavo GAS - Spruzza un gas velenoso quando innescato <br />Colpi: 1<br />Usabile: Suolo - Po aktywowaniu rozpyla trujący gaz. <br/> Ilość: 1<br/>Używać na ziemi - Tipo: Tripwire gas - Espalha um gás venenoso quando acionado.<br />Projéteis: 1<br />Usado em: Solo - Тип: Газовая растяжка - распыляет отравляющий газ при активации.<br/>Боеприпасов: 1 <br/>используется на: земле - Typ: Stolperdraht-Falle Senfgas - Versprüht bei Auslösung ein giftiges Gas.<br />Ladungen: 1<br />Benutzt auf: Boden - 유형: 인계철선 가스 - 작동 시 독가스를 분사합니다.<br />탄수: 1<br />사용: 지상 - タイプ: 対人仕掛け線ガス地雷 - 作動で毒ガスを噴霧します<br />弾薬: 1<br />使用: 地面 - 類型:絆線瓦斯 - 被觸發時噴射有毒氣體。<br />彈藥:1<br />使用於:地面 - 类型:三线制气体-触发时喷出有毒气体<br/>轮次:1<br/>用于:地面 - Tyyppi: kaasu-käsikranaatin laukaisulanka - suihkuttaa myrkyllistä kaasua laukaisussa <br/>Laukut: 1 <br/>Käytetty: maassa - Type: Gas struikeldraad - Sproeit een giftig gas wanneer geactiveerd.<br/>Ladingen: 1<br/>Gebruik op: De grond - - - Tripwire Gas - Nástražný drát s plynovým granátem - Grenade Tripwire - Cable trampa de Gas - Innesco a cavo GAS - Pułapka gazowa na linkę - Gás Tripwire - Газовая растяжка - Stolperdraht-Falle Senfgas - 인계철선 가스지뢰 - 仕掛け型ガス地雷 - 絆線毒氣陷阱 - Tripwire毒气 - Kaasun ja kranaatin laukaisulanka - Gas struikeldraad - - - Gas Type: - Typ plynu: - Type de gaz: - Tipo de gas: - Tipologia di Gas: - Rodzaj Gazu: - Tipo de Gás: - Тип газа: - Gas Typ: - 가스 유형: - ガスの種類: - 氣體類型: - 毒气类型: - Kaasutyyppi - Gas type: - - - Maximum Range. - Maximální vzdálenost. - Portée maximum - Rango maximo - Raggio massimo. - Maksymalny zasięg - Alcance Máximo - Максимальная дальность действия. - Maximale Reichweite. - 최대 범위. - 最大範囲 - 最大範圍。 - 最大范围。 - Suurin kantama - Maximaal bereik. - - - Is sealable? - Lze utěsnit? - Scellable ? - ¿Es sellable? - E' perforabile? (creare una fuga di gas) - Można uszczelnić? - É vedável? - Поддается герметизации? - Versiegelbar? - 밀봉가능 개체입니까? - シーリング可能かどうか - 可密封? - 可密封吗? - Onko se suljettavissa? - Is dichtbaar? - - - ONLY WORKS IF LOGIC IS SYNCED WITH AN OBJECT! - FUNGUJE POUZE POKUD JE LOGIKA SPOJENA S OBJEKTEM! - FONTIONNE UNIQUEMENT SI LE MODULE EST SYNCHRONISE AVEC UN OBJET! - SOLO FUNCIONA SI LA LOGICA ESTA SINCRONIZADA CON UN OBJETO - FUNZIONA SOLO SE LA LOGICA E' LEGATA CON UN OGGETTO! - DZIAŁA TYLKO GDY LOGIKA JEST ZSYNCHRONIZOWANA Z OBIEKTEM! - SÓ FUNCIONA SE A LÓGICA ESTIVER SINCRONIZADA COM UM OBJETO! - РАБОТАЕТ ТОЛЬКО В ТОМ СЛУЧАЕ, ЕСЛИ МОДУЛЬ СИНХРОНИЗИРОВАН С ОБЪЕКТОМ! - FUNKTIONIERT NUR, WENN DAS MODUL MIT EINEM OBJEKT SYNCHRONISIERT IST! - 논리가 개체와 동기화된 경우에만 작동합니다! - ロジックがオブジェクトと同期している場合にのみ機能します! - 僅當邏輯與物體同步時才有效! - 只有当逻辑与对象同步时才有效! - TOIMII VAIN JOS LOGIIKKA SYNKRONOIDAAN OBJEKTIN KANSSA! - WERKT ALLEEN ALS LOGICA GESYNCHRONISEERD IS MET EEN OBJECT! - - - Select Gas: - Vybrat plyn: - Gaz sélectionné: - Seleccionar Gas: - Seleziona Gas: - Wybierz Gaz: - Seleção de Gás: - Выберите газ: - Gas wählen: - 가스 선택: - ガスを選択: - 選擇氣體: - 选择毒气: - Valitse Kaasu - Selecteer gas: - - - KAT - ADV Medical: Chemical - KAT - ADV Medical : Chimique - KAT - ADV Medica - Agenti Chimici - KAT - ADV Medical: Chemie - KAM - 化学戦 (Chemical) - - - Put on gas mask - Nasadit Plynovou masku - Mettre le masque à gaz - Poner mascara de gas - Indossa la maschera antigas - Załóż maskę gazową - Colocar máscara de gás - Надеть противогаз - Gasmaske aufsetzen - 방독면 착용시키기 - ガスマスクを装備させる - 戴上防毒面具 - 戴上防毒面具 - Laita kaasunaamari päälle - Doe gasmasker op - - - Put on gas mask... - Nasazování Plynové masky - Mise en place du masque à gaz... - Colocando mascara de gas... - Indossando la maschera antigas... - Zakładanie maski... - Colocando máscara de gás... - Надевается противогаз... - Gasmaske wird aufgesetzt... - 방독면 착용시키는 중... - ガスマスクを装備させています… - 正在戴上防毒面具... - 戴上防毒面具… - Kaasunaamari on laitettu päähän - Gasmasker wordt opgezet... - - - Seal leak - Utěsnit netěsnost - Sceller la fuite - Sellar fuga - Fuga di gas - Uszczelnij wyciek - Vazamento de gás - Герметизация утечки - Leck versiegeln - 누출 밀봉 - ガス漏れをシールする - 密封洩漏 - 密封泄漏 - Tiivisteen vuoto - Dicht lek - - - Sealant tube - Těsnící hmota - Tube de mastic - Tubo sellante - Tubo sigillante - Uszczelniacz - Tubo de vedação - Трубка для герметика - Dichtmitteltube - 밀봉 튜브 - シーリング材チューブ - 密封管 - 密封胶管 - Tiivisteputki - Afdichtmiddel buis - - - Sealant which is used to seal objects when e.g. a toxic substance leaks out - Hmota používaná k utěsnění objektů např. při úniku toxických substancí - Mastic servant à sceller les objets quand par exemple une substance toxique en sort - Sellante que se usa para sellar los objetos por ejemplo cuanto tienen una fuga de gas toxico - Sigillante che è utilizzato per sigillare oggetti quando per esemipo la sostanza tossica fuoriesce. - Uszczelniacz używany do uszczelniania przedmiotów, na przykład w przypadku wycieków toksycznych gazów - Selante que é usado para selar objetos quando, por exemplo, há vazamento de substância tóxica - Герметик, который используется для герметизации предметов, например, при утечке токсичного вещества - Dichtmittel, welches zum Abdichten von Gegenständen genutzt wird. z.B. bei Austritt von Giftstoffen - 독성 물질이 누출될 때 물체를 밀봉하는 데 사용되는 밀봉제 - 毒物が漏れ出した際などに対象物をシールするために使用されるシーリング材入りチューブ。 - 用於密封洩漏毒性物質的物體(例如)的密封劑 - 密封剂,用于在有毒物质泄漏时密封物体 - Tiiviste, jota käytetään esineiden tiivistämiseen, kun myrkyllistä ainetta vuotaa ulos - Afdichtmiddel dat gebruikt wordt om een object te dichten wanneer er bijvoorbeeld een giftige stof lekt - - - diff --git a/addons/chemical/ui/ChemDetectorIcon.paa b/addons/chemical/ui/ChemDetectorIcon.paa deleted file mode 100644 index 12f4e0559..000000000 Binary files a/addons/chemical/ui/ChemDetectorIcon.paa and /dev/null differ diff --git a/addons/chemical/ui/Gasmask_icon.paa b/addons/chemical/ui/Gasmask_icon.paa deleted file mode 100644 index d7ce0c298..000000000 Binary files a/addons/chemical/ui/Gasmask_icon.paa and /dev/null differ diff --git a/addons/chemical/ui/KAT_m7a3_ca.paa b/addons/chemical/ui/KAT_m7a3_ca.paa deleted file mode 100644 index 3cc6ce036..000000000 Binary files a/addons/chemical/ui/KAT_m7a3_ca.paa and /dev/null differ diff --git a/addons/chemical/ui/KAT_m7a3_model.paa b/addons/chemical/ui/KAT_m7a3_model.paa deleted file mode 100644 index 59ae70a21..000000000 Binary files a/addons/chemical/ui/KAT_m7a3_model.paa and /dev/null differ diff --git a/addons/chemical/ui/RscAttributes.hpp b/addons/chemical/ui/RscAttributes.hpp deleted file mode 100644 index 104443f47..000000000 --- a/addons/chemical/ui/RscAttributes.hpp +++ /dev/null @@ -1,123 +0,0 @@ -class RscControlsGroup; -class RscControlsGroupNoScrollbars; -class RscText; -class RscListbox; -class RscCombo; -class RscEdit; -class RscXSliderH; -class RscCheckBox; -class RscActivePicture; -class RscMapControl; -class RscPicture; -class ctrlToolbox; -class RscButton; - -class RscDisplayAttributes { - class Controls { - class Background; - class Title; - class Content: RscControlsGroup { - class controls; - }; - class ButtonOK; - class ButtonCancel; - }; -}; - -class GVAR(kat_RscAtributeRadius): RscControlsGroupNoScrollbars { - onSetFocus = QUOTE(_this call FUNC(AttributeRadius)); - idc = 26422; - x = 0; - y = 0; - w = QUOTE(W_PART(26)); - h = QUOTE(H_PART(6.5)); - class controls { - class Title1: RscText { - idc = 16109; - text = CSTRING(UI_max_range); - toolTip = CSTRING(GasModule_max_radius_dcs); - x = 0; - y = 0; - w = QUOTE(W_PART(10)); - h = QUOTE(H_PART(1)); - colorBackground[] = {0,0,0,0.5}; - }; - class radius_max: RscEdit { - idc = 1611; - x = QUOTE(W_PART(10.1)); - y = 0; - w = QUOTE(W_PART(15.9)); - h = QUOTE(H_PART(1)); - }; - class Title3: Title1 { - idc = 1614; - text = CSTRING(UI_sealable); - toolTip = ""; - y = QUOTE(H_PART(2.2)); - }; - class canSealed: RscCheckBox { - idc = 1613; - x = QUOTE(W_PART(10.1)); - y = QUOTE(H_PART(2.2)); - w = QUOTE(W_PART(1)); - h = QUOTE(H_PART(1)); - }; - class Title4: Title1 { - idc = -1; - text = CSTRING(UI_selectGas); - toolTip = ""; - y = QUOTE(H_PART(3.3)); - }; - class gasType: RscCombo { - idc = 1615; - x = QUOTE(W_PART(10.1)); - y = QUOTE(H_PART(3.3)); - w = QUOTE(W_PART(10)); - h = QUOTE(H_PART(1)); - colorBackground[] = {0, 0, 0, 0.7}; - class Items { - class type0 { - text = CSTRING(Lvl0_Gas); - }; - class type1 { - text = CSTRING(Lvl1_Gas); - default = 1; - }; - }; - }; - class Title6: Title1 { - idc = 1616; - text = CSTRING(GasModule_createContaminatedZone); - toolTip = ""; - y = QUOTE(H_PART(4.4)); - w = QUOTE(W_PART(25)); - }; - class Title5: Title1 { - idc = -1; - text = CSTRING(GasModule_placeModuleOnObject); - toolTip = ""; - y = QUOTE(H_PART(5.5)); - w = QUOTE(W_PART(25)); - }; - }; -}; - - -class GVAR(kat_RscGasModul): RscDisplayAttributes { - onLoad = QUOTE([ARR_3('onLoad',_this,QQGVAR(kat_RscGasModul))] call EFUNC(zeus,zeusAttributes)); - onUnload = QUOTE([ARR_3('onUnload',_this,QQGVAR(kat_RscGasModul))] call EFUNC(zeus,zeusAttributes)); - - class Controls: Controls { - class Background: Background {}; - class Title: Title {}; - class Content: Content { - class Controls { - class radius: GVAR(kat_RscAtributeRadius) {}; - }; - }; - class ButtonOK: ButtonOK { - onSetFocus = QUOTE(_this call FUNC(ui_gasModule)); - }; - class ButtonCancel: ButtonCancel {}; - }; -}; diff --git a/addons/chemical/ui/Sealant.paa b/addons/chemical/ui/Sealant.paa deleted file mode 100644 index dc3c9b009..000000000 Binary files a/addons/chemical/ui/Sealant.paa and /dev/null differ diff --git a/addons/chemical/ui/antidote_ca.paa b/addons/chemical/ui/antidote_ca.paa deleted file mode 100644 index 3527ec68b..000000000 Binary files a/addons/chemical/ui/antidote_ca.paa and /dev/null differ diff --git a/addons/chemical/ui/gasmaskfilter_ca.paa b/addons/chemical/ui/gasmaskfilter_ca.paa deleted file mode 100644 index da295d34e..000000000 Binary files a/addons/chemical/ui/gasmaskfilter_ca.paa and /dev/null differ diff --git a/addons/chemical/ui/kat_chemicalDet.paa b/addons/chemical/ui/kat_chemicalDet.paa deleted file mode 100644 index 5cd5c910d..000000000 Binary files a/addons/chemical/ui/kat_chemicalDet.paa and /dev/null differ diff --git a/addons/chemical/ui/kat_chemicalDet_icon.paa b/addons/chemical/ui/kat_chemicalDet_icon.paa deleted file mode 100644 index a8080a317..000000000 Binary files a/addons/chemical/ui/kat_chemicalDet_icon.paa and /dev/null differ diff --git a/addons/chemical/ui/m7a3.p3d b/addons/chemical/ui/m7a3.p3d deleted file mode 100644 index a97cbdf25..000000000 Binary files a/addons/chemical/ui/m7a3.p3d and /dev/null differ diff --git a/addons/chemical/ui/m7a3_throw.p3d b/addons/chemical/ui/m7a3_throw.p3d deleted file mode 100644 index 086653fb2..000000000 Binary files a/addons/chemical/ui/m7a3_throw.p3d and /dev/null differ diff --git a/addons/chemical/ui/maskM04.paa b/addons/chemical/ui/maskM04.paa deleted file mode 100644 index 0134a2d15..000000000 Binary files a/addons/chemical/ui/maskM04.paa and /dev/null differ diff --git a/addons/chemical/ui/maskM50.paa b/addons/chemical/ui/maskM50.paa deleted file mode 100644 index 0beb27a60..000000000 Binary files a/addons/chemical/ui/maskM50.paa and /dev/null differ diff --git a/addons/circulation/ACE_Medical_Treatment.hpp b/addons/circulation/ACE_Medical_Treatment.hpp index f226c73cb..cf4fa002a 100644 --- a/addons/circulation/ACE_Medical_Treatment.hpp +++ b/addons/circulation/ACE_Medical_Treatment.hpp @@ -1,9 +1,107 @@ class ACE_Medical_Treatment { class IV { - class BloodIV; - class BloodIV_500; - class BloodIV_250; + volume = 1000; + ratio[] = {}; + type = "Blood"; + rateCoef = 1; + //Platelets per ML + platelets = 0; + // How much does the pain get reduced? + painReduce = 0; + // How much will the heart rate be increased when the HR is low (below 55)? {minIncrease, maxIncrease} + hrIncreaseLow[] = {0, 0}; // _heartRate < 55 + hrIncreaseNormal[] = {0, 0}; // 55 <= _heartRate <= 110 + hrIncreaseHigh[] = {0, 0}; // 110 < _heartRate + // How long until this medication has disappeared + timeInSystem = 120; + // How long until the maximum effect is reached + timeTillMaxEffect = 30; + // How many of this type of medication can be in the system before the patient overdoses? + maxDose = 4; + // 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 different dose amounts of the same medication + dose = 2.5; + // Function to execute upon overdose. Arguments passed to call back are 0: unit , 1: medicationClassName + 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 + viscosityChange = 0; + // How much does the medication constrict/dilate the patient's blood vessels? + alphaFactor = 0; + // Max amount of pain the medication can remove + maxRelief = 0; + // Reduction of damage from wounds + opioidRelief = 0; + // How strong should opioid Respiratory Depression be be + opioidDepression = 0; + // How strong should opioid visuals be + opioidEffect = 0; + //multiplier to respiratory rate + respiratoryRate = 0; + //multiplier to contractility + contractility = 0; + //multiplier to nausea + nauseaMult = 0; + //is this drug a sedation drug + sedation = "false"; + paralysis = "false"; + ph = 0; + ca = 0; + + + incompatibleMedication[] = {}; + + class BloodIV { + volume = 1000; + ratio[] = {"Plasma", 1}; + rateCoef = 0.6; + platelets = 0.075; + ph = -0.010; + bloodType = "O_N"; + compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; + ca = -0.012; + }; + class BloodIV_500: BloodIV { + volume = 500; + }; + class BloodIV_250: BloodIV { + volume = 250; + }; + class PlasmaIV: BloodIV { + volume = 1000; + ratio[] = {"Blood", 1}; + type = "Plasma"; + rateCoef = 1; + platelets = 0.075; + ca = 0.006; + ph = -0.006; + }; + class PlasmaIV_500: PlasmaIV { + volume = 500; + }; + class PlasmaIV_250: PlasmaIV { + volume = 250; + }; + class SalineIV: BloodIV { + volume = 1000; + type = "Saline"; + ratio[] = {}; + rateCoef = 1.4; + platelets = 0; + ph = 0.018; + ca = 0.004; + }; + class SalineIV_500: SalineIV { + volume = 500; + }; + class SalineIV_250: SalineIV { + volume = 250; + }; + class SalineIV100: SalineIV { + volume = 100; + }; class BloodIV_O: BloodIV { volume = 1000; bloodType = "O"; @@ -126,5 +224,354 @@ class ACE_Medical_Treatment { bloodType = "AB_N"; compatibility[] = {"AB","AB_N"}; }; + class FBTKBloodIV_500: BloodIV_500 { + volume = 500; + ratio[] = {"Blood", 1}; + rateCoef = 0.6; + platelets = 0.1; + ph = 0; + bloodType = "O_N"; + compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; + ca = 0; + }; + class FBTKBloodIV_O_500: FBTKBloodIV_500 { + bloodType = "O"; + compatibility[] = {"O", "A", "B", "AB"}; + }; + class FBTKBloodIV_O_N_500: FBTKBloodIV_500 { + bloodType = "O_N"; + compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; + }; + class FBTKBloodIV_A_500: FBTKBloodIV_500 { + bloodType = "A"; + compatibility[] = {"A", "AB"}; + }; + class FBTKBloodIV_A_N_500: FBTKBloodIV_500 { + bloodType = "A_N"; + compatibility[] = {"A", "A_N", "AB", "AB_N"}; + }; + class FBTKBloodIV_B_500: FBTKBloodIV_500 { + bloodType = "B"; + compatibility[] = {"B", "AB"}; + }; + class FBTKBloodIV_B_N_500: FBTKBloodIV_500 { + bloodType = "B_N"; + compatibility[] = {"B","B_N", "AB", "AB_N"}; + }; + class FBTKBloodIV_AB_500: FBTKBloodIV_500 { + bloodType = "AB"; + compatibility[] = {"AB"}; + }; + class FBTKBloodIV_AB_N_500: FBTKBloodIV_500 { + bloodType = "AB_N"; + compatibility[] = {"AB","AB_N"}; + }; + class FBTKBloodIV_250: BloodIV_250 { + volume = 500; + ratio[] = {"Blood", 1}; + rateCoef = 0.6; + platelets = 0.1; + ph = 0; + bloodType = "O_N"; + compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; + ca = 0; + }; + class FBTKBloodIV_O_250: FBTKBloodIV_250 { + bloodType = "O"; + compatibility[] = {"O", "A", "B", "AB"}; + }; + class FBTKBloodIV_O_N_250: FBTKBloodIV_250 { + bloodType = "O_N"; + compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; + }; + class FBTKBloodIV_A_250: FBTKBloodIV_250 { + bloodType = "A"; + compatibility[] = {"A", "AB"}; + }; + class FBTKBloodIV_A_N_250: FBTKBloodIV_250 { + bloodType = "A_N"; + compatibility[] = {"A", "A_N", "AB", "AB_N"}; + }; + class FBTKBloodIV_B_250: FBTKBloodIV_250 { + bloodType = "B"; + compatibility[] = {"B", "AB"}; + }; + class FBTKBloodIV_B_N_250: FBTKBloodIV_250 { + bloodType = "B_N"; + compatibility[] = {"B","B_N", "AB", "AB_N"}; + }; + class FBTKBloodIV_AB_250: FBTKBloodIV_250 { + bloodType = "AB"; + compatibility[] = {"AB"}; + }; + class FBTKBloodIV_AB_N_250: FBTKBloodIV_250 { + bloodType = "AB_N"; + compatibility[] = {"AB","AB_N"}; + }; + class RingersLactateIV: SalineIV { + volume = 1000; + rateCoef = 1.4; + type = "Ringers Lactate"; + platelets = 0; + ph = 0.012; + ca = -0.006; + }; + class RingersLactateIV_500: RingersLactateIV { + volume = 500; + rateCoef = 1.4; + type = "Ringers Lactate"; + }; + class RingersLactateIV_250: RingersLactateIV { + volume = 250; + rateCoef = 1.4; + type = "Ringers Lactate"; + }; + class PackedRBCIV_500: BloodIV { + volume = 500; + rateCoef = 0.4; + type = "PackedRBC"; + platelets = 0.1; + ca = -0.018; + ph = 0.028; + }; + class PackedRBCIV_250: PackedRBCIV_500 { + volume = 250; + rateCoef = 0.4; + type = "PackedRBC"; + }; + class Platelets_100: BloodIV { + volume = 100; + rateCoef = 0.8; + type = "Platelets"; + platelets = 2; + ca = 0.002; + ph = -0.006; + }; + class KAT_DrawBlood500: BloodIV { + volume = 1; + rateCoef = 1.2; + type = "FBTK_500"; + platelets = 0; + ca = 0; + ph = 0; + }; + class KAT_DrawBlood250: BloodIV { + volume = 1; + rateCoef = 1.2; + type = "FBTK_250"; + platelets = 0; + ca = 0; + ph = 0; + }; + class Morphine_IVInfusion: SalineIV_250 { + painReduce = 0.2; + hrIncreaseLow[] = {-1, -3}; + hrIncreaseNormal[] = {-1, -3}; + hrIncreaseHigh[] = {-1, -4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + viscosityChange = -3; + opioidRelief = 1.05; + respiratoryRate = -0.05; + volume = 250; + rateCoef = 1.4; + type = "Morphine_IVInfusion"; + }; + class Epinephrine_IVInfusion: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {3, 5}; + hrIncreaseNormal[] = {3, 6}; + hrIncreaseHigh[] = {3, 7}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + alphaFactor = -0.05; + volume = 250; + rateCoef = 1.4; + contractility = 0.1; + type = "Epinephrine_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Etomidate_IVInfusion: SalineIV_250 { + painReduce = 0.2; + hrIncreaseLow[] = {-1, -3}; + hrIncreaseNormal[] = {-1, -3}; + hrIncreaseHigh[] = {-1, -4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + viscosityChange = 0; + volume = 250; + rateCoef = 1.4; + type = "Etomidate_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Doxapram_IVInfusion: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {1, 3}; + hrIncreaseNormal[] = {1, 3}; + hrIncreaseHigh[] = {1, 4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + respiratoryRate = 0.1; + opioidDepression = -0.05; + volume = 250; + rateCoef = 1.4; + type = "Doxapram_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Nitroglycerin_IVInfusion: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {1, 3}; + hrIncreaseNormal[] = {1, 3}; + hrIncreaseHigh[] = {1, 4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + volume = 250; + rateCoef = 1.4; + alphaFactor = 0.05; + viscosityChange = -2; + contractility = -0.05; + type = "Nitroglycerin_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Norepinephrine_IVInfusion: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {1, 3}; + hrIncreaseNormal[] = {1, 3}; + hrIncreaseHigh[] = {1, 4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + volume = 250; + rateCoef = 1.4; + alphaFactor = -0.1; + viscosityChange = 4; + type = "Norepinephrine_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Morphine_IVInfusion100: SalineIV_250 { + painReduce = 0.2; + hrIncreaseLow[] = {-1, -3}; + hrIncreaseNormal[] = {-1, -3}; + hrIncreaseHigh[] = {-1, -4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + viscosityChange = -3; + opioidRelief = 1.05; + respiratoryRate = -0.05; + volume = 100; + rateCoef = 1.4; + type = "Morphine_IVInfusion"; + }; + class Epinephrine_IVInfusion100: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {3, 5}; + hrIncreaseNormal[] = {3, 6}; + hrIncreaseHigh[] = {3, 7}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + alphaFactor = -0.05; + volume = 100; + rateCoef = 1.4; + contractility = 0.1; + type = "Epinephrine_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Etomidate_IVInfusion100: SalineIV_250 { + painReduce = 0.2; + hrIncreaseLow[] = {-1, -3}; + hrIncreaseNormal[] = {-1, -3}; + hrIncreaseHigh[] = {-1, -4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + viscosityChange = 0; + volume = 100; + rateCoef = 1.4; + type = "Etomidate_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Doxapram_IVInfusion100: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {1, 3}; + hrIncreaseNormal[] = {1, 3}; + hrIncreaseHigh[] = {1, 4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + respiratoryRate = 0.1; + opioidDepression = -0.05; + volume = 100; + rateCoef = 1.4; + type = "Doxapram_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Nitroglycerin_IVInfusion100: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {1, 3}; + hrIncreaseNormal[] = {1, 3}; + hrIncreaseHigh[] = {1, 4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + volume = 100; + rateCoef = 1.4; + alphaFactor = 0.1; + viscosityChange = -2; + contractility = -0.05; + type = "Nitroglycerin_IVInfusion"; + incompatibleMedication[] = {}; + }; + class Norepinephrine_IVInfusion100: SalineIV_250 { + painReduce = 0; + hrIncreaseLow[] = {1, 3}; + hrIncreaseNormal[] = {1, 3}; + hrIncreaseHigh[] = {1, 4}; + timeInSystem = 3; + timeTillMaxEffect = 1; + dose = 2.5; + volume = 100; + rateCoef = 1.4; + alphaFactor = -0.1; + viscosityChange = 4; + type = "Norepinephrine_IVInfusion"; + incompatibleMedication[] = {}; + }; + class HypertonicSalineIV_500: SalineIV { + volume = 500; + type = "Hypertonic Saline"; + ratio[] = {}; + rateCoef = 1.3; + platelets = 0; + ph = 0.035; + ca = 0.012; + }; + class HypertonicSalineIV_250: HypertonicSalineIV_500 { + volume = 250; + }; + class HypertonicSalineIV_100: HypertonicSalineIV_500 { + volume = 100; + }; + class HextendIV: PlasmaIV { + volume = 1000; + type = "Hextend"; + ratio[] = {}; + rateCoef = 1.3; + platelets = 0; + ph = 0.02; + ca = 0.01; + }; + class HextendIV_500: HextendIV { + volume = 500; + }; + class HextendIV_250: HextendIV { + volume = 250; + }; }; }; diff --git a/addons/circulation/ACE_Medical_Treatment_Actions.hpp b/addons/circulation/ACE_Medical_Treatment_Actions.hpp index 24ac6efb0..93699cf89 100644 --- a/addons/circulation/ACE_Medical_Treatment_Actions.hpp +++ b/addons/circulation/ACE_Medical_Treatment_Actions.hpp @@ -8,6 +8,7 @@ class ACE_Medical_Treatment_Actions { class CPR: BasicBandage { displayNameProgress = ""; treatmentTime = 0.01; + allowedSelections[] = {"Chest"}; callbackStart = ""; callbackProgress = ""; callbackFailure = ""; @@ -22,14 +23,14 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 2; allowedSelections[] = {"Head"}; allowSelfTreatment = 1; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(bloodTypeLog); [ARR_2(_medic,_patient)] call ACEFUNC(dogtags,checkDogtag);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(bloodTypeLog); [ARR_2(_medic,_patient)] call EFUNC(vitals,weightLog); [ARR_2(_medic,_patient)] call ACEFUNC(dogtags,checkDogtag);); condition = "true"; animationPatient = ""; animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; }; class CheckBloodPressure: CheckPulse { - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; callbackSuccess = QFUNC(checkBloodPressure); animationPatient = ""; animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; @@ -39,7 +40,7 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Actions_CheckBloodPressureCuff); displayNameProgress = CSTRING(Actions_CheckingBloodPressureCuff); treatmentTime = QGVAR(treatmentTime_BPcuff); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; callbackSuccess = QFUNC(checkBloodPressureCuff); medicRequired = QGVAR(medLvl_BPCuff); items[] = {"kat_BPCuff"}; @@ -51,7 +52,7 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Actions_CheckHRSteth); displayNameProgress = CSTRING(Actions_CheckingHRSteth); treatmentTime = QGVAR(treatmentTime_StethHR); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "Body"}; + allowedSelections[] = {"UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "Chest"}; callbackSuccess = QFUNC(checkPulseSteth); medicRequired = QGVAR(medLvl_StethHR); items[] = {"kat_stethoscope"}; @@ -59,53 +60,12 @@ class ACE_Medical_Treatment_Actions { animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; }; - class KAT_DrawBlood500: CheckPulse { - displayName = CSTRING(DrawBlood500_Action_Use); - displayNameProgress = CSTRING(DrawBlood_Action_Progress); - treatmentTime = QGVAR(blood_drawTime_500ml); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; - allowSelfTreatment = QGVAR(enable_selfBloodDraw); - category = "advanced"; - medicRequired = 1; - consumeItem = 1; - callbackSuccess = QUOTE([ARR_3(_medic,_patient,500)] call FUNC(drawBlood)); - condition = QUOTE([ARR_3(_medic,_patient,500)] call FUNC(canDraw) && (!(EGVAR(pharma,RequireInsIVBloodDraw)) || EFUNC(pharma,removeIV))); - items[] = {"KAT_Empty_bloodIV_500"}; - animationPatient = ""; - animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; - animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; - }; - class KAT_DrawBlood250: CheckPulse { - displayName = CSTRING(DrawBlood250_Action_Use); - displayNameProgress = CSTRING(DrawBlood_Action_Progress); - treatmentTime = QGVAR(blood_drawTime_250ml); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; - allowSelfTreatment = QGVAR(enable_selfBloodDraw); - category = "advanced"; - medicRequired = 1; - consumeItem = 1; - callbackSuccess = QUOTE([ARR_3(_medic,_patient,250)] call FUNC(drawBlood)); - condition = QUOTE([ARR_3(_medic,_patient,250)] call FUNC(canDraw) && (!(EGVAR(pharma,RequireInsIVBloodDraw)) || EFUNC(pharma,removeIV))); - items[] = {"KAT_Empty_bloodIV_250"}; - animationPatient = ""; - animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; - animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; - }; - class DrawArterial: KAT_DrawBlood250 { - displayName = CSTRING(DrawArterial_Action_Use); - displayNameProgress = CSTRING(DrawBlood_Action_Progress); - treatmentTime = 10; - condition = QUOTE(GVAR(abgEnable)); - callbackSuccess = QFUNC(drawArterial); - items[] = {"kat_IV_16"}; - }; - #include "Blood_Medical.hpp" class AnalyzeRhythm: CheckPulse { displayName = CSTRING(AnalyzeRhythm); displayNameProgress = ""; - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; icon = QPATHTOF(ui\icon_aed_shock.paa); treatmentTime = 0.01; items[] = {}; @@ -121,7 +81,7 @@ class ACE_Medical_Treatment_Actions { class AEDShock: CheckPulse { displayName = CSTRING(Defibrillator_Action_Shock); displayNameProgress = ""; - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; icon = QPATHTOF(ui\icon_aed_shock.paa); category = "advanced"; items[] = {}; @@ -219,7 +179,7 @@ class ACE_Medical_Treatment_Actions { class AEDXConnectVitalsMonitor: AEDXPlacePads { displayName = CSTRING(AEDX_Action_ConnectMonitor); displayNameProgress = CSTRING(AEDX_Action_Connecting_Progress); - allowedSelections[] = {"LeftArm", "RightArm"}; + allowedSelections[] = {"UpperLeftArm", "UpperRightArm"}; category = "examine"; items[] = {"kat_X_AED"}; treatmentTime = QGVAR(AEDX_VitalsMonitor_AttachTime); @@ -253,7 +213,7 @@ class ACE_Medical_Treatment_Actions { category = "examine"; treatmentLocations = 0; medicRequired = QGVAR(medLvl_AED_X); - allowedSelections[] = {"Head","LeftArm","RightArm","Body","LeftLeg","RightLeg"}; + allowedSelections[] = {"Head","LeftArm","RightArm","Body","LeftLeg","RightLeg", "Chest", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "Neck"}; treatmentTime = 0.01; allowSelfTreatment = 0; condition = QUOTE((_patient getVariable [ARR_2(QQGVAR(DefibrillatorPads_Connected),false)] || _patient getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Connected),false)]) && ((_patient getVariable [ARR_2(QQGVAR(Defibrillator_Provider),[ARR_3(-1,-1,-1)])]) select 2 isEqualTo 'kat_X_AED') && (_patient getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_VolumePatient),false)])); @@ -272,7 +232,7 @@ class ACE_Medical_Treatment_Actions { }; class AEDXMeasureBloodPressure: AnalyzeRhythm { displayName = CSTRING(AEDX_Monitor_MeasureBloodPressure); - allowedSelections[] = {"Head","LeftArm","RightArm","Body","LeftLeg","RightLeg"}; + allowedSelections[] = {"Head","LeftArm","RightArm","Body","LeftLeg","RightLeg", "Chest", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "Neck"}; icon = QPATHTOF(ui\icon_aed_pads.paa); condition = QUOTE(_patient getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_Connected),false)] && (missionNamespace getVariable [ARR_2(QQGVAR(AED_X_VitalsMonitor_BloodPressureInterval),0)] > 0)); callbackSuccess = QUOTE(_patient call FUNC(measureBloodPressure)); @@ -284,7 +244,7 @@ class ACE_Medical_Treatment_Actions { icon = QPATHTOF(ui\icon_aedx_monitor.paa); category = "examine"; medicRequired = QGVAR(medLvl_AED_X); - allowedSelections[] = {"Head","LeftArm","RightArm","Body","LeftLeg","RightLeg"}; + allowedSelections[] = {"Head","LeftArm","RightArm","Body","LeftLeg","RightLeg", "Chest", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "Neck"}; treatmentTime = 0.01; items[] = {}; consumeItem = 0; @@ -295,4 +255,79 @@ class ACE_Medical_Treatment_Actions { animationPatientUnconscious = ""; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; }; + class AttachLucas { + displayName = CSTRING(AttachLucas); + displayNameProgress = CSTRING(AttachingLucas); + category = "advanced"; + treatmentLocations = 1; + allowedSelections[] = {"Chest"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(medLvl_Lucas); + treatmentTime = 6; + consumeItem = 0; + items[] = {}; + condition = QFUNC(canAttachLucas); + callbackStart = ""; + callbackSuccess = QFUNC(attachLucas); + callbackFailure = ""; + callbackProgress = ""; + animationPatient = ""; + animationPatientUnconscious = ""; + animationPatientUnconsciousExcludeOn[] = {}; + animationMedic = ""; + animationMedicProne = ""; + litter[] = {}; + icon = QPATHTOEF(breathing,ui\BVM_ui.paa); + }; + class DetachLucas: AttachLucas { + displayName = CSTRING(DetachLucas); + displayNameProgress = CSTRING(DetachingLucas); + medicRequired = QGVAR(medLvl_Lucas); + treatmentTime = 6; + items[] = {}; + condition = QFUNC(canDetachLucas); + callbackSuccess = QFUNC(detachLucas); + }; + class EnableLucas: AttachLucas { + displayName = CSTRING(TurnOnLUCAS); + displayNameProgress = CSTRING(TurnOnLUCAS_action); + medicRequired = QGVAR(medLvl_Lucas); + treatmentTime = 1; + items[] = {}; + condition = QUOTE([ARR_2(_patient,false)] call FUNC(lucasStateCondition)); + callbackSuccess = QUOTE([ARR_2(_patient,true)] call FUNC(lucasState)); + }; + class DisableLucas: AttachLucas { + displayName = CSTRING(TurnOffLUCAS); + displayNameProgress = CSTRING(TurnOnLUCAS_action); + medicRequired = QGVAR(medLvl_Lucas); + treatmentTime = 1; + items[] = {}; + condition = QUOTE([ARR_2(_patient,true)] call FUNC(lucasStateCondition)); + callbackSuccess = QUOTE([ARR_2(_patient,false)] call FUNC(lucasState)); + }; + class CheckNeck: CheckPulse { + displayName = CSTRING(CheckNeck); + displayNameProgress = CSTRING(CheckNeck_Action); + treatmentTime = 2; + allowedSelections[] = {"Neck"}; + allowSelfTreatment = 1; + callbackSuccess = QFUNC(checkNeck); + condition = "true"; + animationPatient = ""; + animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; + animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; + }; + class CheckCapRefill: CheckPulse { + displayName = CSTRING(CheckCapRefill); + displayNameProgress = CSTRING(CheckCapRefill_Action); + treatmentTime = 3; + allowedSelections[] = {"RightArm", "LeftArm"}; + allowSelfTreatment = 1; + callbackSuccess = QFUNC(checkCapRefill); + condition = "true"; + animationPatient = ""; + animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; + animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; + }; }; diff --git a/addons/circulation/Blood_Medical.hpp b/addons/circulation/Blood_Medical.hpp index 0584bf5f7..8dafd409d 100644 --- a/addons/circulation/Blood_Medical.hpp +++ b/addons/circulation/Blood_Medical.hpp @@ -2,122 +2,320 @@ class BloodIV; class BloodIV_O: BloodIV { displayName = CSTRING(Action_BloodIV_O); items[] = {"kat_bloodIV_O"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_O_N: BloodIV { displayName = CSTRING(Action_BloodIV_O_N); items[] = {"kat_bloodIV_O_N"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_A: BloodIV { displayName = CSTRING(Action_BloodIV_A); items[] = {"kat_bloodIV_A"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_A_N: BloodIV { displayName = CSTRING(Action_BloodIV_A_N); items[] = {"kat_bloodIV_A_N"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_B: BloodIV { displayName = CSTRING(Action_BloodIV_B); items[] = {"kat_bloodIV_B"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_B_N: BloodIV { displayName = CSTRING(Action_BloodIV_B_N); items[] = {"kat_bloodIV_B_N"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_AB: BloodIV { displayName = CSTRING(Action_BloodIV_AB); items[] = {"kat_bloodIV_AB"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_AB_N: BloodIV { displayName = CSTRING(Action_BloodIV_AB_N); items[] = {"kat_bloodIV_AB_N"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -800, 12]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment"; }; class BloodIV_500; class BloodIV_O_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_O); items[] = {"kat_bloodIV_O_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_O_N_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_O_N); items[] = {"kat_bloodIV_O_N_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_A_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_A); items[] = {"kat_bloodIV_A_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_A_N_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_A_N); items[] = {"kat_bloodIV_A_N_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_B_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_B); items[] = {"kat_bloodIV_B_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_B_N_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_B_N); items[] = {"kat_bloodIV_B_N_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_AB_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_AB); items[] = {"kat_bloodIV_AB_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_AB_N_500: BloodIV_500 { displayName = CSTRING(Action_500_BloodIV_AB_N); items[] = {"kat_bloodIV_AB_N_500"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -400, 8]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_250; class BloodIV_O_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_O); items[] = {"kat_bloodIV_O_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_O_N_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_O_N); items[] = {"kat_bloodIV_O_N_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_A_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_A); items[] = {"kat_bloodIV_A_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_A_N_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_A_N); items[] = {"kat_bloodIV_A_N_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_B_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_B); items[] = {"kat_bloodIV_B_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_B_N_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_B_N); items[] = {"kat_bloodIV_B_N_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_AB_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_AB); items[] = {"kat_bloodIV_AB_250"}; - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; class BloodIV_AB_N_250: BloodIV_250 { displayName = CSTRING(Action_250_BloodIV_AB_N); 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;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; }; +class FBTKBloodIV_O_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_O); + items[] = {"kat_FBTKbloodIV_O_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_O_N_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_O_N); + items[] = {"kat_FBTKbloodIV_O_N_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_A_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_A); + items[] = {"kat_FBTKbloodIV_A_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_A_N_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_A_N); + items[] = {"kat_FBTKbloodIV_A_N_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_B_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_B); + items[] = {"kat_FBTKbloodIV_B_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_B_N_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_B_N); + items[] = {"kat_FBTKbloodIV_B_N_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_AB_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_AB); + items[] = {"kat_FBTKbloodIV_AB_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_AB_N_500: BloodIV_500 { + displayName = CSTRING(Action_500_FBTKBloodIV_AB_N); + items[] = {"kat_FBTKbloodIV_AB_N_500"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_O_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_O); + items[] = {"kat_FBTKbloodIV_O_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_O_N_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_O_N); + items[] = {"kat_FBTKbloodIV_O_N_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_A_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_A); + items[] = {"kat_FBTKbloodIV_A_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_A_N_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_A_N); + items[] = {"kat_FBTKbloodIV_A_N_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_B_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_B); + items[] = {"kat_FBTKbloodIV_B_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_B_N_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_B_N); + items[] = {"kat_FBTKbloodIV_B_N_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_AB_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_AB); + items[] = {"kat_FBTKbloodIV_AB_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class FBTKBloodIV_AB_N_250: BloodIV_250 { + displayName = CSTRING(Action_250_FBTKBloodIV_AB_N); + items[] = {"kat_FBTKbloodIV_AB_N_250"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment;"; +}; +class PlasmaIV; +class SalineIV; +class SalineIV100: SalineIV { + displayName = CSTRING(Action_SalineIV100); + items[] = {"kat_salineIV100"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class PlateletIV100: PlasmaIV { + displayName = CSTRING(Action_PlateletIV100); + items[] = {"kat_PlateletIV100"}; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Morphine_IVInfusion: 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;"; +}; +class Epinephrine_IVInfusion: 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;"; +}; +class Etomidate_IVInfusion: 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;"; +}; +class Doxapram_IVInfusion: SalineIV { + displayName = CSTRING(Actions_DoxapramInfusion); + items[] = {"kat_DoxapramInfusion"}; + displayNameProgress = CSTRING(Transfusing_Doxapram_Infusion); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Nitroglycerin_IVInfusion: SalineIV { + displayName = CSTRING(Actions_NitroglycerinInfusion); + items[] = {"kat_NitroglycerinInfusion"}; + displayNameProgress = CSTRING(Transfusing_Nitroglycerin_Infusion); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Norepinephrine_IVInfusion: SalineIV { + displayName = CSTRING(Actions_NorepinephrineInfusion); + items[] = {"kat_NorepinephrineInfusion"}; + displayNameProgress = CSTRING(Transfusing_Norepinephrine_Infusion); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Morphine_IVInfusion100: SalineIV { + displayName = CSTRING(Actions_MorphineIVInfusion100); + items[] = {"kat_MorphineIVInfusion100"}; + displayNameProgress = CSTRING(Transfusing_Morphine_Infusion100); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Epinephrine_IVInfusion100: SalineIV { + displayName = CSTRING(Actions_EpinephrineInfusion100); + items[] = {"kat_EpinephrineIVInfusion100"}; + displayNameProgress = CSTRING(Transfusing_Epinephrine_Infusion100); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Etomidate_IVInfusion100: SalineIV { + displayName = CSTRING(Actions_EtomidateInfusion100); + items[] = {"kat_EtomidateInfusion100"}; + displayNameProgress = CSTRING(Transfusing_Etomidate_Infusion100); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Doxapram_IVInfusion100: SalineIV { + displayName = CSTRING(Actions_DoxapramInfusion100); + items[] = {"kat_DoxapramInfusion100"}; + displayNameProgress = CSTRING(Transfusing_Doxapram_Infusion100); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Nitroglycerin_IVInfusion100: SalineIV { + displayName = CSTRING(Actions_NitroglycerinInfusion100); + items[] = {"kat_NitroglycerinInfusion100"}; + displayNameProgress = CSTRING(Transfusing_Nitroglycerin_Infusion100); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class Norepinephrine_IVInfusion100: SalineIV { + displayName = CSTRING(Actions_NorepinephrineInfusion100); + items[] = {"kat_NorepinephrineInfusion100"}; + displayNameProgress = CSTRING(Transfusing_Norepinephrine_Infusion100); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; +}; +class KAT_DrawBlood500: BloodIV { + displayName = CSTRING(DrawBlood500_Action_Use); + displayNameProgress = CSTRING(DrawBlood_Action_Progress); + treatmentTime = 5; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; + allowSelfTreatment = QGVAR(enable_selfBloodDraw); + category = "advanced"; + medicRequired = 1; + consumeItem = 1; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + condition = QUOTE([ARR_3(_medic,_patient,500)] call FUNC(canDraw) && (!(EGVAR(pharma,RequireInsIVBloodDraw)) || EFUNC(pharma,removeIVCheck))); + items[] = {"KAT_Empty_bloodIV_500"}; + animationPatient = ""; + animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; + animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; +}; +class KAT_DrawBlood250: BloodIV { + displayName = CSTRING(DrawBlood250_Action_Use); + displayNameProgress = CSTRING(DrawBlood_Action_Progress); + treatmentTime = 5; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; + allowSelfTreatment = QGVAR(enable_selfBloodDraw); + category = "advanced"; + medicRequired = 1; + consumeItem = 1; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + condition = QUOTE([ARR_3(_medic,_patient,250)] call FUNC(canDraw) && (!(EGVAR(pharma,RequireInsIVBloodDraw)) || EFUNC(pharma,removeIVCheck))); + items[] = {"KAT_Empty_bloodIV_250"}; + animationPatient = ""; + animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; + animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; +}; + + diff --git a/addons/circulation/CfgFunctions.hpp b/addons/circulation/CfgFunctions.hpp index ea50d658c..9b21495a0 100644 --- a/addons/circulation/CfgFunctions.hpp +++ b/addons/circulation/CfgFunctions.hpp @@ -16,6 +16,9 @@ class CfgFunctions { class getBloodPressure { file = QPATHTOF(functions\fnc_getBloodPressure.sqf); }; + class updateWoundBloodLoss { + file = QPATHTOF(functions\fnc_updateWoundBloodLoss.sqf); + }; }; }; class overwrite_medical_vitals { diff --git a/addons/circulation/CfgSounds.hpp b/addons/circulation/CfgSounds.hpp index edbdc20f9..b3c6e3973 100644 --- a/addons/circulation/CfgSounds.hpp +++ b/addons/circulation/CfgSounds.hpp @@ -12,7 +12,7 @@ class CfgSounds { }; class GVAR(NoShock) { name = QGVAR(NoShock); - sound[] = {QPATHTOF_SOUND(sounds\noshock.wav), "db + 2", 1, 15}; + sound[] = {QPATHTOF_SOUND(sounds\noshockadvised.wav), "db + 2", 1, 15}; titles[] = {}; }; -}; +}; \ No newline at end of file diff --git a/addons/circulation/CfgVehicles.hpp b/addons/circulation/CfgVehicles.hpp index 6416506a2..0b1d93bcc 100644 --- a/addons/circulation/CfgVehicles.hpp +++ b/addons/circulation/CfgVehicles.hpp @@ -120,7 +120,7 @@ class CfgVehicles { class KAT_AED_X_PlacePads { displayName = CSTRING(AEDX_Action_PlacePads); condition = QUOTE([ARR_2(_player,GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player,_target,1)] call FUNC(DefibrillatorPlaced_CheckCondition)); - statement = QUOTE([ARR_5(_player,(_target getVariable QQGVAR(AED_X_VitalsMonitor_Patient)),'body','AEDXStationPlacePads',[_target])] call EFUNC(misc,treatment)); + statement = QUOTE([ARR_5(_player,(_target getVariable QQGVAR(AED_X_VitalsMonitor_Patient)),'chest','AEDXStationPlacePads',[_target])] call EFUNC(misc,treatment)); showDisabled = 0; icon = QPATHTOF(ui\icon_aed_pads.paa); }; @@ -133,14 +133,14 @@ class CfgVehicles { class KAT_AED_X_RemovePads: KAT_AED_X_PlacePads { displayName = CSTRING(Defibrillator_Action_RemovePads); condition = QUOTE([ARR_2(_player,GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player,_target,4)] call FUNC(DefibrillatorPlaced_CheckCondition)); - statement = QUOTE([ARR_4(_player,(_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient),nil)]),'body','DefibrillatorRemovePads')] call EFUNC(misc,treatment)); + statement = QUOTE([ARR_4(_player,(_target getVariable [ARR_2(QQGVAR(Defibrillator_Patient),nil)]),'chest','DefibrillatorRemovePads')] call EFUNC(misc,treatment)); insertChildren = ""; icon = QPATHTOF(ui\icon_aed_pads.paa); }; class KAT_AED_X_ConnectMonitor { displayName = CSTRING(AEDX_Action_ConnectMonitor); condition = QUOTE([ARR_2(_player,GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player,_target,5)] call FUNC(DefibrillatorPlaced_CheckCondition)); - statement = QUOTE([ARR_5(_player,(_target getVariable QQGVAR(Defibrillator_Patient)),'rightarm','AEDXStationConnectVitalsMonitor',[_target])] call EFUNC(misc,treatment)); + statement = QUOTE([ARR_5(_player,(_target getVariable QQGVAR(Defibrillator_Patient)),'upperrightarm','AEDXStationConnectVitalsMonitor',[_target])] call EFUNC(misc,treatment)); insertChildren = QUOTE([ARR_3(_player,_target,3)] call FUNC(addDefibrillatorActions)); showDisabled = 0; icon = QPATHTOF(ui\icon_aed_pads.paa); @@ -154,7 +154,7 @@ class CfgVehicles { class KAT_AED_X_DisconnectMonitor { displayName = CSTRING(AEDX_Action_DisconnectMonitor); condition = QUOTE([ARR_2(_player,GVAR(medLvl_AED_X))] call ACEFUNC(medical_treatment,isMedic) && [ARR_3(_player,_target,6)] call FUNC(DefibrillatorPlaced_CheckCondition)); - statement = QUOTE([ARR_4(_player,(_target getVariable QQGVAR(AED_X_VitalsMonitor_Patient)),'rightarm','AEDXDisconnectVitalsMonitor')] call EFUNC(misc,treatment)); + statement = QUOTE([ARR_4(_player,(_target getVariable QQGVAR(AED_X_VitalsMonitor_Patient)),'upperrightarm','AEDXDisconnectVitalsMonitor')] call EFUNC(misc,treatment)); showDisabled = 0; icon = QPATHTOF(ui\icon_aed_pads.paa); }; @@ -229,207 +229,9 @@ class CfgVehicles { MACRO_ADDMAGAZINE(kat_Painkiller,5); }; }; - - class LandVehicle; - class Car: LandVehicle { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions { - class ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Car_F: Car {}; - class Quadbike_01_base_F: Car_F { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions: ACE_Actions { - class ACE_MainActions: ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Kart_01_Base_F: Car_F { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions: ACE_Actions { - class ACE_MainActions: ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Tank: LandVehicle { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions { - class ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Motorcycle: LandVehicle { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions { - class ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Air; - class Helicopter: Air { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions { - class ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Plane: Air { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions { - class ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - - class Ship; - class Ship_F: Ship { - class ACE_SelfActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - class ACE_Actions { - class ACE_MainActions { - class KAT_ArterialTest { - displayName = CSTRING(Arterial_Test_Action); - condition = QUOTE(_target call ACEFUNC(medical_treatment,isMedicalVehicle)); - statement = ""; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialTestActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; - }; - }; - class Man; class CAManBase: Man { class ACE_Actions { - class ACE_MainActions { - class KAT_ApplyBloodTest { - displayName = CSTRING(Arterial_Test); - condition = QUOTE(GVAR(abgEnable)); - statement = "true"; - insertChildren = QUOTE([ARR_2(_target,_player)] call FUNC(addArterialApplyActions)); - icon = QACEPATHTOF(medical_gui,ui\cross.paa); - }; - }; class ACE_Head { class CheckBloodPressure {}; // Remove the ability to check blood pressure at the head }; @@ -443,7 +245,7 @@ class CfgVehicles { class KAT_Equipment { class openCrossPanel { displayName = CSTRING(open_crosspanel); - condition = "('kat_crossPanel' in (uniformItems _player)) || ('kat_crossPanel' in (vestItems _player))"; + condition = QUOTE('kat_crossPanel' in (items _player)); statement = QUOTE(createDialog QQGVAR(CrossPanel_Dialog)); showDisabled = 0; exceptions[] = {"isNotInside", "isNotSitting"}; diff --git a/addons/circulation/CfgWeapons.hpp b/addons/circulation/CfgWeapons.hpp index cba24af2e..28f164665 100644 --- a/addons/circulation/CfgWeapons.hpp +++ b/addons/circulation/CfgWeapons.hpp @@ -18,7 +18,12 @@ class CfgWeapons { class ACE_ItemCore; class CBA_MiscItem_ItemInfo; class ACE_bloodIV; - + class ACE_salineIV; + class ACE_salineIV_500; + class ACE_salineIV_250; + class ACE_plasmaIV; + class ACE_plasmaIV_500; + class ACE_plasmaIV_250; class kat_bloodIV_O: ACE_bloodIV { displayName = CSTRING(BloodIV_O); ACE_isMedicalItem = 1; @@ -96,7 +101,296 @@ class CfgWeapons { class kat_bloodIV_AB_N_250: kat_bloodIV_O_250 { displayName = CSTRING(BloodIV_AB_250_N); }; - class KAT_Empty_bloodIV_500: ACE_bloodIV { + class kat_FBTKbloodIV_O_500: ACE_bloodIV_500 { + displayName = CSTRING(FBTKBloodIV_O_500); + ACE_isMedicalItem = 1; + scope = 1; + }; + class kat_FBTKbloodIV_O_N_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(FBTKBloodIV_O_500_N); + }; + class kat_FBTKbloodIV_A_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(FBTKBloodIV_A_500); + }; + class kat_FBTKbloodIV_A_N_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(BloodIV_A_500_N); + }; + class kat_FBTKbloodIV_B_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(FBTKBloodIV_B_500); + }; + class kat_FBTKbloodIV_B_N_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(FBTKBloodIV_B_500_N); + }; + class kat_FBTKbloodIV_AB_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(FBTKBloodIV_AB_500); + }; + class kat_FBTKbloodIV_AB_N_500: kat_FBTKbloodIV_O_500 { + displayName = CSTRING(FBTKBloodIV_AB_500_N); + }; + class kat_FBTKbloodIV_O_250: ACE_bloodIV_250 { + displayName = CSTRING(FBTKBloodIV_O_250); + ACE_isMedicalItem = 1; + scope = 1; + }; + class kat_FBTKbloodIV_O_N_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_O_250_N); + }; + class kat_FBTKbloodIV_A_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_A_250); + }; + class kat_FBTKbloodIV_A_N_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_A_250_N); + }; + class kat_FBTKbloodIV_B_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_B_250); + }; + class kat_FBTKbloodIV_B_N_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_B_250_N); + }; + class kat_FBTKbloodIV_AB_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_AB_250); + }; + class kat_FBTKbloodIV_AB_N_250: kat_FBTKbloodIV_O_250 { + displayName = CSTRING(FBTKBloodIV_AB_250_N); + }; + class kat_PlateletIV100: ACE_plasmaIV { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Platelet_IV); + descriptionShort = CSTRING(Platelet_IV_Desc_Short); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_HextendIV: ACE_plasmaIV { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hextend_IV); + descriptionShort = CSTRING(Hextend_IV_Desc_Short); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 10; + }; + }; + class kat_HextendIV_500: ACE_plasmaIV_500 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hextend_IV_500); + descriptionShort = CSTRING(Hextend_IV_Desc_Short); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + }; + class kat_HextendIV_250: ACE_plasmaIV_250 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hextend_IV_250); + descriptionShort = CSTRING(Hextend_IV_Desc_Short); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; + class kat_RingersLactateIV: ACE_salineIV { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Ringers_Lactate_IV); + descriptionShort = CSTRING(Ringers_Lactate_IV_Desc_Short); + descriptionUse = CSTRING(Ringers_Lactate_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 10; + }; + }; + class kat_RingersLactateIV_500: ACE_salineIV_500 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Ringers_Lactate_IV_500); + descriptionShort = CSTRING(Ringers_Lactate_IV_Desc_Short); + descriptionUse = CSTRING(Ringers_Lactate_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + }; + class kat_RingersLactateIV_250: ACE_salineIV_250 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Ringers_Lactate_IV_250); + descriptionShort = CSTRING(Ringers_Lactate_IV_Desc_Short); + descriptionUse = CSTRING(Ringers_Lactate_IV_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_DoxapramInfusion: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Doxapram_Infusion); + descriptionShort = CSTRING(Doxapram_Infusion_Desc_Short); + descriptionUse = CSTRING(Doxapram_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; + class kat_NitroglycerinInfusion: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Nitroglycerin_Infusion); + descriptionShort = CSTRING(Nitroglycerin_Infusion_Desc_Short); + descriptionUse = CSTRING(Nitroglycerin_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; + class kat_NorepinephrineInfusion: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Norepinephrine_Infusion); + descriptionShort = CSTRING(Norepinephrine_Infusion_Desc_Short); + descriptionUse = CSTRING(Norepinephrine_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; + class kat_MorphineIVInfusion100: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Morphine_Infusion100); + descriptionShort = CSTRING(Morphine_Infusion_Desc_Short); + descriptionUse = CSTRING(Morphine_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_EpinephrineIVInfusion100: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Epinephrine_Infusion100); + descriptionShort = CSTRING(Epinephrine_Infusion_Desc_Short); + descriptionUse = CSTRING(Epinephrine_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_EtomidateInfusion100: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Etomidate100_Infusion); + descriptionShort = CSTRING(Etomidate_Infusion_Desc_Short); + descriptionUse = CSTRING(Etomidate_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_DoxapramInfusion100: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Doxapram100_Infusion); + descriptionShort = CSTRING(Doxapram_Infusion_Desc_Short); + descriptionUse = CSTRING(Doxapram_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_NitroglycerinInfusion100: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Nitroglycerin100_Infusion); + descriptionShort = CSTRING(Nitroglycerin_Infusion_Desc_Short); + descriptionUse = CSTRING(Nitroglycerin_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_NorepinephrineInfusion100: ACE_salineIV_250 { + scope = 1; + author = "Cplhardcore"; + displayName = CSTRING(Norepinephrine100_Infusion); + descriptionShort = CSTRING(Norepinephrine_Infusion_Desc_Short); + descriptionUse = CSTRING(Norepinephrine_Infusion_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_PackedRBCIV_500: ACE_bloodIV_500 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Packed_RBC_IV_500); + descriptionShort = CSTRING(Packed_RBC_IV_Desc_Short); + descriptionUse = CSTRING(Packed_RBC_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + }; + class kat_PackedRBCIV_250: ACE_bloodIV_250 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Packed_RBC_IV_250); + descriptionShort = CSTRING(Packed_RBC_IV_Desc_Short); + descriptionUse = CSTRING(Packed_RBC_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2.5; + }; + }; + class kat_salineIV100: ACE_salineIV_250 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(salineIV_100); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class KAT_Empty_bloodIV_500: ACE_bloodIV + { displayName = CSTRING(FieldBloodTK500_Display); descriptionShort = CSTRING(FieldBloodTK_Desc); picture = QPATHTOF(ui\bloodIV_empty_ca.paa); @@ -107,7 +401,8 @@ class CfgWeapons { mass = 2; }; }; - class KAT_Empty_bloodIV_250: ACE_bloodIV { + class KAT_Empty_bloodIV_250: ACE_bloodIV + { displayName = CSTRING(FieldBloodTK250_Display); descriptionShort = CSTRING(FieldBloodTK_Desc); picture = QPATHTOF(ui\bloodIV_empty_ca.paa); @@ -153,17 +448,6 @@ class CfgWeapons { mass = 0.1; }; }; - class kat_BPCuff: ACE_ItemCore { - scope = 2; - author = "Cplhardcore"; - displayName = CSTRING(BPCuff_display); - descriptionShort = CSTRING(BPCuff_desc); - picture = QPATHTOF(ui\BPCuff.paa); - icon = ""; - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 8; - }; - }; class KAT_bloodSample: ACE_ItemCore { author = "Mazinski"; scope = 0; @@ -184,6 +468,50 @@ class CfgWeapons { mass = 0; }; }; + class kat_BPCuff: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(BPCuff_display); + descriptionShort = CSTRING(BPCuff_desc); + picture = QPATHTOF(ui\BPCuff.paa); + icon = ""; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 6; + }; + }; + class kat_HypertonicSalineIV_500: ACE_salineIV_500 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hypertonic_Saline_IV_500); + descriptionShort = CSTRING(Hypertonic_Saline_IV_Desc_Short); + descriptionUse = CSTRING(Hypertonic_Saline_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 10; + }; + }; + class kat_HypertonicSalineIV_250: ACE_salineIV_250 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hypertonic_Saline_IV_250); + descriptionShort = CSTRING(Hypertonic_Saline_IV_Desc_Short); + descriptionUse = CSTRING(Hypertonic_Saline_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + }; + class kat_HypertonicSalineIV_100: ACE_salineIV_250 { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hypertonic_Saline_IV_100); + descriptionShort = CSTRING(Hypertonic_Saline_IV_Desc_Short); + descriptionUse = CSTRING(Hypertonic_Saline_IV_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; KAT_bloodSample_ITEM(KAT_bloodSample,1); KAT_bloodSample_ITEM(KAT_bloodSample,2); KAT_bloodSample_ITEM(KAT_bloodSample,3); diff --git a/addons/circulation/XEH_PREP.hpp b/addons/circulation/XEH_PREP.hpp index 007ef9442..1a34f7d9c 100644 --- a/addons/circulation/XEH_PREP.hpp +++ b/addons/circulation/XEH_PREP.hpp @@ -1,61 +1,73 @@ -PREP(addArterialApplyActions); -PREP(addArterialTestActions); -PREP(addDefibrillatorActions); PREP(AEDXPlaced_VitalsMonitor_SetVolume); PREP(AEDX_ConnectVitalsMonitor); PREP(AEDX_DisconnectVitalsMonitor); PREP(AEDX_ViewMonitor); PREP(AEDX_ViewMonitor_AnalyzeFeedback); +PREP(AEDX_ViewMonitor_CPR); PREP(AEDX_ViewMonitor_Charging); PREP(AEDX_ViewMonitor_Condition); -PREP(AEDX_ViewMonitor_CPR); PREP(AEDX_VitalsMonitor); PREP(AEDX_VitalsMonitor_CheckCondition); PREP(AED_Analyze); PREP(AED_Charge); PREP(AED_Shock); +PREP(CPRStart); +PREP(DefibrillatorPlaced_CheckCondition); +PREP(Defibrillator_AttachPads); +PREP(Defibrillator_CheckCondition); +PREP(Defibrillator_ManualCharge); +PREP(Defibrillator_Pads_CheckCondition); +PREP(Defibrillator_RemovePads); +PREP(PulseOx_ViewMonitor); +PREP(addArterialApplyActions); +PREP(addArterialTestActions); +PREP(addDefibrillatorActions); PREP(attachBloodGas); +PREP(attachLucas); PREP(bloodType); PREP(bloodTypeLog); +PREP(canAttachLucas); +PREP(canDetachLucas); PREP(canDraw); PREP(checkBloodPressure); PREP(checkBloodPressureCuff); PREP(checkBloodPressureCuffLocal); PREP(checkBloodPressureLocal); +PREP(checkCapRefill); +PREP(checkCapRefillLocal); +PREP(checkNeck); +PREP(checkNeckLocal); PREP(checkPulse); PREP(checkPulseLocal); PREP(checkPulseSteth); PREP(checkPulseStethLocal); PREP(compatible); PREP(cprLocal); -PREP(CPRStart); PREP(cprSuccess); -PREP(DefibrillatorPlaced_CheckCondition); -PREP(Defibrillator_AttachPads); -PREP(Defibrillator_CheckCondition); -PREP(Defibrillator_ManualCharge); -PREP(Defibrillator_Pads_CheckCondition); -PREP(Defibrillator_RemovePads); +PREP(detachLucas); PREP(drawArterial); PREP(drawBlood); PREP(fullHealLocal); PREP(generateBloodType); +PREP(generateDefaultHeartRate); PREP(getBloodPressure); PREP(getCardiacArrestHeartRate); PREP(gui_updateBodyImage); +PREP(gui_updateInjuryListPart); PREP(handleCardiacArrest); PREP(handleRespawn); PREP(handleTreatment); PREP(init); +PREP(lucasPFH); +PREP(lucasState); +PREP(lucasStateCondition); PREP(measureBloodPressure); PREP(onCloseDialog); PREP(placeAED); PREP(placeAED_PickUpAction); -PREP(PulseOx_ViewMonitor); PREP(removeLog); PREP(showBloodGas); -PREP(treatmentAdvanced_IV); PREP(updateBloodPressureChange); PREP(updateHeartRate); -PREP(updateInternalBleeding); +PREP(updateWoundBloodLoss); PREP(wrongBloodTreatment); \ No newline at end of file diff --git a/addons/circulation/XEH_postInit.sqf b/addons/circulation/XEH_postInit.sqf index 6340e5651..be0b752c2 100644 --- a/addons/circulation/XEH_postInit.sqf +++ b/addons/circulation/XEH_postInit.sqf @@ -6,6 +6,8 @@ [QGVAR(checkBloodPressureCuffLocal), LINKFUNC(checkBloodPressureCuffLocal)] call CBA_fnc_addEventHandler; [QGVAR(checkPulseLocal), LINKFUNC(checkPulseLocal)] call CBA_fnc_addEventHandler; [QGVAR(checkPulseStethLocal), LINKFUNC(checkPulseStethLocal)] call CBA_fnc_addEventHandler; +[QGVAR(checkNeckLocal), LINKFUNC(checkNeckLocal)] call CBA_fnc_addEventHandler; +[QGVAR(checkCapRefillLocal), LINKFUNC(checkCapRefillLocal)] call CBA_fnc_addEventHandler; ["ace_cardiacArrest", LINKFUNC(handleCardiacArrest)] call CBA_fnc_addEventHandler; GVAR(AEDX_MonitorTarget) = objNull; @@ -17,6 +19,8 @@ GVAR(AEDX_MonitorTarget) = objNull; ["isNotPerformingCPR", {!((_this select 0) getVariable [QGVAR(isPerformingCPR), false])}] call ACEFUNC(common,addCanInteractWithCondition); +["isNotPerformingBVM", {!((_this select 0) getVariable [QEGVAR(breathing,isPerformingBVM), false])}] call ACEFUNC(common,addCanInteractWithCondition); + [QGVAR(handleNearToAED), { params ["_unit", "_patient"]; @@ -25,18 +29,37 @@ GVAR(AEDX_MonitorTarget) = objNull; }; }] call CBA_fnc_addEventHandler; -[QGVAR(incorrectAEDUsage), { +[QGVAR(AEDused), { params ["_unit"]; + _unit setVariable [QGVAR(AEDEffectiveness), 0.5, true]; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _AEDeffectivness = _unit getVariable [QGVAR(AEDEffectiveness), 1]; + _unit setVariable [QGVAR(AEDEffectiveness), (_AEDeffectivness + 0.01), true]; + if ((_AEDeffectivness == 1) || !(alive _unit)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + }, 1, [_unit]] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; - [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; - _unit setVariable [QGVAR(cardiacArrestType), 1, true]; +[QACEGVAR(medical,CPRSucceeded), { + params ["_unit"]; + _unit setVariable [QGVAR(refractoryCA), false, true]; + _unit setVariable [QGVAR(heartRestart), true, true]; + [{ + params ["_unit"]; + _unit setVariable [QGVAR(heartRestart), false, true]; + }, [_unit], 5] call CBA_fnc_waitAndExecute; }] call CBA_fnc_addEventHandler; -[QGVAR(bloodPoisoning), { +[QGVAR(incorrectAEDUsage), { params ["_unit"]; [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; + _unit setVariable [QGVAR(cardiacArrestType), 1, true]; }] call CBA_fnc_addEventHandler; [QGVAR(placeAED_initAction), LINKFUNC(placeAED_PickUpAction)] call CBA_fnc_addEventHandler; [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; \ No newline at end of file diff --git a/addons/circulation/config.cpp b/addons/circulation/config.cpp index 20b716de7..8e30eb37f 100644 --- a/addons/circulation/config.cpp +++ b/addons/circulation/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; units[] = { "kat_X_AEDItem", - "kat_bloodBankCrate" + "kat_AEDItem" }; weapons[] = { "kat_bloodIV_O", @@ -34,9 +34,24 @@ class CfgPatches { "kat_bloodIV_AB_250", "kat_bloodIV_AB_N_250", "kat_X_AED", + "kat_AED", "kat_crossPanel", "KAT_Empty_bloodIV_500", - "KAT_Empty_bloodIV_250" + "KAT_Empty_bloodIV_250", + "kat_HextendIV", + "kat_HextendIV_500", + "kat_HextendIV_250", + "kat_RingersLactateIV", + "kat_RingersLactateIV_500", + "kat_RingersLactateIV_250", + "kat_PackedRBCIV_500", + "kat_PackedRBCIV_250", + "kat_salineIV100", + "kat_BPCuff", + "kat_HypertonicSalineIV_500", + "kat_HypertonicSalineIV_250", + "kat_HypertonicSalineIV_100", + "kat_PlateletIV100" }; magazines[] = { }; requiredAddons[] = { @@ -66,10 +81,10 @@ class CfgPatches { #include "CfgFunctions.hpp" #include "CfgMoves.hpp" #include "CfgEventHandlers.hpp" -#include "CfgSounds.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" #include "ACE_Medical_Treatment.hpp" #include "ACE_Medical_Treatment_Actions.hpp" #include "ui\CrossPanel_Dialog.hpp" #include "ui\AEDX_Monitor_Dialog.hpp" +#include "CfgSounds.hpp" diff --git a/addons/circulation/functions/fnc_AEDX_ViewMonitor.sqf b/addons/circulation/functions/fnc_AEDX_ViewMonitor.sqf index 433fc520a..35a6bb8c6 100644 --- a/addons/circulation/functions/fnc_AEDX_ViewMonitor.sqf +++ b/addons/circulation/functions/fnc_AEDX_ViewMonitor.sqf @@ -245,21 +245,15 @@ GVAR(PulseRateReady) = true; }; if (GVAR(AEDX_MonitorTarget) getVariable [QACEGVAR(medical,CPR_provider), objNull] isNotEqualTo objNull) then { - - private _rhythmHR = 0; - - if(GVAR(AEDX_MonitorTarget) getVariable [QGVAR(cardiacArrestType), 0] > 0) then { - _rhythmHR = GVAR(AEDX_MonitorTarget) call FUNC(getCardiacArrestHeartRate); + if (GVAR(AEDX_MonitorTarget) getVariable [QGVAR(attachedLucasState), false]) then { + _hr = 100 // fake heart rate because patient is dead and off state machine } else { - _rhythmHR = GVAR(AEDX_MonitorTarget) getVariable [QACEGVAR(medical,heartRate), 0]; + _hr = random [95, 100, 110]; }; - - _hr = random [100, 100 + _rhythmHR / 2, _rhythmHR]; - if (GVAR(AED_X_VitalsMonitor_BloodPressureInterval) > 0) then { _bp = GVAR(AEDX_MonitorTarget) getVariable [QGVAR(StoredBloodPressure), [0,0]]; } else { - _bp = GVAR(AEDX_MonitorTarget) getVariable [QACEGVAR(medical,bloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) call FUNC(getBloodPressure); }; } else { if !(GVAR(AEDX_MonitorTarget) getVariable [QGVAR(heartRestart), false]) then { @@ -275,7 +269,7 @@ GVAR(PulseRateReady) = true; if (GVAR(AED_X_VitalsMonitor_BloodPressureInterval) > 0) then { _bp = GVAR(AEDX_MonitorTarget) getVariable [QGVAR(StoredBloodPressure), [0,0]]; } else { - _bp = GVAR(AEDX_MonitorTarget) getVariable [QACEGVAR(medical,bloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) call FUNC(getBloodPressure); }; }; }; @@ -313,7 +307,6 @@ GVAR(PulseRateReady) = true; private _hasEtco2Monitor = (GVAR(AEDX_MonitorTarget) getVariable [QEGVAR(breathing,etco2Monitor),[]] isNotEqualTo []); //check for etco2 monitoring apparatus private _etco2 = GET_ETCO2(GVAR(AEDX_MonitorTarget)); private _breathrate = GET_BREATHING_RATE(GVAR(AEDX_MonitorTarget)); - if (_hasEtco2Monitor) then { ctrlShow [IDC_DISPLAY_RR_DEFAULT, false]; ctrlShow [IDC_DISPLAY_RR, true]; diff --git a/addons/circulation/functions/fnc_AEDX_ViewMonitor_CPR.sqf b/addons/circulation/functions/fnc_AEDX_ViewMonitor_CPR.sqf index af700973d..29498bfd9 100644 --- a/addons/circulation/functions/fnc_AEDX_ViewMonitor_CPR.sqf +++ b/addons/circulation/functions/fnc_AEDX_ViewMonitor_CPR.sqf @@ -207,38 +207,32 @@ private _dlg = uiNamespace getVariable ["KAT_Circulation_AEDX_Monitor_Display", (_dlg displayCtrl IDC_DISPLAY_SPO2_TITLE) ctrlSetText "---"; }; - if (GVAR(AEDX_MonitorTarget_Title) getVariable [QACEGVAR(medical,CPR_provider), objNull] isNotEqualTo objNull) then { - - private _rhythmHR = 0; - - if(GVAR(AEDX_MonitorTarget_Title) getVariable [QGVAR(cardiacArrestType), 0] > 0) then { - _rhythmHR = GVAR(AEDX_MonitorTarget_Title) call FUNC(getCardiacArrestHeartRate); + if (GVAR(AEDX_MonitorTarget) getVariable [QACEGVAR(medical,CPR_provider), objNull] isNotEqualTo objNull) then { + if (GVAR(AEDX_MonitorTarget) getVariable [QGVAR(attachedLucasState), false]) then { + _hr = 100 // fake heart rate because patient is dead and off state machine } else { - _rhythmHR = GVAR(AEDX_MonitorTarget_Title) getVariable [QACEGVAR(medical,heartRate), 0]; + _hr = random [95, 100, 110]; }; - - _hr = random [100, 100 + _rhythmHR / 2, _rhythmHR]; - if (GVAR(AED_X_VitalsMonitor_BloodPressureInterval) > 0) then { - _bp = GVAR(AEDX_MonitorTarget_Title) getVariable [QGVAR(StoredBloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) getVariable [QGVAR(StoredBloodPressure), [0,0]]; } else { - _bp = GVAR(AEDX_MonitorTarget_Title) getVariable [QACEGVAR(medical,bloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) call FUNC(getBloodPressure); }; } else { - if !(GVAR(AEDX_MonitorTarget_Title) getVariable [QGVAR(heartRestart), false]) then { - if (GVAR(AEDX_MonitorTarget_Title) getVariable [QGVAR(cardiacArrestType), 0] > 0) then { - _hr = GVAR(AEDX_MonitorTarget_Title) call FUNC(getCardiacArrestHeartRate); + if !(GVAR(AEDX_MonitorTarget) getVariable [QGVAR(heartRestart), false]) then { + if (GVAR(AEDX_MonitorTarget) getVariable [QGVAR(cardiacArrestType), 0] > 0) then { + _hr = GVAR(AEDX_MonitorTarget) call FUNC(getCardiacArrestHeartRate); if (GVAR(AED_X_VitalsMonitor_BloodPressureInterval) > 0) then { - _bp = GVAR(AEDX_MonitorTarget_Title) getVariable [QGVAR(StoredBloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) getVariable [QGVAR(StoredBloodPressure), [0,0]]; }; } else { - _hr = GVAR(AEDX_MonitorTarget_Title) getVariable [QACEGVAR(medical,heartRate), 0]; + _hr = GVAR(AEDX_MonitorTarget) getVariable [QACEGVAR(medical,heartRate), 0]; if (GVAR(AED_X_VitalsMonitor_BloodPressureInterval) > 0) then { - _bp = GVAR(AEDX_MonitorTarget_Title) getVariable [QGVAR(StoredBloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) getVariable [QGVAR(StoredBloodPressure), [0,0]]; } else { - _bp = GVAR(AEDX_MonitorTarget_Title) getVariable [QACEGVAR(medical,bloodPressure), [0,0]]; + _bp = GVAR(AEDX_MonitorTarget) call FUNC(getBloodPressure); }; }; }; diff --git a/addons/circulation/functions/fnc_AEDX_VitalsMonitor.sqf b/addons/circulation/functions/fnc_AEDX_VitalsMonitor.sqf index d568199a9..78bb3c11c 100644 --- a/addons/circulation/functions/fnc_AEDX_VitalsMonitor.sqf +++ b/addons/circulation/functions/fnc_AEDX_VitalsMonitor.sqf @@ -35,30 +35,17 @@ if (_patient getVariable ["kat_AEDXPatient_PFH", -1] isEqualTo -1) then { if ((!(_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) && !(_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false])) || _patient isEqualTo objNull) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _patient setVariable ["kat_AEDXPatient_PFH", nil, true]; - [_patient, "quick_view", LSTRING(VitalsMonitor_StatusLog)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMInactive_StatusLog)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMActive_StatusLog)] call FUNC(removeLog); - - [_patient, "quick_view", LSTRING(VitalsMonitor_StatusLog_HasEtco2Monitor)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMInactive_StatusLog_HasEtco2Monitor)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMActive_StatusLog_HasEtco2Monitor)] call FUNC(removeLog); }; //No Values for your Monitor atm if (_patient getVariable [QGVAR(DefibrillatorInUse), false]) exitWith {}; // Clear previous log entry before adding new one - [_patient, "quick_view", LSTRING(VitalsMonitor_StatusLog)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMInactive_StatusLog)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMActive_StatusLog)] call FUNC(removeLog); - - [_patient, "quick_view", LSTRING(VitalsMonitor_StatusLog_HasEtco2Monitor)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMInactive_StatusLog_HasEtco2Monitor)] call FUNC(removeLog); - [_patient, "quick_view", LSTRING(VitalsMonitor_VMActive_StatusLog_HasEtco2Monitor)] call FUNC(removeLog); private _partIndex = ((_patient getVariable [QGVAR(AED_X_VitalsMonitor_Provider), [objNull, -1, 3]]) select 2); private _tourniquetApplied = HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex); - + private _isOccluded = [_patient,_partIndex] call EFUNC(pharma,occlusionCheck); + private _isDamaged = [_patient,_partIndex] call EFUNC(hitpoints,damageCheck); private _hr = 0; private _pr = 0; private _bp = [0,0]; @@ -66,8 +53,8 @@ if (_patient getVariable ["kat_AEDXPatient_PFH", -1] isEqualTo -1) then { private _etco2 = 0; private _breathrate = 0; - private _hasEtco2Monitor = ["_HasEtco2Monitor",""] select (_patient getVariable [QEGVAR(breathing,etco2Monitor),[]] isEqualTo []); //check for etco2 monitoring apparatus - _hasEtco2Monitor = ["",_hasEtco2Monitor] select (EGVAR(breathing,Etco2_Enabled)); //check etco2 monitoring is enabled + private _hasEtco2Monitor = (_patient getVariable [QEGVAR(breathing,etco2Monitor),[]] isNotEqualTo []); //check for etco2 monitoring apparatus + _hasEtco2Monitor = [false, _hasEtco2Monitor] select (EGVAR(breathing,Etco2_Enabled)); //check etco2 monitoring is enabled if !(_patient getVariable [QGVAR(heartRestart), false]) then { _pr = _patient getVariable [QACEGVAR(medical,heartRate), 0]; @@ -78,41 +65,60 @@ if (_patient getVariable ["kat_AEDXPatient_PFH", -1] isEqualTo -1) then { _bp = _patient getVariable [QGVAR(StoredBloodPressure), [0,0]]; }; } else { - _hr = _pr; - + if (GVAR(AEDX_MonitorTarget) getVariable [QGVAR(attachedLucasState), false]) then { + _hr = 100 // fake heart rate because patient is dead and off state machine + } else { + _hr = _pr; + }; + if (GVAR(AED_X_VitalsMonitor_BloodPressureInterval) isEqualTo 0) then { - _bp = _patient getVariable [QACEGVAR(medical,bloodPressure), [0,0]]; + _bp = _patient call FUNC(getBloodPressure); } else { _bp = _patient getVariable [QGVAR(StoredBloodPressure), [0,0]]; }; }; }; - if (_tourniquetApplied) then { + if (_isOccluded || _isDamaged) then { _bp = [0,0]; _pr = 0; + }; + private _partIndex2 = ((_patient getVariable [QGVAR(AED_X_VitalsMonitor_Provider), [-1, -1, -1]]) select 2) - 1; + private _isSPO2Damaged = [_patient,_partIndex2] call EFUNC(hitpoints,damageCheck); + private _isSPO2Occluded = [_patient,_partIndex2] call EFUNC(pharma,occlusionCheck); + if (_isSPO2Occluded || _isSPO2Damaged) then { + _spO2 = 0; } else { _spO2 = GET_KAT_SPO2(_patient); }; private _etco2 = GET_ETCO2(_patient); private _breathrate = GET_BREATHING_RATE(_patient); - - // List vitals depending on if AED pads and vitals monitoring (pressure cuff + pulse oximeter) is connected - if (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] && _patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) then { - // heart rate, systolic / diastolic, spO2, etco2, respiratory rate - [_patient, "quick_view", LSTRING(VitalsMonitor_StatusLog)+_hasEtco2Monitor, [round(_hr), round(_bp select 1), round(_bp select 0), round(_spO2), round(_etco2), round(_breathrate)]] call ACEFUNC(medical_treatment,addToLog); - } else { - if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) then { - [_patient, "quick_view", LSTRING(VitalsMonitor_VMInactive_StatusLog)+_hasEtco2Monitor, [round(_hr), round(_etco2), round(_breathrate)]] call ACEFUNC(medical_treatment,addToLog); - } else { - [_patient, "quick_view", LSTRING(VitalsMonitor_VMActive_StatusLog)+_hasEtco2Monitor, [round(_pr), round(_bp select 1), round(_bp select 0), round(_spO2), round(_etco2), round(_breathrate)]] call ACEFUNC(medical_treatment,addToLog); + private _status = ""; + switch (true) do { + case (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] && _patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && _hasEtco2Monitor): { + _status = format [LLSTRING(VitalsMonitor_StatusLog_hasEtco2Monitor), round(_hr), round(_bp select 1), round(_bp select 0), round(_spO2), round(_etco2), round(_breathrate)]; + }; + case (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] && _patient getVariable [QGVAR(DefibrillatorPads_Connected), false]): { + _status = format [LLSTRING(VitalsMonitor_StatusLog), round(_hr), round(_bp select 1), round(_bp select 0), round(_spO2)]; + }; + case (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && _hasEtco2Monitor): { + _status = format [LLSTRING(VitalsMonitor_VMInactive_StatusLog_hasEtco2Monitor), round(_hr), round(_etco2), round(_breathrate)]; + }; + case (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]): { + _status = format [LLSTRING(VitalsMonitor_VMInactive_StatusLog), round(_hr)]; + }; + case (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] && _hasEtco2Monitor): { + _status = format [LLSTRING(VitalsMonitor_VMActive_StatusLog_hasEtco2Monitor), round(_pr), round(_bp select 1), round(_bp select 0), round(_spO2), round(_etco2), round(_breathrate)]; + }; + case (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false]): { + _status = format [LLSTRING(VitalsMonitor_VMActive_StatusLog),round(_pr), round(_bp select 1), round(_bp select 0), round(_spO2)]; }; }; - + _patient setVariable [QGVAR(AED_X_VitalsStatus), _status, true]; if (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] && GVAR(BPInterval)) then { // Store new BP - if !(_tourniquetApplied) then { - _patient setVariable [QGVAR(StoredBloodPressure), (_patient getVariable [QACEGVAR(medical,bloodPressure), [0,0]]), true]; + if !(_isOccluded) then { + _patient setVariable [QGVAR(StoredBloodPressure), [_patient] call FUNC(getBloodPressure), true]; } else { _patient setVariable [QGVAR(StoredBloodPressure), [0,0], true]; }; @@ -285,14 +291,14 @@ if (_patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] && {(_pat [_idPFH] call CBA_fnc_removePerFrameHandler; }; - private _partIndex = ((_patient getVariable [QGVAR(AED_X_VitalsMonitor_Provider), [-1, -1, -1]]) select 2); - private _tourniquetApplied = HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex); + private _partIndex = ((_patient getVariable [QGVAR(AED_X_VitalsMonitor_Provider), [-1, -1, -1]]) select 2) - 1; + private _isOccluded = [_patient,_partIndex] call EFUNC(pharma,occlusionCheck); if (_patient getVariable [QGVAR(DefibrillatorInUse), false] || !(_patient getVariable [QGVAR(AED_X_VitalsMonitor_VolumePatient), false])) then { } else { private _hr = _patient getVariable [QACEGVAR(medical,heartRate), 80]; private _spO2 = GET_KAT_SPO2(_patient); - if (_spO2 < GVAR(AED_X_Monitor_SpO2Warning) || _tourniquetApplied) then { + if (_spO2 < GVAR(AED_X_Monitor_SpO2Warning) || _isOccluded) then { playSound3D [QPATHTOF_SOUND(sounds\spo2warning.wav), _soundSource, false, getPosASL _soundSource, 5, 1, 15]; }; }; diff --git a/addons/circulation/functions/fnc_AED_Charge.sqf b/addons/circulation/functions/fnc_AED_Charge.sqf index 87fef05b8..50c40be65 100644 --- a/addons/circulation/functions/fnc_AED_Charge.sqf +++ b/addons/circulation/functions/fnc_AED_Charge.sqf @@ -43,11 +43,11 @@ playSound3D [QPATHTOF_SOUND(sounds\charging.wav), _soundSource, false, getPosASL playSound3D [QPATHTOF_SOUND(sounds\bump.wav), _patient, false, getPosASL _patient, 6, 1, 15]; [{ // Prompt to analyze again - params ["_soundSource"]; + params ["_soundSource", "_patient"]; if (_patient getVariable [QGVAR(DefibrillatorInUse), false] || _patient getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false]) exitWith {}; playSound3D [QPATHTOF_SOUND(sounds\pushanalyze.wav), _soundSource, false, getPosASL _soundSource, 6, 1, 15]; - }, [_soundSource], 2] call CBA_fnc_waitAndExecute; + }, [_soundSource, _patient], 2] call CBA_fnc_waitAndExecute; } else { // Defibrillator disarmed playSound3D [QPATHTOF_SOUND(sounds\3beep.wav), _soundSource, false, getPosASL _soundSource, 6, 1, 15]; }; diff --git a/addons/circulation/functions/fnc_AED_Shock.sqf b/addons/circulation/functions/fnc_AED_Shock.sqf index 114a89e99..c03d47363 100644 --- a/addons/circulation/functions/fnc_AED_Shock.sqf +++ b/addons/circulation/functions/fnc_AED_Shock.sqf @@ -32,12 +32,13 @@ if (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull] != objNull) t _patient setVariable [QGVAR(heartRestart), true, true]; _patient setVariable [QGVAR(RhythmAnalyzed), false, true]; +[QGVAR(AEDused), _patient] call CBA_fnc_localEvent; [{ params ["_patient"]; _patient setVariable [QGVAR(heartRestart), false, true]; -}, [_patient], 4] call CBA_fnc_waitAndExecute; +}, [_patient], 5] call CBA_fnc_waitAndExecute; [{ params ["_patient"]; diff --git a/addons/circulation/functions/fnc_CPRStart.sqf b/addons/circulation/functions/fnc_CPRStart.sqf index 50d4fcffe..0c9bf64d4 100644 --- a/addons/circulation/functions/fnc_CPRStart.sqf +++ b/addons/circulation/functions/fnc_CPRStart.sqf @@ -44,7 +44,7 @@ GVAR(CPRDevice_Iterate) = [0xF1, [false, false, false], { GVAR(CPRTarget) setVariable [QGVAR(deviceCode), _deviceCode, true]; true }, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; - +_patient setVariable [QGVAR(activeCPR), true, true]; private _CPRStartTime = CBA_missionTime + 2.5; ACEGVAR(medical_gui,pendingReopen) = false; // Prevent medical menu from reopening @@ -121,11 +121,18 @@ if (_notInVehicle) then { private _medicCondition = (!(alive _medic) || IS_UNCONSCIOUS(_medic) || _medic isEqualTo objNull); private _vehicleCondition = (objectParent _medic isNotEqualTo objectParent _patient); private _distanceCondition = (_patient distance2D _medic > ACEGVAR(medical_gui,maxDistance)); + private _CPRTime = CBA_missionTime - _CPRStartTime; + private _minutes = floor (_CPRTime / 60); + private _seconds = floor (_CPRTime % 60); + private _time = format ["%1:%2", [_minutes, 2] call CBA_fnc_formatNumber, [_seconds, 2] call CBA_fnc_formatNumber]; + _patient setVariable [QGVAR(CPR_time), _CPRStartTime, true]; if (_patientCondition || _medicCondition || (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull]) isEqualTo objNull || !(_medic getVariable [QGVAR(isPerformingCPR), false]) || dialog || {(!_notInVehicle && _vehicleCondition) || {(_notInVehicle && _distanceCondition)}}) exitWith { // Stop CPR [_idPFH] call CBA_fnc_removePerFrameHandler; _medic setVariable [QGVAR(isPerformingCPR), false, true]; + _patient setVariable [QGVAR(activeCPR), false, true]; + _patient setVariable [QGVAR(CPR_time), 0, true]; if (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull] isNotEqualTo objNull) then { _patient setVariable [QACEGVAR(medical,CPR_provider), objNull, true]; @@ -139,13 +146,6 @@ if (_notInVehicle) then { if (_notInVehicle) then { [_medic, "AinvPknlMstpSnonWnonDnon_medicEnd", 2] call ACEFUNC(common,doAnimation); }; - - // Format time to minutes:seconds - private _CPRTime = CBA_missionTime - _CPRStartTime; - private _minutes = floor (_CPRTime / 60); - private _seconds = floor (_CPRTime % 60); - private _time = format ["%1:%2", [_minutes, 2] call CBA_fnc_formatNumber, [_seconds, 2] call CBA_fnc_formatNumber]; - [_patient, "activity", LSTRING(Activity_CPR), [[_medic, false, true] call ACEFUNC(common,getName), _time]] call ACEFUNC(medical_treatment,addToLog); if (CPRStartTime <= CBA_missionTime - 18) then { diff --git a/addons/circulation/functions/fnc_DefibrillatorPlaced_CheckCondition.sqf b/addons/circulation/functions/fnc_DefibrillatorPlaced_CheckCondition.sqf index 23996e96d..a28e8ac2e 100644 --- a/addons/circulation/functions/fnc_DefibrillatorPlaced_CheckCondition.sqf +++ b/addons/circulation/functions/fnc_DefibrillatorPlaced_CheckCondition.sqf @@ -55,4 +55,4 @@ switch (_check) do { }; }; -_condition && {!(_patient getVariable [QEGVAR(airway,recovery), false]) && (isNull objectParent _patient) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}}; +_condition && {!(_patient getVariable [QEGVAR(airway,recovery), false]) && (isNull objectParent _patient)}; diff --git a/addons/circulation/functions/fnc_addDefibrillatorActions.sqf b/addons/circulation/functions/fnc_addDefibrillatorActions.sqf index 7c7cf4899..49288892d 100644 --- a/addons/circulation/functions/fnc_addDefibrillatorActions.sqf +++ b/addons/circulation/functions/fnc_addDefibrillatorActions.sqf @@ -32,13 +32,13 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "body", "AEDXStationPlacePads", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "chest", "AEDXStationPlacePads", [_defibObject]] call EFUNC(misc,treatment); }, { params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "body", "AEDXStationPlacePads", [_defibObject]] call ACEFUNC(medical_treatment,canTreat); + [_medic, _patient, "chest", "AEDXStationPlacePads", [_defibObject]] call ACEFUNC(medical_treatment,canTreat); }, {}, [_x, _defibObject] @@ -56,13 +56,13 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "rightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "upperrightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); }, { params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "rightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call ACEFUNC(medical_treatment,canTreat); + [_medic, _patient, "upperrightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call ACEFUNC(medical_treatment,canTreat); }, { params ["_medic", "", "_args"]; @@ -77,7 +77,7 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "leftarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "upperleftarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); }, { true @@ -96,7 +96,7 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "rightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "upperrightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); }, { true @@ -126,7 +126,7 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "leftarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "upperleftarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); }, { true @@ -141,7 +141,7 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "rightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "upperrightarm", "AEDXStationConnectVitalsMonitor", [_defibObject]] call EFUNC(misc,treatment); }, { true @@ -160,13 +160,13 @@ switch (_type) do { // AED-X pads params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "body", "AEDStationPlacePads", [_defibObject]] call EFUNC(misc,treatment); + [_medic, _patient, "chest", "AEDStationPlacePads", [_defibObject]] call EFUNC(misc,treatment); }, { params ["_medic", "", "_args"]; _args params ["_patient", "_defibObject"]; - [_medic, _patient, "body", "AEDStationPlacePads", [_defibObject]] call ACEFUNC(medical_treatment,canTreat); + [_medic, _patient, "chest", "AEDStationPlacePads", [_defibObject]] call ACEFUNC(medical_treatment,canTreat); }, {}, [_x, _defibObject] diff --git a/addons/circulation/functions/fnc_attachLucas.sqf b/addons/circulation/functions/fnc_attachLucas.sqf new file mode 100644 index 000000000..fbf1fe2d3 --- /dev/null +++ b/addons/circulation/functions/fnc_attachLucas.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; + +_patient setVariable [QGVAR(attachedLucas), true, true]; + diff --git a/addons/circulation/functions/fnc_canAttachLucas.sqf b/addons/circulation/functions/fnc_canAttachLucas.sqf new file mode 100644 index 000000000..4f2960074 --- /dev/null +++ b/addons/circulation/functions/fnc_canAttachLucas.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +if (!(_patient call ACEFUNC(common,isAwake)) && ((IN_MED_VEHICLE(_patient)) || (IN_MED_FACILITY(_patient))) && !(_patient getVariable [QGVAR(attachedLucas), false])) exitWith {true}; +false + diff --git a/addons/circulation/functions/fnc_canDetachLucas.sqf b/addons/circulation/functions/fnc_canDetachLucas.sqf new file mode 100644 index 000000000..f67007bc4 --- /dev/null +++ b/addons/circulation/functions/fnc_canDetachLucas.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +if (_patient getVariable [QGVAR(attachedLucas), false]) exitWith {true}; +false diff --git a/addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf b/addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf index e0c73e68e..7157ccf9f 100644 --- a/addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf +++ b/addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf @@ -21,8 +21,12 @@ params ["_medic", "_patient", "_bodyPart"]; private _bloodPressure = [0, 0]; +private _bodyPartN = ALL_BODY_PARTS find _bodyPart; +private _isOccluded = [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck); +private _isDamaged = [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck); -if (alive _patient && {!([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))}) then { + +if (alive _patient && (!_isOccluded && !_isDamaged)) then { _bloodPressure = [_patient] call FUNC(getBloodPressure); }; diff --git a/addons/circulation/functions/fnc_checkBloodPressureLocal.sqf b/addons/circulation/functions/fnc_checkBloodPressureLocal.sqf index 1e784682f..0ee6164c3 100644 --- a/addons/circulation/functions/fnc_checkBloodPressureLocal.sqf +++ b/addons/circulation/functions/fnc_checkBloodPressureLocal.sqf @@ -20,8 +20,12 @@ params ["_medic", "_patient", "_bodyPart"]; private _bloodPressure = [0, 0]; +private _bodyPartN = ALL_BODY_PARTS find _bodyPart; +private _isOccluded = [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck); +private _isDamaged = [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck); -if (alive _patient && {!([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))}) then { + +if (alive _patient && (!_isOccluded && !_isDamaged)) then { _bloodPressure = [_patient] call FUNC(getBloodPressure); }; @@ -34,7 +38,7 @@ if (_bloodPressureLow > 40) then { if (_medic call ACEFUNC(medical_treatment,isMedic)) then { if (GVAR(hardcoreDiagnose)) then { _bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_Palp); - _logOutput = format [LLSTRING(Bloodpressure_Output_Palp), (round (_bloodPressureLow / 10) * 10) + ([10, -10] select (random 1 > 0.5))]; + _logOutput = format [LLSTRING(Bloodpressure_Output_Palp), (round (_bloodPressureLow / 10) * 10) + ([5, -5] select (random 1 > 0.5))]; } else { _bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_1); _logOutput = format ["%1/%2", round _bloodPressureHigh, round _bloodPressureLow]; diff --git a/addons/circulation/functions/fnc_checkCapRefill.sqf b/addons/circulation/functions/fnc_checkCapRefill.sqf new file mode 100644 index 000000000..9b3fa58a6 --- /dev/null +++ b/addons/circulation/functions/fnc_checkCapRefill.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal modified by Cplhardcore + * Checks the pulse or heart rate of the patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulse + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(checkCapRefillLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_checkCapRefillLocal.sqf b/addons/circulation/functions/fnc_checkCapRefillLocal.sqf new file mode 100644 index 000000000..17e37270f --- /dev/null +++ b/addons/circulation/functions/fnc_checkCapRefillLocal.sqf @@ -0,0 +1,57 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for checking the pulse or heart rate of a patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulseLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +private _bodyPartN = ALL_BODY_PARTS find _bodyPart; +private _isOccluded = [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck); +private _isDamaged = [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck); +private _oxygenDelivery = _patient getVariable [QGVAR(oxygenDelivery), 1]; +private _capRefillOutput = LSTRING(Check_capRefill_Output_Normal); +private _logCapRefillOutput = LSTRING(Check_capRefill_Output_Normal_log); +private _cardiacOutput = ((_patient call EFUNC(vitals,getCardiacOutput)) * _oxygenDelivery); +if (_isOccluded || _isDamaged) then { + _capRefillOutput = LSTRING(Check_capRefill_Output_NoRefill); + _logCapRefillOutput = LSTRING(Check_capRefill_Output_NoRefill_log); +} else { + switch (true) do { + case (_cardiacOutput >= 0.95): { + // Normal refill ≤ 2s + _capRefillOutput = LSTRING(Check_capRefill_Output_Normal); + _logCapRefillOutput = LSTRING(Check_capRefill_Output_Normal_log); + }; + case (_cardiacOutput >= 0.75): { + // Delayed refill ~3-4s + _capRefillOutput = LSTRING(Check_capRefill_Output_Delayed); + _logCapRefillOutput = LSTRING(Check_capRefill_Output_Delayed_log); + }; + case (_cardiacOutput >= 0.55): { + // Severely delayed refill ≥ 5s + _capRefillOutput = LSTRING(Check_capRefill_Output_SeverelyDelayed); + _logCapRefillOutput = LSTRING(Check_capRefill_Output_SeverelyDelayed_log); + }; + default { + // Severely delayed refill ≥ 5s + _capRefillOutput = LSTRING(Check_capRefill_Output_SeverelyDelayed); + _logCapRefillOutput = LSTRING(Check_capRefill_Output_SeverelyDelayed_log); + }; + }; +}; + +[_patient, "quick_view", LSTRING(Check_Neck_Output), [_medic call ACEFUNC(common,getName), _logCapRefillOutput]] call ACEFUNC(medical_treatment,addToLog); +[QACEGVAR(common,displayTextStructured), [[_capRefillOutput, _patient call ACEFUNC(common,getName)], 1.5, _medic], _medic] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_checkNeck.sqf b/addons/circulation/functions/fnc_checkNeck.sqf new file mode 100644 index 000000000..8e1c0659b --- /dev/null +++ b/addons/circulation/functions/fnc_checkNeck.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal modified by Cplhardcore + * Checks the Neck of the patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Neck"] call kat_circulation_fnc_checkNeck + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(checkNeckLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_checkNeckLocal.sqf b/addons/circulation/functions/fnc_checkNeckLocal.sqf new file mode 100644 index 000000000..5c4c12df8 --- /dev/null +++ b/addons/circulation/functions/fnc_checkNeckLocal.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for checking the pulse or heart rate of a patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulseLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _neckOutput = LSTRING(Check_Neck_Output_3); +private _logNeckOutput = LSTRING(Check_Neck_Output_3_log); +private _tptx = _patient getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]]; +private _hptx = _patient getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]]; +private _ptx = _patient getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; +private _trali = _patient getVariable [QEGVAR(breathing,TRALI), 0]; +private _effusion = _patient getVariable [QEGVAR(circulation,effusion), 0]; + +if ((_trali > 5) || (_effusion > 0) || ((_ptx select 0 > 2) || (_ptx select 1 > 2) || (_tptx select 0) || (_tptx select 1) || ((_hptx select 0) > 0.3) || ((_hptx select 1) > 0.3))) then { + if ((_trali > 15) || (_effusion > 2) || ((_ptx select 0 > 6) || (_ptx select 1 > 6) || (_tptx select 0) || (_tptx select 1) || ((_hptx select 0) > 0.6) || ((_hptx select 1) > 0.6))) then{ + _neckOutput = LSTRING(Check_Neck_Output_2); + _logNeckOutput = LSTRING(Check_Neck_Output_2_log); + } else { + _neckOutput = LSTRING(Check_Neck_Output_1); + _logNeckOutput = LSTRING(Check_Neck_Output_1_log); + }; +}; +[_patient, "quick_view", LSTRING(Check_Neck_Output), [_medic call ACEFUNC(common,getName), _logNeckOutput]] call ACEFUNC(medical_treatment,addToLog); +[QACEGVAR(common,displayTextStructured), [[_neckOutput, _patient call ACEFUNC(common,getName)], 1.5, _medic], _medic] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_checkPulseLocal.sqf b/addons/circulation/functions/fnc_checkPulseLocal.sqf index e0a5fb27e..8a22355f7 100644 --- a/addons/circulation/functions/fnc_checkPulseLocal.sqf +++ b/addons/circulation/functions/fnc_checkPulseLocal.sqf @@ -20,14 +20,21 @@ params ["_medic", "_patient", "_bodyPart"]; private _heartRate = 0; +private _bodyPartN = ALL_BODY_PARTS find _bodyPart; +private _isOccluded = [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck); +private _isDamaged = [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck); -if !([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) then { + +if (!_isOccluded && !_isDamaged) then { _heartRate = switch (true) do { case (alive _patient): { GET_HEART_RATE(_patient) }; + case ((_patient getVariable [QGVAR(attachedLucasState), false])): { + 100 // fake heart rate because patient is dead and off state machine + }; case (alive (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull])): { - random [100, 110, 120] // fake heart rate because patient is dead and off state machine + random [90, 100, 120] // fake heart rate because patient is dead and off state machine }; default { 0 }; }; diff --git a/addons/circulation/functions/fnc_checkPulseStethLocal.sqf b/addons/circulation/functions/fnc_checkPulseStethLocal.sqf index 92f22f173..9e3c3520c 100644 --- a/addons/circulation/functions/fnc_checkPulseStethLocal.sqf +++ b/addons/circulation/functions/fnc_checkPulseStethLocal.sqf @@ -19,13 +19,20 @@ params ["_medic", "_patient", "_bodyPart"]; +private _bodyPartN = ALL_BODY_PARTS find _bodyPart; +private _isOccluded = [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck); +private _isDamaged = [_patient,_bodyPartN] call EFUNC(hitpoints,damageCheck); + private _heartRate = 0; -if !([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) then { +if (!_isOccluded && !_isDamaged) then { _heartRate = switch (true) do { case (alive _patient): { GET_HEART_RATE(_patient) }; + case ((_patient getVariable [QGVAR(attachedLucasState), false])): { + 100 // fake heart rate because patient is dead and off state machine + }; case (alive (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull])): { random [100, 105, 95] // fake heart rate because patient is dead and off state machine }; diff --git a/addons/circulation/functions/fnc_cprLocal.sqf b/addons/circulation/functions/fnc_cprLocal.sqf index adfabc32f..ffb94c4de 100644 --- a/addons/circulation/functions/fnc_cprLocal.sqf +++ b/addons/circulation/functions/fnc_cprLocal.sqf @@ -23,7 +23,7 @@ params ["_medic", "_patient", "_reviveObject"]; private _chance = 0; private _random = ((random 100) - (GET_REBOA_VOLUME(_patient) * 10)) max 1; private _randomAmi = random 4; -private _epiBoost = 1; +private _epiBoost = 0; private _amiBoost = 0; private _lidoBoost = 0; private _nitroEffect = 1; @@ -77,34 +77,46 @@ private _fnc_advRhythm = { }; { - _x params ["_medication"]; + _x params ["_medication", "", "", "", "", "", "", "_dose"]; switch(_medication) do { case "Epinephrine": { - _epiBoost = 1.5; + _epiBoost = _epiBoost + (1.25 * (_dose / 10)); }; - case "EpinephrineIV": + case "Lidocaine": { - _epiBoost = 1.5; + _lidoBoost = _lidoBoost + (4 * (_dose / 10)); }; case "Amiodarone": { - _amiBoost = _amiBoost + (random [8,14,20]); - }; - case "Lidocaine": - { - _lidoBoost = _lidoBoost + 8; + _amiBoost = _amiBoost + ((random [4,8,14]) * (_dose / 10)); }; case "Nitroglycerin": { - _nitroEffect = _nitroEffect + 1; + _nitroEffect = (_nitroEffect + (1 * _dose)); }; }; } forEach (_patient getVariable [QACEGVAR(medical,medications), []]); - +private _ph = GET_PH(_patient); +private _ca = GET_CA(_patient); +private _phChance = if (_ph > 7.5) then { + linearConversion [7.55, 7.9, _ph, 1, 0.4, true]; +} else { + linearConversion [7.3, 6.8, _ph, 1, 0.1, true]; +}; +private _caChance = if (_ca > 2.6) then { + linearConversion [2.6, 3.4, _ca, 1, 0.4, true]; +} else { + linearConversion [2.2, 1.8, _ca, 1, 0.2, true]; +}; switch (_reviveObject) do { + case "LUCAS": { + if (GVAR(enable_CPR_Chances)) then { + _chance = linearConversion [BLOOD_VOLUME_CLASS_4_HEMORRHAGE, BLOOD_VOLUME_CLASS_2_HEMORRHAGE, GET_BLOOD_VOLUME_LITERS(_patient), 0.05, 0.1, true]; + }; + }; case "CPR": { if (GVAR(enable_CPR_Chances)) then { switch (_medic getVariable [QACEGVAR(medical,medicClass),0]) do { @@ -131,10 +143,14 @@ switch (_reviveObject) do { }; if (_reviveObject in ["AED", "AEDX"]) exitWith { + if (_patient getVariable [QGVAR(cardiacArrestType), 0] in [4,3] && (_patient getVariable [QGVAR(refractoryCA), false])) then { + _chance = _chance / 4; + }; _chance = _chance + (_amiBoost + (1 max _lidoBoost) * _epiBoost) / _nitroEffect; - private _patientState = _patient getVariable [QGVAR(cardiacArrestType), 0]; - + private _AEDeffectivness = (_patient getVariable [QGVAR(AEDEffectiveness), 1]) max 0.2; + _chance = _chance * _AEDeffectivness; + _chance = _chance * _caChance * _phChance; if (GVAR(AdvRhythm)) then { if (_patientState > 2) then { if (_random <= _chance) then { @@ -167,7 +183,40 @@ if !(GVAR(enable_CPR_Chances)) then { }; }; } else { - if (_epiBoost isEqualTo 1.5) then { + if (_reviveObject in ["LUCAS"]) then { + if (_epiBoost > 1.5) then { + _chance = _chance + (2 ^ _CPRcount); + _CPRcount = _CPRcount + 0.01; + _patient setVariable [QGVAR(cprCount), _CPRcount, true]; + }; + + if (_patient getVariable [QGVAR(cardiacArrestType), 0] in [4,3] && _randomAmi > 2) then { + _chance = _chance + (_amiBoost / 10); + }; + + if (_patient getVariable [QGVAR(cardiacArrestType), 0] in [4,3] && (_patient getVariable [QGVAR(refractoryCA), false])) then { + _chance = _chance / 4; + }; + _chance = _chance * _caChance * _phChance; + _chance = _chance / _nitroEffect; + + if (_random <= _chance) then { + if (GVAR(AdvRhythm)) then { + if (_patient getVariable [QGVAR(cardiacArrestType), 0] != 0) then { + [_patient, true] call _fnc_advRhythm; + }; + } else { + [QACEGVAR(medical,CPRSucceeded), _patient] call CBA_fnc_localEvent; + }; + _patient setVariable [QGVAR(cprCount), 2, true]; + } else { + _CPRcount = _CPRcount + 0.01; + _patient setVariable [QGVAR(cprCount), _CPRcount, true]; + }; + + } else { + + if (_epiBoost > 1.5) then { _chance = _chance + (2 ^ _CPRcount); _CPRcount = _CPRcount + 1; @@ -193,4 +242,5 @@ if !(GVAR(enable_CPR_Chances)) then { _CPRcount = _CPRcount + 1; _patient setVariable [QGVAR(cprCount), _CPRcount, true]; }; + }; }; diff --git a/addons/circulation/functions/fnc_detachLucas.sqf b/addons/circulation/functions/fnc_detachLucas.sqf new file mode 100644 index 000000000..e0732729b --- /dev/null +++ b/addons/circulation/functions/fnc_detachLucas.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_medic", "_patient"]; +_patient setVariable [QGVAR(attachedLucas), false, true]; +_patient setVariable [QGVAR(attachedLucasState), false, true]; diff --git a/addons/circulation/functions/fnc_fullHealLocal.sqf b/addons/circulation/functions/fnc_fullHealLocal.sqf index 6eaf3a2e4..0ae6e401a 100644 --- a/addons/circulation/functions/fnc_fullHealLocal.sqf +++ b/addons/circulation/functions/fnc_fullHealLocal.sqf @@ -19,9 +19,12 @@ params ["_patient"]; TRACE_1("fullHealLocal",_patient); _patient setVariable [QGVAR(cprCount), 2, true]; +_patient setVariable [QGVAR(CPR_time), 0, true]; +_patient setVariable [QGVAR(activeCPR), false, true]; _patient setVariable [QGVAR(heartRestart), false, true]; _patient setVariable [QGVAR(cardiacArrestType), 0, true]; - +_patient setVariable [QGVAR(refractoryCA), false, true]; +_patient setVariable [QGVAR(AED_X_VitalsStatus), "", true]; _patient setVariable [VAR_BLOODPRESSURE_CHANGE, nil, true]; _patient setVariable [QGVAR(bodyFluid), DEFAULT_BODY_FLUID]; @@ -29,16 +32,22 @@ _patient setVariable [QGVAR(bodyFluid), DEFAULT_BODY_FLUID]; _patient setVariable [QGVAR(isPerformingCPR), false, true]; _patient setVariable [QGVAR(OxygenationPeriod), 0, true]; -_patient setVariable [QGVAR(tourniquetTime), [0,0,0,0,0,0]]; +_patient setVariable [QGVAR(tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]]; +_patient setVariable [QGVAR(defaultHeartRate), [_patient] call FUNC(generateDefaultHeartRate), true]; +_patient setVariable [QGVAR(bloodtype), [_patient, _patient, true] call FUNC(generateBloodType), true]; // PaCO2, PaO2, O2 Sat, HCO3, pH, ETCO2 _patient setVariable [QGVAR(bloodGas), DEFAULT_BLOOD_GAS, true]; -_patient setVariable [QGVAR(testedBloodGas), [0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(testedBloodGas), [0,0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(bloodGasTime), -1, true]; _patient setVariable [QGVAR(ABGmenuShow), false]; _patient setVariable [QGVAR(ht), [], true]; _patient setVariable [QGVAR(effusion), 0, true]; -[_patient, true] call FUNC(updateInternalBleeding); +_patient setVariable [QGVAR(attachedLucas), false, true]; +_patient setVariable [QGVAR(attachedLucasState), false, true]; +_patient setVariable [QGVAR(heartRestart), false, true]; +_patient setVariable [QGVAR(AEDEffectiveness), 1, true]; diff --git a/addons/circulation/functions/fnc_generateDefaultHeartRate.sqf b/addons/circulation/functions/fnc_generateDefaultHeartRate.sqf new file mode 100644 index 000000000..970c0efa5 --- /dev/null +++ b/addons/circulation/functions/fnc_generateDefaultHeartRate.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Generates blood type for player according to settings + * + * Arguments: + * 0: Player + * 1: Dead body + * + * Return Value: + * Blood type + * + * Example: + * [unit, body] call kat_circulation_fnc_generateBloodType; + * + * Public: No + */ + +params ["_unit"]; + +private _defaultHeartRate = 80; +private _playerdefaultHeartRate = _unit getVariable [QGVAR(defaultHeartRate), _defaultHeartRate]; + +if (isMultiplayer) then { + private _id = parseNumber (getPlayerUID _unit select [15, 2]); + + switch(true) do { + case (0 <= _id && _id <= 5): {_defaultHeartRate = 71}; + case (6 <= _id && _id <= 10): {_defaultHeartRate = 76}; + case (11 <= _id && _id <= 15): {_defaultHeartRate = 87}; + case (16 <= _id && _id <= 20): {_defaultHeartRate = 83}; + case (21 <= _id && _id <= 25): {_defaultHeartRate = 86}; + case (26 <= _id && _id <= 30): {_defaultHeartRate = 72}; + case (31 <= _id && _id <= 35): {_defaultHeartRate = 78}; + case (36 <= _id && _id <= 40): {_defaultHeartRate = 84}; + case (41 <= _id && _id <= 45): {_defaultHeartRate = 80}; + case (46 <= _id && _id <= 50): {_defaultHeartRate = 88}; + case (51 <= _id && _id <= 55): {_defaultHeartRate = 75}; + case (56 <= _id && _id <= 60): {_defaultHeartRate = 87}; + case (61 <= _id && _id <= 65): {_defaultHeartRate = 74}; + case (66 <= _id && _id <= 70): {_defaultHeartRate = 79}; + case (71 <= _id && _id <= 75): {_defaultHeartRate = 81}; + case (76 <= _id && _id <= 80): {_defaultHeartRate = 73}; + case (81 <= _id && _id <= 85): {_defaultHeartRate = 85}; + case (86 <= _id && _id <= 90): {_defaultHeartRate = 82}; + case (91 <= _id && _id <= 95): {_defaultHeartRate = 77}; + case (96 <= _id && _id <= 99): {_defaultHeartRate = 89}; + default {_defaultHeartRate = 80}; + }; + } else { + _defaultHeartRate = _playerdefaultHeartRate; + }; +_defaultHeartRate; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_getBloodPressure.sqf b/addons/circulation/functions/fnc_getBloodPressure.sqf index 6b651ffdb..ebec1c9ba 100644 --- a/addons/circulation/functions/fnc_getBloodPressure.sqf +++ b/addons/circulation/functions/fnc_getBloodPressure.sqf @@ -16,32 +16,99 @@ * * Public: No */ +params ["_unit"]; +#define BASELINE_MAP 94.7 +#define BASELINE_CO 0.1054056 // L/s +#define BASELINE_SVR (94.7 / 0.1054056 ) // ≈ 860 +private _cardiacOutput = [_unit] call EFUNC(vitals,getCardiacOutput); +private _strokeVolume = [_unit] call EFUNC(vitals,getStrokeVolume); +private _heartRate = GET_HEART_RATE(_unit); +private _exertionSVR = linearConversion [60, 130, _heartRate, 1.05, 0.75, true]; +private _resistance = _unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]; +private _vasoconstriction = GET_VASOCONSTRICTION(_unit); +private _tourniquets = GET_TOURNIQUETS(_unit); +private _icp = GET_ICP(_unit); +private _occlusionMap = [ + [3, [3, 8, 9, 10, 11]], + [4, [4]], + [5, [4, 5]], + [6, [6]], + [7, [6, 7]], + [8, [8]], + [9, [8, 9]], + [10, [10]], + [11, [10, 11]] +]; -// Value is taken because with cardic output and resistance at default values, it will put blood pressure High at 120. -#define MODIFIER_BP_HIGH 9.4736842 +private _occludedParts = []; +{ + private _idx = _x#0; + if (_tourniquets select _idx != 0) then { + { if !(_x in _occludedParts) then { _occludedParts pushBack _x; }; } forEach (_x#1); + }; +} forEach _occlusionMap; -// Value is taken because with cardic output and resistance at default values, it will put blood pressure Low at 80. -#define MODIFIER_BP_LOW 6.3157894 +private _countOccluded = count _occludedParts; +private _prevMAP = GET_MAP(_unit); +if (_icp > 25 && _prevMAP < 70) then { + _resistance = _resistance * linearConversion [25, 40, _icp, 1.1, 1.4, true]; +}; -params ["_unit"]; +private _map = + (_cardiacOutput + * BASELINE_SVR + * (_resistance / 100) + * _exertionSVR + * ((_vasoconstriction max 0.4) min 1.8)) + * (1.035 ^ _countOccluded); +TRACE_5("BP2", _map, _vasoconstriction, _resistance, BASELINE_SVR, _cardiacOutput); +_map = _map * 0.95; +private _cushing = [_unit] call EFUNC(vitals,getCushings); +if (_cushing > 0) then { + _map = _map * linearConversion [0, 1, _cushing, 1.0, 1.35, true]; + _map = _map min 140; +}; + +_unit setVariable [QGVAR(map), _map]; +TRACE_1("BP3", _map); +private _basePulsePressure = linearConversion [60, 110, _map, 30, 50, true]; +TRACE_1("BP4", _basePulsePressure); +private _baselineSV = 0.068; +private _svFactor = + linearConversion [0.03, _baselineSV, _strokeVolume, 0.4, 1.0, true]; +private _shockClass = _unit getVariable [QEGVAR(vitals,shockClass), "NONE"]; +private _shockPPMult = switch (_shockClass) do { + case "COMPENSATED": { 0.9 }; + case "DECOMPENSATED": { 0.7 }; + case "TERMINAL": { 0.45 }; + default { 1.0 }; +}; +private _bradyFactor = + linearConversion [80, 40, _heartRate, 0, 1, true]; -private _cardiacOutput = [_unit] call ACEFUNC(medical_status,getCardiacOutput); -private _resistance = _unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]; -private _bloodPressure = _cardiacOutput * _resistance; +private _cushingPPMult = + 1 + (_cushing * _bradyFactor * 0.6); -private _BPChange = _unit getVariable [VAR_BLOODPRESSURE_CHANGE, []]; +private _pulsePressure = + _basePulsePressure + * _svFactor + * _shockPPMult + * _cushingPPMult; +_pulsePressure = _pulsePressure max (_map * 0.15) min (_map * 0.9); +TRACE_1("BP4", _pulsePressure); +private _systolic = _map + (_pulsePressure * 0.6666667); +private _diastolic = _map - (_pulsePressure * 0.3333333); +private _BPChange = _unit getVariable [VAR_BLOODPRESSURE_CHANGE, []]; private _changeSystolic = 0; private _changeDiastolic = 0; -if (count _BPChange > 0) then { - { - _changeSystolic = _changeSystolic + (_x select 0); - _changeDiastolic = _changeDiastolic + (_x select 1); - } forEach _BPChange; -}; - -private _systolic = _bloodPressure * MODIFIER_BP_LOW; -private _diastolic = _bloodPressure * MODIFIER_BP_HIGH; +{ + _changeSystolic = _changeSystolic + (_x select 0); + _changeDiastolic = _changeDiastolic + (_x select 1); +} forEach _BPChange; -[(round(_systolic + _changeSystolic * (_systolic / 80)) max 0), (round(_diastolic + _changeDiastolic * (_diastolic / 120)) max 0)] +[ + (round (_diastolic + _changeDiastolic) max 0), + (round (_systolic + _changeSystolic) max 0) +] \ No newline at end of file diff --git a/addons/circulation/functions/fnc_gui_updateBodyImage.sqf b/addons/circulation/functions/fnc_gui_updateBodyImage.sqf index 249d6ce9f..e7590c277 100644 --- a/addons/circulation/functions/fnc_gui_updateBodyImage.sqf +++ b/addons/circulation/functions/fnc_gui_updateBodyImage.sqf @@ -30,7 +30,7 @@ if (_target getVariable [QGVAR(DefibrillatorPads_Connected), false]) then { }; if (_target getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false]) then { - if (((_target getVariable [QGVAR(AED_X_VitalsMonitor_Provider), [objNull, -1, 3]]) select 2) isEqualTo 3) then { + if (((_target getVariable [QGVAR(AED_X_VitalsMonitor_Provider), [objNull, -1, 3]]) select 2) isEqualTo 7) then { _ctrlAEDVitalsMonitorRight ctrlShow true; _ctrlAEDVitalsMonitorLeft ctrlShow false; } else { diff --git a/addons/circulation/functions/fnc_gui_updateInjuryListPart.sqf b/addons/circulation/functions/fnc_gui_updateInjuryListPart.sqf new file mode 100644 index 000000000..27f06c880 --- /dev/null +++ b/addons/circulation/functions/fnc_gui_updateInjuryListPart.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Updates injury list for given body part for the target. + * + * Arguments: + * 0: Injury list + * 1: Target + * 2: Body part, -1 to only show overall health info + * 3: Entries + * + * Return Value: + * None + * + * Example: + * [_ctrlInjuries, _target, 0] call kat_circulation_fnc_gui_updateInjuryListPart + * + * Public: No + */ + +params ["_ctrl", "_target", "_selectionN", "_entries"]; +if (_target getVariable [QGVAR(activeCPR), false]) then { + private _CPRStartTime = _target getVariable [QGVAR(CPR_time), 0]; + private _CPRTime = CBA_missionTime - _CPRStartTime; + private _minutes = floor (_CPRTime / 60); + private _seconds = floor (_CPRTime % 60); + private _time = format ["%1:%2", [_minutes, 2] call CBA_fnc_formatNumber, [_seconds, 2] call CBA_fnc_formatNumber]; + _entries pushBack [format ["%1 (%2)", ACELLSTRING(medical_treatment,Actions_CPR), _time], [0.3, 0.8, 0.8, 1]]; +}; +if ((_target getVariable [QGVAR(AED_X_VitalsMonitor_Connected), false] || _target getVariable [QGVAR(DefibrillatorPads_Connected), false]) && !(GVAR(hardcoreAED))) then { + private _entry = _target getVariable [QGVAR(AED_X_VitalsStatus), ""]; + if (_target getVariable [QGVAR(cardiacArrestType), 0] > 0) then { + _entries pushBack [_entry, [1, 0, 0, 1]]; + } else { + _entries pushBack [_entry, [1, 1, 1, 1]]; + }; +}; +if ((_target getVariable [QGVAR(attachedLucasState), false]) && (_target getVariable [QGVAR(attachedLucas), false]) && (_selectionN isEqualTo 2)) then { + _entries pushBack [LLSTRING(LucasActive), [0.3, 0.8, 0.8, 1]]; +}; + +if (!(_target getVariable [QGVAR(attachedLucasState), false]) && (_target getVariable [QGVAR(attachedLucas), false]) && (_selectionN isEqualTo 2)) then { + _entries pushBack [LLSTRING(LucasInactive), [0.3, 0.8, 0.8, 1]]; +}; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_handleCardiacArrest.sqf b/addons/circulation/functions/fnc_handleCardiacArrest.sqf index 97bc1bfbb..b3b92ac7d 100644 --- a/addons/circulation/functions/fnc_handleCardiacArrest.sqf +++ b/addons/circulation/functions/fnc_handleCardiacArrest.sqf @@ -35,7 +35,8 @@ if !(alive _unit) exitWith {_unit setVariable [QGVAR(cardiacArrestType), 1, true if ((_unit getVariable [QGVAR(cardiacArrestType), 0] != 0) && _initial) then { _initial = false; }; - +private _ca = GET_CA(_unit); +private _refractoryAdd = linearConversion [2.4, 1, _ca, 1, 2.5, true]; if (_initial) then { if !(_active) exitWith {}; @@ -51,6 +52,9 @@ if (_initial) then { } else { _cardiacArrestType = 3; }; + if (floor (random 100) < (GVAR(refractoryChance) * _refractoryAdd)) then { + _unit setVariable [QGVAR(refractoryCA), true, true]; + }; }; if ((count(_unit getVariable [QGVAR(ht), []])) != 0) then { @@ -119,6 +123,9 @@ if (GVAR(AdvRhythm_canDeteriorate)) then { if (_unit getVariable [QGVAR(cardiacArrestType), 0] isEqualTo 4) then { _unit setVariable [QGVAR(cardiacArrestType), 3, true]; [_unit, nil, false] call FUNC(handleCardiacArrest); + if (floor (random 100) < ((GVAR(refractoryChance)/ 2) * _refractoryAdd)) then { + _unit setVariable [QGVAR(refractoryCA), true, true]; + }; }; } else { [_unit, nil, false] call FUNC(handleCardiacArrest); diff --git a/addons/circulation/functions/fnc_handleTreatment.sqf b/addons/circulation/functions/fnc_handleTreatment.sqf index 635a57bd7..6bb10540e 100644 --- a/addons/circulation/functions/fnc_handleTreatment.sqf +++ b/addons/circulation/functions/fnc_handleTreatment.sqf @@ -27,9 +27,6 @@ _usedItem = "kat_" + _className; [_medic, _patient, _bodyPart, _className, objNull, _usedItem] call ACEFUNC(medical_treatment,ivBag); -if ([_patient, _className] call FUNC(compatible)) exitWith {}; - -[_className, _patient] call FUNC(treatmentAdvanced_IV); _return = true; diff --git a/addons/circulation/functions/fnc_lucasPFH.sqf b/addons/circulation/functions/fnc_lucasPFH.sqf new file mode 100644 index 000000000..3f17ffb39 --- /dev/null +++ b/addons/circulation/functions/fnc_lucasPFH.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Lucas PFH + * + * Arguments: + * 0: Paitent + * + * Return Value: + * None + * + * Example: + * [player] call kat_breathing_fnc_LucasPFH + * + * Public: No + */ + +params ["_unit"]; +[{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + playSound3D [QPATHTOF_SOUND(sounds\lucas.ogg), _unit, false, getPosASL _unit, 6, 1, 8]; + private _inVehicle = ((IN_MED_VEHICLE(_unit)) || (IN_MED_FACILITY(_unit))); + private _attachedLucas = _unit getVariable [QGVAR(attachedLucas), false]; + private _state = _unit getVariable [QGVAR(attachedLucasState), false]; + [_unit, _unit, "LUCAS"] call FUNC(cprLocal); + if (!_state) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _unit setVariable [QGVAR(attachedLucasState), false, true]; + _unit setVariable [QACEGVAR(medical,CPR_provider), objNull, true]; + }; + if (!_inVehicle || !_attachedLucas) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _unit setVariable [QGVAR(attachedLucas), false, true]; + _unit setVariable [QGVAR(attachedLucasState), false, true]; + _unit setVariable [QACEGVAR(medical,CPR_provider), objNull, true]; + }; +}, 0.6, [_unit]] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_lucasState.sqf b/addons/circulation/functions/fnc_lucasState.sqf new file mode 100644 index 000000000..dc896d05f --- /dev/null +++ b/addons/circulation/functions/fnc_lucasState.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_patient", "_state"]; +_patient setVariable [QGVAR(attachedLucasState), _state, true]; +if (_state) then { + _patient call FUNC(lucasPFH); + _patient setVariable [QACEGVAR(medical,CPR_provider), _patient, true]; +}; + + + diff --git a/addons/circulation/functions/fnc_lucasStateCondition.sqf b/addons/circulation/functions/fnc_lucasStateCondition.sqf new file mode 100644 index 000000000..7bff40aba --- /dev/null +++ b/addons/circulation/functions/fnc_lucasStateCondition.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Attaches BVM to a Patient + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_breathing_fnc_attachBVM + * + * Public: No + */ + +params ["_patient", "_state"]; +private _lucas = _patient getVariable [QGVAR(attachedLucas), false]; +private _lucasState = _patient getVariable [QGVAR(attachedLucasState), false]; +if ((_lucas) && (_lucasState == _state)) exitWith {true}; +false diff --git a/addons/circulation/functions/fnc_measureBloodPressure.sqf b/addons/circulation/functions/fnc_measureBloodPressure.sqf index 945dac0f7..5cfea44e4 100644 --- a/addons/circulation/functions/fnc_measureBloodPressure.sqf +++ b/addons/circulation/functions/fnc_measureBloodPressure.sqf @@ -20,5 +20,5 @@ params ["_unit"]; [{ params ["_unit"]; - _unit setVariable [QGVAR(StoredBloodPressure), (_unit getVariable [QACEGVAR(medical,bloodPressure), [0,0]]), true]; + _unit setVariable [QGVAR(StoredBloodPressure), [_unit] call FUNC(getBloodPressure), true]; }, [_unit], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/circulation/functions/fnc_treatmentAdvanced_IV.sqf b/addons/circulation/functions/fnc_treatmentAdvanced_IV.sqf deleted file mode 100644 index 2097f9f7c..000000000 --- a/addons/circulation/functions/fnc_treatmentAdvanced_IV.sqf +++ /dev/null @@ -1,40 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Katalam - * Handle the IV for the patient with blood types. Have to be local to avoid effect on all clients. - * - * Arguments: - * 0: Classname - * 1: Unit - * - * Return Value: - * None - * - * Example: - * ['Blood_IV_A', cursorTarget] call kat_circulation_fnc_treatmentAdvanced_IV - * - * Public: No - */ - -params ["_className", "_unit"]; - -//unit, adjustment, time -private _volume = getNumber (configFile >> "ACE_Medical_Treatment" >> "IV" >> _className >> "volume"); - -private _hradjust = -_volume; - -[_unit, "BloodPoisoning", 150, 300, _hradjust, 0, -10] call ACEFUNC(medical_status,addMedicationAdjustment); - -[{ - params ["_unit"]; - - if !(_unit getVariable [VAR_CRDC_ARRST, false]) then { - private _medicationArray = _unit getVariable [QACEGVAR(medical,medications), []]; - private _index = _medicationArray findIf {(_x select 0) isEqualTo "BloodPoisoning"}; - - if (_index > -1) then { - [QGVAR(bloodPoisoning), _unit, _unit] call CBA_fnc_targetEvent; - }; - }; - -}, [_unit], 150] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/circulation/functions/fnc_updateHeartRate.sqf b/addons/circulation/functions/fnc_updateHeartRate.sqf index 4302dd0fe..bda0457d4 100644 --- a/addons/circulation/functions/fnc_updateHeartRate.sqf +++ b/addons/circulation/functions/fnc_updateHeartRate.sqf @@ -25,7 +25,7 @@ private _heartRate = GET_HEART_RATE(_unit); if IN_CRDC_ARRST(_unit) then { if (alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull])) then { if (_heartRate == 0) then { _syncValue = true }; // always sync on large change - _heartRate = random [100, 100, 120]; + _heartRate = random [90, 100, 120]; } else { if (_heartRate != 0) then { _syncValue = true }; // always sync on large change _heartRate = 0 diff --git a/addons/circulation/functions/fnc_updateInternalBleeding.sqf b/addons/circulation/functions/fnc_updateInternalBleeding.sqf deleted file mode 100644 index 08933805d..000000000 --- a/addons/circulation/functions/fnc_updateInternalBleeding.sqf +++ /dev/null @@ -1,31 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Blue - * Updates internal bleeding rate. - * - * Arguments: - * 0: The Unit - * 1: Is Healed - * - * Return Value: - * Nothing - * - * Example: - * [player, false] call kat_circulation_fnc_updateInternalBleeding - * - * Public: No - */ - -params ["_unit", ["_heal", false]]; - -private _cardiacOutput = [_unit] call ACEFUNC(medical_status,getCardiacOutput); -private _alphaAction = GET_VASOCONSTRICTION(_unit); -private _internalBleeding = 0; - -if !(_heal) then { - if (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false]) then { - _internalBleeding = _internalBleeding + EGVAR(breathing,HPTXBleedAmount); - }; -}; - -_unit setVariable [VAR_INTERNAL_BLEEDING, _internalBleeding * (_cardiacOutput max 0.05) * ACEGVAR(medical,bleedingCoefficient) * _alphaAction, true]; diff --git a/addons/circulation/functions/fnc_updateWoundBloodLoss.sqf b/addons/circulation/functions/fnc_updateWoundBloodLoss.sqf new file mode 100644 index 000000000..dfc0df3d4 --- /dev/null +++ b/addons/circulation/functions/fnc_updateWoundBloodLoss.sqf @@ -0,0 +1,99 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, modified by Cplhardcore + * Update total wound bleeding based on open wounds and tourniquets + * Wound bleeding = percentage of cardiac output lost + * + * Arguments: + * 0: The Unit + * + * Return Value: + * Nothing + * + * Example: + * [player] call kat_circulation_fnc_updateWoundBloodLoss + * + * Public: No + */ + +params ["_unit"]; + +TRACE_1("updateWoundBloodLoss",_unit); +private _tourniquets = GET_KAT_TOURNIQUETS(_unit); +private _damage = GET_BODYPART_DAMAGE(_unit); +private _occlusionMap = [ + [4, [4, 5]], + [5, [5]], + [6, [6, 7]], + [7, [7]], + [8, [8, 9, 3]], + [9, [9, 3]], + [10, [10, 11, 3]], + [11, [11, 3]] +]; + +private _bodyPartBleeding = [0,0,0,0,0,0,0,0,0,0,0,0]; +private _bodyExternalPartBleeding = [0,0,0,0,0,0,0,0,0,0,0,0]; + +{ + private _partIndex = ALL_BODY_PARTS find _x; + private _appliedPressure = GET_APPLIEDPRESSURE(_unit); + private _pressureApplied = _appliedPressure select _partIndex; + + private _idx = _occlusionMap findIf { _x#0 == _partIndex }; + private _result = if (_idx != -1) then { _occlusionMap select _idx select 1 } else { [] }; + private _isOccluded = { _tourniquets select _x >= 1 } count _result > 0; + private _occlusionLevel = if (_result isNotEqualTo []) then { selectMax (_result apply { _tourniquets select _x }) } else { 0 }; + + private _damageAmount = [_unit,_idx] call EFUNC(hitpoints,damageAmount); + private _damageFixed = linearConversion [0, 40, _damageAmount, 0, 1, true]; + private _isPressureApplied = _pressureApplied > 0; + if (!_isOccluded) then { + private _partBleeding = 0; + { + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + private _classIndex = _woundClassID / 10; + private _category = _woundClassID % 10; + private _suffix = ["Minor", "Medium", "Large"] select _category; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + TRACE_5("updateWoundBloodLoss1",_isPressureApplied,_occlusionLevel,_amountOf,_bleeding,_pressureApplied); + if (_isPressureApplied || (_occlusionLevel > 0)) then { + switch (true) do { + case (_suffix == "Minor"): { + _partBleeding = _partBleeding + ((_amountOf * _bleeding) * (1 - (_pressureApplied * 1.5)) * (1 - _occlusionLevel) * (1 - _damageFixed)); + }; + case (_suffix == "Medium"): { + _partBleeding = _partBleeding + ((_amountOf * _bleeding) * (1 - _pressureApplied) * (1 - _occlusionLevel) * (1 - _damageFixed)); + }; + case (_suffix == "Large"): { + _partBleeding = _partBleeding + ((_amountOf * _bleeding) * (1 - (_pressureApplied * 0.7)) * (1 - _occlusionLevel) * (1 - _damageFixed)); + }; + default { + _partBleeding = _partBleeding + ((_amountOf * _bleeding) * (1 - _pressureApplied) * (1 - _occlusionLevel) * (1 - _damageFixed)); + }; + }; + } else { + _partBleeding = _partBleeding + (_amountOf * _bleeding); + }; + if !(_className in ["InternalBleeding"]) then { + _bodyExternalPartBleeding set [_partIndex, _partBleeding]; + TRACE_3("updateWoundBloodLossExternal",_partBleeding,_bodyExternalPartBleeding,_partIndex); + }; + } forEach _y; + _bodyPartBleeding set [_partIndex, _partBleeding]; + TRACE_3("updateWoundBloodLoss",_partBleeding,_bodyPartBleeding,_partIndex); + _unit setVariable [VAR_BODY_BLEED_RATE, _bodyExternalPartBleeding, true]; + }; +} forEach GET_OPEN_WOUNDS(_unit); +if (selectMax _bodyPartBleeding == 0) exitWith { + TRACE_1("updateWoundBloodLoss-none",_unit); + _unit setVariable [VAR_BODY_BLEED_RATE, DEFAULT_BODY_BLEED_RATE_VALUES, true]; + _unit setVariable [VAR_WOUND_BLEEDING, 0, true]; +}; + +_bodyPartBleeding params ["_headBleeding","_neckBleeding", "_chestBleeding", "_bodyBleeding", "_leftArmBleeding","_leftUpperArmBleeding", "_rightArmBleeding","_rightUpperArmBleeding", "_leftLegBleeding","_leftUpperLegBleeding", "_rightLegBleeding", "_rightUpperLegBleeding"]; +private _bodyBleedingRate = ((_headBleeding min 0.9) + (_neckBleeding min 0.9) + (_chestBleeding min 1.0) + (_bodyBleeding min 1.0)) min 1.0; +private _limbBleedingRate = ((_leftArmBleeding min 0.3) + (_leftUpperArmBleeding min 0.3) + (_rightArmBleeding min 0.3) + (_rightUpperArmBleeding min 0.3) + (_leftLegBleeding min 0.5) + (_leftUpperLegBleeding min 0.5) + (_rightLegBleeding min 0.5) + (_rightUpperLegBleeding min 0.5)) min 1.0; + +TRACE_3("updateWoundBloodLoss-bleeding",_unit,_bodyBleedingRate,_limbBleedingRate); +_unit setVariable [VAR_WOUND_BLEEDING, _bodyBleedingRate + _limbBleedingRate, true]; diff --git a/addons/circulation/initSettings.inc.sqf b/addons/circulation/initSettings.inc.sqf index 8cbda4a21..460db189d 100644 --- a/addons/circulation/initSettings.inc.sqf +++ b/addons/circulation/initSettings.inc.sqf @@ -84,6 +84,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(hardcoreAED), + "CHECKBOX", + [LLSTRING(SETTING_hardcoreAED), LLSTRING(hardcoreAED_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AED)], + [true], + true +] call CBA_fnc_addSetting; + //Max Succes chance for AED-X [ @@ -155,6 +164,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(medLvl_Lucas), + "LIST", + [LLSTRING(ALLOW_Lucas),LLSTRING(TRAINING_LEVEL_Lucas)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AED)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + // Sets time required to attach AED-X monitor [ QGVAR(AEDX_VitalsMonitor_AttachTime), @@ -350,6 +368,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(refractoryChance), + "SLIDER", + [LLSTRING(SETTING_refractoryChance),LLSTRING(SETTING_refractoryChance_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AdvRhythms)], + [1, 100, 20, 0], + true +] call CBA_fnc_addSetting; + // Sets if cardiac arrest rhythms can deteriorate [ QGVAR(AdvRhythm_canDeteriorate), @@ -401,6 +428,15 @@ ] call CBA_fnc_addSetting; // Sets chance for Pulseless Electrical Activity / Asystole +[ + QGVAR(AdvRhythm_PEAEnabled), + "CHECKBOX", + LLSTRING(SETTING_AdvRhythm_PEAEnabled), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AdvRhythms)], + [false], + true +] call CBA_fnc_addSetting; + [ QGVAR(AdvRhythm_PEAChance), "SLIDER", diff --git a/addons/circulation/sounds/lucas.ogg b/addons/circulation/sounds/lucas.ogg new file mode 100644 index 000000000..b39254758 Binary files /dev/null and b/addons/circulation/sounds/lucas.ogg differ diff --git a/addons/circulation/stringtable.xml b/addons/circulation/stringtable.xml index 83e4b0e87..a1f9dfb58 100644 --- a/addons/circulation/stringtable.xml +++ b/addons/circulation/stringtable.xml @@ -2723,7 +2723,7 @@ 250ml 키트의 채혈 시간 250mlキットの採血時間 250 毫升套件的绘制时间 - 250 mL的抽取时间   + 250 mL的抽取时间 250ml Kit için çizim süresi Aika, joka kuluu 250 ml:n verta ottamiseen Onttrekkingstijd voor 250ml set @@ -2741,7 +2741,7 @@ 500ml 키트의 채혈 시간 500mlキットの採血時間 500 毫升套件的抽血時間 - 500 mL的抽取时间   + 500 mL的抽取时间 500ml Kit için çizim süresi Aika, joka kuluu 500 ml:n verta ottamiseen Onttrekkingstijd voor 500ml set @@ -3471,18 +3471,7 @@ AED-X: HR %1 BD: %2/%3 SpO2: %4 - AED-X: HR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 Breaths/min: %6 - AED-X: SF: %1 TK: %2/%3 SpO2: %4 ETCo2: %5 Dechů/min: %6 - AED-X: HR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 Respirations/min: %6 - DEA-X: RC: %1 PS: %2/%3 SpO2: %4 ETCo2: %5 Respiraciones/min: %6 - DAE-X: FC: %1 PS: %2/%3 SpO2: %4 ETCo2: %5 Respiri/min: %6 - DEA-X: FC: %1 PA: %2/%3 SpO2: %4 ETCo2: %5 Respirações/min: %6 - AED-X: ЧСС: %1 АД: %2/%3 SpO2: %4 ETCo2: %5 Вдохи/мин: %6 - AED-X: HR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 Br/min: %6 - AED-X: 心拍: %1 血圧: %2/%3 SpO2: %4 ETCo2: %5 呼吸数/分: %6 - AED-X:心率:%1 血壓:%2/%3 SpO2:%4 ETCo2:%5 呼吸/分:%6 - AED-X: 心率(HR): %1 血压(BP):%2/%3血氧饱和度(SpO2):%4呼气末二氧化碳浓度(ETCo2):%5呼吸/分钟:%6 - AED-X: HR %1 BD: %2/%3 SpO2: %4 ETCo2: %5 Ademhalingen/min: %6 + AED-X: HR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 RR: %6 AED-X: PR: %1 BP: %2/%3 SpO2: %4 @@ -3501,18 +3490,7 @@ AED-X: PR %1 BD: %2/%3 SpO2: %4 - AED-X: PR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 Breaths/min: %6 - AED-X: PF: %1 TK: %2/%3 SpO2: %4 ETCo2: %5 Dechů/min: %6 - AED-X: PR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 Respirations/min: %6 - DEA-X: RC: %1 PS: %2/%3 SpO2: %4 ETCo2: %5 Respiraciones/min: %6 - DAE-X: FC: %1 PS: %2/%3 SpO2: %4 ETCo2: %5 Respiri/min: %6 - DEA-X: FP: %1 PA: %2/%3 SpO2: %4 ETCo2: %5 Respirações/min: %6 - AED-X: ЧСС: %1 АД: %2/%3 SpO2: %4 ETCo2: %5 Вдохи/мин: %6 - AED-X: PR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 Br/min: %6 - AED-X: 脈拍: %1 血圧: %2/%3 SpO2: %4 ETCo2: %5 呼吸数/分: %6 - AED-X:脈搏:%1 血壓:%2/%3 SpO2:%4 ETCo2:%5 呼吸/分:%6 - AED-X: 脉搏(PR): %1 血压(BP):%2/%3血氧饱和度(SpO2):%4呼气末二氧化碳浓度(ETCo2):%5呼吸/分钟:%6 - AED-X: PR %1 BD: %2/%3 SpO2: %4 ETCo2: %5 Ademhalingen/min: %6 + AED-X: PR: %1 BP: %2/%3 SpO2: %4 ETCo2: %5 RR: %6 AED-X: HR: %1 BP: --/-- SpO2: --- @@ -3532,18 +3510,7 @@ AED-X: HR %1 BD: --/-- SpO2: --- - AED-X: HR: %1 BP: --/-- SpO2: --- ETCo2: %2 Breaths/min: %3 - AED-X: SF: %1 TK: --/-- SpO2: --- ETCo2: %2 Dechů/min: %3 - AED-X: HR: %1 BP: --/-- SpO2: --- ETCo2: %2 Respirations/min: %3 - DEA-X: RC: %1 PS: --/-- SpO2: --- ETCo2: %2 Respiraciones/min: %3 - DAE-X: FC: %1 PS: --/-- SpO2: --- ETCo2: %2 Respiri/min: %3 - DEA-X: FC: %1 PA: --/-- SpO2: --- ETCo2: %2 Respirações/min: %3 - AED-X: ЧСС: %1 АД: --/-- SpO2: --- ETCo2: %2 Вдохи/мин: %3 - AED-X: HR: %1 BP: -/- SpO2: - ETCo2: %2 Br/min: %3 - AED-X: 心拍: %1 血圧: --/-- SpO2: --- ETCo2: %2 呼吸数/分: %3 - AED-X:心率:%1 血壓:--/-- SpO2:--- ETCo2:%2 呼吸/分:%3 - AED-X: 心率(HR): %1 血压(BP):--/--血氧饱和度(SpO2):---呼气末二氧化碳浓度(ETCo2):%2呼吸/分钟:%3 - AED-X: HR %1 BD: --/-- SpO2: --- ETCo2: %2 Ademhalingen/min: %3 + AED-X: HR: %1 BP: --/-- SpO2: --- ETCo2: %2 RR: %3 Used to monitor vitals and resuscitate patients @@ -3750,5 +3717,440 @@ 聴診器による脈拍測定の所要時間 用聽診器測量心率所需時間 + + Morphine Infusion IV (250ml) + + + Morphine Infusion IV (100ml) + + + Morphine Infusion IV, for management of pain + + + A Infusion of Morphine and Saline introduced into the blood system through an IV. + + + Epinephrine Infusion IV (250ml) + + + Epinephrine Infusion IV (100ml) + + + Epinephrine Infusion IV, for management of blood pressure + + + A Infusion of Epinephrine and Saline introduced into the blood system through an IV. + + + Etomidate Infusion IV (250ml) + + + Etomidate Infusion IV (100ml) + + + Etomidate Infusion IV, for management of pain and sedation during surgery + + + A Infusion of Etomidate and Saline introduced into the blood system through an IV. + + + Transfuse Morphine Infusion (100ml) + + + Transfusing Morphine Infusion (100ml)... + + + Transfuse Epinephrine Infusion (100ml) + + + Transfusing Epinephrine Infusion (100ml)... + + + Transfuse Etomidate Infusion (100ml) + + + Transfusing Etomidate Infusion (100ml)... + + + Transfuse Morphine Infusion (100ml) + + + Transfusing Morphine Infusion (250ml)... + + + Transfuse Epinephrine Infusion (250ml) + + + Transfusing Epinephrine Infusion (250ml)... + + + Transfuse Etomidate Infusion (250ml) + + + Transfusing Etomidate Infusion (250ml)... + + + 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. + + + Hypertonic Saline IV (23.4%) (500ml) + + + Hypertonic Saline IV (23.4%) (250ml) + + + Hypertonic Saline IV (23.4%) (100ml) + + + Hypertonic Saline, for reducing a patients ICP + + + 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. + + + Doxapram Infusion IV (250ml) + + + Doxapram Infusion IV (100ml) + + + Doxapram Infusion IV, for management of respiratory issues + + + A Infusion of Doxapram and Saline introduced into the blood system through an IV. + + + Transfuse Doxapram Infusion (250ml) + + + Transfusing Doxapram Infusion (250ml)... + + + Transfuse Doxapram Infusion (100ml) + + + Transfusing Doxapram Infusion (100ml)... + + + Nitroglycerin Infusion IV (250ml) + + + Nitroglycerin Infusion IV (100ml) + + + Nitroglycerin Infusion IV, for management of blood pressure + + + A Infusion of Nitroglycerin and Saline introduced into the blood system through an IV. + + + Transfuse Nitroglycerin Infusion (250ml) + + + Transfusing Nitroglycerin Infusion (250ml)... + + + Transfuse Nitroglycerin Infusion (100ml) + + + Transfusing Nitroglycerin Infusion (100ml)... + + + Norepinephrine Infusion IV (250ml) + + + Norepinephrine Infusion IV (100ml) + + + Norepinephrine Infusion IV, for management of blood pressure + + + A Infusion of Norepinephrine and Saline introduced into the blood system through an IV. + + + Transfuse Norepinephrine Infusion (250ml) + + + Transfusing Norepinephrine Infusion (250ml)... + + + Transfuse Norepinephrine Infusion (100ml) + + + Transfusing Norepinephrine Infusion (100ml)t... + + + Allow LUCAS + + + Medical Level to attach or detach LUCAS + + + LUCAS + + + Turn On LUCAS + + + Turning On LUCAS + + + Turn Off LUCAS + + + Turning Off LUCAS + + + Attach LUCAS + + + Attaching LUCAS + + + Detach LUCAS + + + Detaching LUCAS + + + LUCAS Active + + + LUCAS Inactive + + + Saline IV (100ml) + + + Give Saline IV (100ml) + + + %1 CPR (%2) + + + Enable Hardcore AED-X + + + Hides the vitals monitor from the medical menu, only allowing the manual monitor + + + You find a Slightly Distended Jugular vein + + + You find a Very Distended Jugular vein + + + You find a normal Jugular vein + + + You find a normal Trachea + + + You find Significant Tracheal Deviation + + + Slightly Distended Jugular vein + + + Very Distended Jugular vein + + + Normal Jugular Vein + + + %1 finds a normal Trachea + + + %1 finds Significant Tracheal Deviation + + + Check Neck + + + Checking Neck + + + %1 finds %2 + + + Check Capillary Refill + + + Checking Capillary Refill + + + You find a Capillary Refill time of ~1.5 seconds + + + You find no Capillary Refill + + + You find a Capillary Refill time of ~3 seconds + + + You find a Capillary Refill time of ~5 seconds + + + a Capillary Refill time of ~1.5 seconds + + + No Capillary Refill + + + a Capillary Refill time of ~3 seconds + + + a Capillary Refill time of ~5 seconds + + + Hextend IV (1000ml) + + + Hextend IV (250ml) + + + Hextend IV (500ml) + + + Hextend IV, for restoring a patients fluids + + + A medical volume-replenishing agent introduced into the blood system through an IV infusion. + + + Refractory Cardiac Arrest Chance + + + Chance for shockable cardiac arrest to be refractory, causing shocks to be much less effective + + + Platelets (100ml) + + + Give Platelets (100ml) + + + Concentrated Platelets IV, for restoring a patients Platelets + + + Give FBTK Blood IV (250ml) BT: A+ + + + Give FBTK Blood IV (250ml) BT: AB+ + + + Give FBTK Blood IV (250ml) BT: AB- + + + Give FBTK Blood IV (250ml) BT: A- + + + Give FBTK Blood IV (250ml) BT: B+ + + + Give FBTK Blood IV (250ml) BT: B- + + + Give FBTK Blood IV (250ml) BT: 0+ + + + Give FBTK Blood IV (250ml) BT: 0- + + + Give FBTK Blood IV (500ml) BT: A+ + + + Give FBTK Blood IV (500ml) BT: AB+ + + + Give FBTK Blood IV (500ml) BT: AB- + + + Give FBTK Blood IV (500ml) BT: A- + + + Give FBTK Blood IV (500ml) BT: B+ + + + Give FBTK Blood IV (500ml) BT: B- + + + Give FBTK Blood IV (500ml) BT: 0+ + + + Give FBTK Blood IV (500ml) BT: 0- + + + FBTK Blood IV (250ml) BT: AB+ + + + FBTK Blood IV (250ml) BT: AB- + + + FBTK Blood IV (500ml) BT: AB+ + + + FBTK Blood IV (500ml) BT: AB- + + + FBTK Blood IV (250ml) BT: A+ + + + FBTK Blood IV (250ml) BT: A- + + + FBTK Blood IV (500ml) BT: A+ + + + FBTK Blood IV (500ml) BT: A- + + + FBTK Blood IV (250ml) BT: B+ + + + FBTK Blood IV (250ml) BT: B- + + + FBTK Blood IV (500ml) BT: B+ + + + FBTK Blood IV (500ml) BT: B- + + + FBTK Blood IV (250ml) BT: 0+ + + + FBTK Blood IV (250ml) BT: 0- + + + FBTK Blood IV (500ml) BT: 0+ + + + FBTK Blood IV (500ml) BT: 0- + diff --git a/addons/conversion/$PBOPREFIX$ b/addons/conversion/$PBOPREFIX$ new file mode 100644 index 000000000..81edac690 --- /dev/null +++ b/addons/conversion/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\conversion \ No newline at end of file diff --git a/addons/conversion/ACE_Medical_Treatment_Actions.hpp b/addons/conversion/ACE_Medical_Treatment_Actions.hpp new file mode 100644 index 000000000..c7d524f5d --- /dev/null +++ b/addons/conversion/ACE_Medical_Treatment_Actions.hpp @@ -0,0 +1,41 @@ +class ACE_Medical_Treatment_Actions { + class CheckPulse; + class ConvertPatient: CheckPulse { + displayName = CSTRING(convertPatient); + displayNameProgress = CSTRING(converting); + category = "examine"; + condition = QFUNC(manualConversionCondition); + medicRequired = QGVAR(manualConversionLevel); + treatmentLocations = QGVAR(manualConversionLocation); + treatmentTime = QGVAR(manualConversionTime); + allowedSelections[] = {"All"}; + allowSelfTreatment = 0; + callbackSuccess = QFUNC(manualConversion); + }; + class ConvertPatientTickets: CheckPulse { + displayName = CSTRING(TicketConversion); + displayNameProgress = CSTRING(converting); + category = "examine"; + condition = QFUNC(ticketConversionCondition); + medicRequired = QGVAR(manualConversionLevel); + treatmentLocations = 2; + treatmentTime = QGVAR(manualConversionTime); + allowedSelections[] = {"All"}; + allowSelfTreatment = 0; + items[] = {}; + callbackSuccess = QFUNC(ticketConversion); + }; + class ConvertPatientFacility: CheckPulse { + displayName = CSTRING(TicketConversion); + displayNameProgress = CSTRING(converting); + category = "examine"; + condition = QFUNC(facilityConversionCondition); + medicRequired = QGVAR(manualConversionLevel); + treatmentLocations = 2; + treatmentTime = QGVAR(manualConversionTime); + allowedSelections[] = {"All"}; + allowSelfTreatment = 0; + items[] = {}; + callbackSuccess = QFUNC(facilityConversion); + }; +}; diff --git a/addons/conversion/CfgEventHandlers.hpp b/addons/conversion/CfgEventHandlers.hpp new file mode 100644 index 000000000..4551ce282 --- /dev/null +++ b/addons/conversion/CfgEventHandlers.hpp @@ -0,0 +1,20 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + disableModuload = "true"; + }; +}; + +class Extended_Init_EventHandlers { + class CAManBase { + class ADDON { + init = QUOTE([ARR_2((_this select 0),false)] call FUNC(init)); + }; + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/conversion/CfgFunctions.hpp b/addons/conversion/CfgFunctions.hpp new file mode 100644 index 000000000..ee54ec98c --- /dev/null +++ b/addons/conversion/CfgFunctions.hpp @@ -0,0 +1,10 @@ +class CfgFunctions { + class overwrite_ace_medical_status { + tag = "ace_medical_status"; + class ace_medical_status { + class setDead { + file = QPATHTOF(functions\fnc_setDead.sqf); + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/conversion/CfgVehicles.hpp b/addons/conversion/CfgVehicles.hpp new file mode 100644 index 000000000..3e8cd43ea --- /dev/null +++ b/addons/conversion/CfgVehicles.hpp @@ -0,0 +1,15 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_Actions { + class ACE_MainActions { + class KAT_TicketConversion { + displayName = CSTRING(TicketConversion); + condition = QUOTE([ARR_2(objNull,_target)] call FUNC(ticketConversionCondition)); + statement = QUOTE([ARR_2(objNull,_target)] call FUNC(ticketConversion)); + icon = QACEPATHTOF(medical_gui,ui\cross.paa); + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/conversion/XEH_PREP.hpp b/addons/conversion/XEH_PREP.hpp new file mode 100644 index 000000000..5587ecda7 --- /dev/null +++ b/addons/conversion/XEH_PREP.hpp @@ -0,0 +1,16 @@ +PREP(KATConditionExecutionDeath); +PREP(KATConditionSecondChance); +PREP(conversionCheck); +PREP(conversionCondition); +PREP(facilityConversion); +PREP(facilityConversionCondition); +PREP(fullHealLocal); +PREP(getList); +PREP(gui_updateInjuryListPart); +PREP(handleRespawn); +PREP(init); +PREP(manualConversion); +PREP(manualConversionCondition); +PREP(setDead); +PREP(ticketConversion); +PREP(ticketConversionCondition); \ No newline at end of file diff --git a/addons/conversion/XEH_postInit.sqf b/addons/conversion/XEH_postInit.sqf new file mode 100644 index 000000000..6855b121b --- /dev/null +++ b/addons/conversion/XEH_postInit.sqf @@ -0,0 +1,52 @@ +#include "script_component.hpp" + +[QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; + +[QGVAR(convertCasualty), { + private _type = typeOf player; + private _group = createGroup [(side group player), true]; + private _previousUnit = player; + private _setName = name _previousUnit; + private _loadout = [player] call CBA_fnc_getLoadout; + private _unit = _group createUnit [_type, [0,0,0], [], 0, "NONE"]; + [player, _loadout] call CBA_fnc_setLoadout; + + _previousUnit setVariable [QEGVAR(vitals,simpleMedical), false, true]; + _previousUnit setVariable [QGVAR(currentlyConverted), true, true]; + _previousUnit setVariable [QACEGVAR(medical_statemachine,AIUnconsciousness), true, true]; + + selectPlayer _unit; + + [QGVAR(unitTransfer), [_previousUnit]] call CBA_fnc_serverEvent; + + _previousUnit setName _setName; + + forceRespawn player; + deleteVehicle _unit; +}] call CBA_fnc_addEventHandler; + +[QGVAR(unitTransfer), { + params ["_previousUnit"]; + private _group2 = createGroup [(side group _previousUnit), true]; + [_previousUnit] join _group2; + _group2 setGroupOwner 2; + [_previousUnit, true] call ACEFUNC(medical,setUnconscious); +}] call CBA_fnc_addEventHandler; + +[QGVAR(respawnTimer), { + params ["_time", "_unit"]; + private _currentRespawnTime = playerRespawnTime; + setPlayerRespawnTime _time; + _currentUnit = _unit; + + [{ + params ["_currentUnit"]; + + (lifeState _currentUnit isEqualTo "HEALTHY") + }, { + params [_currentRespawnTime]; + setPlayerRespawnTime _currentRespawnTime; + }, [_currentUnit, _currentRespawnTime], 360, {}] call CBA_fnc_waitUntilAndExecute; +}] call CBA_fnc_addEventHandler; diff --git a/addons/conversion/XEH_preInit.sqf b/addons/conversion/XEH_preInit.sqf new file mode 100644 index 000000000..f29e83b4b --- /dev/null +++ b/addons/conversion/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#define CBA_SETTINGS_CAT LSTRING(cba_name) +#include "initSettings.inc.sqf" + +ADDON = true; \ No newline at end of file diff --git a/addons/conversion/config.cpp b/addons/conversion/config.cpp new file mode 100644 index 000000000..ebb8c0e54 --- /dev/null +++ b/addons/conversion/config.cpp @@ -0,0 +1,35 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; + units[] = {}; + weapons[] = {}; + magazines[] = {}; + requiredAddons[] = { + "ace_medical", + "ace_medical_ai", + "ace_medical_blood", + "ace_medical_damage", + "ace_medical_engine", + "ace_medical_feedback", + "ace_medical_gui", + "ace_medical_statemachine", + "ace_medical_status", + "ace_medical_treatment", + "ace_medical_vitals", + "ace_dogtags", + "cba_settings" + }; + author = "Mazinski"; + authors[] = {"Mazinski"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgFunctions.hpp" +#include "CfgVehicles.hpp" +#include "ACE_Medical_Treatment_Actions.hpp" diff --git a/addons/misc/functions/fnc_conditionExecutionDeath.sqf b/addons/conversion/functions/fnc_KATConditionExecutionDeath.sqf similarity index 53% rename from addons/misc/functions/fnc_conditionExecutionDeath.sqf rename to addons/conversion/functions/fnc_KATConditionExecutionDeath.sqf index 9403b1776..6a019ab5f 100644 --- a/addons/misc/functions/fnc_conditionExecutionDeath.sqf +++ b/addons/conversion/functions/fnc_KATConditionExecutionDeath.sqf @@ -1,8 +1,8 @@ #include "..\script_component.hpp" /* - * Author: BaerMitUmlaut - * Modified: Blue - * Condition for an execution caused death (fatal injury received in cardiac arrest). + * Author: mharis001 + * Edited: Blue, Mazinski.H + * Condition for going into cardiac arrest upon receiving a fatal injury. * * Arguments: * 0: Unit @@ -11,16 +11,16 @@ * None * * Example: - * [player] call ace_medical_statemachine_fnc_conditionExecutionDeath + * [player] call kat_conversion_fnc_conditionSecondChance * * Public: No */ params ["_unit"]; -(if (isPlayer _unit) then { +(if (isPlayer _unit || (GET_CONVERT_STATUS(_unit))) then { ACEGVAR(medical_statemachine,fatalInjuriesPlayer) != FATAL_INJURIES_NEVER } else { - (ACEGVAR(medical_statemachine,fatalInjuriesAI) != FATAL_INJURIES_NEVER) && {!(_unit getVariable [QGVAR(PreventInstantAIDeath), false])} + (ACEGVAR(medical_statemachine,fatalInjuriesAI) != FATAL_INJURIES_NEVER) && {!(_unit getVariable [QEGVAR(misc,PreventInstantAIDeath), false])} }) -&& {!(_unit getVariable [QACEGVAR(medical,deathBlocked), false])} +&& {!(_unit getVariable [QACEGVAR(medical,deathBlocked), false])} \ No newline at end of file diff --git a/addons/misc/functions/fnc_conditionSecondChance.sqf b/addons/conversion/functions/fnc_KATConditionSecondChance.sqf similarity index 64% rename from addons/misc/functions/fnc_conditionSecondChance.sqf rename to addons/conversion/functions/fnc_KATConditionSecondChance.sqf index 0f3e42ef6..bedc45d3e 100644 --- a/addons/misc/functions/fnc_conditionSecondChance.sqf +++ b/addons/conversion/functions/fnc_KATConditionSecondChance.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: mharis001 - * Modified: Blue + * Edited: Blue, Mazinski.H * Condition for going into cardiac arrest upon receiving a fatal injury. * * Arguments: @@ -11,15 +11,15 @@ * None * * Example: - * [player] call ace_medical_statemachine_fnc_conditionSecondChance + * [player] call kat_conversion_fnc_conditionSecondChance * * Public: No */ params ["_unit"]; -if (isPlayer _unit) then { +if (isPlayer _unit || (GET_CONVERT_STATUS(_unit))) then { ACEGVAR(medical_statemachine,fatalInjuriesPlayer) != FATAL_INJURIES_ALWAYS } else { - ACEGVAR(medical_statemachine,fatalInjuriesAI) != FATAL_INJURIES_ALWAYS || {_unit getVariable [QGVAR(PreventInstantAIDeath), false]} -}; + ACEGVAR(medical_statemachine,fatalInjuriesAI) != FATAL_INJURIES_ALWAYS || {_unit getVariable [QEGVAR(misc,PreventInstantAIDeath), false]} +} \ No newline at end of file diff --git a/addons/conversion/functions/fnc_conversionCheck.sqf b/addons/conversion/functions/fnc_conversionCheck.sqf new file mode 100644 index 000000000..5ed0bd6e4 --- /dev/null +++ b/addons/conversion/functions/fnc_conversionCheck.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Condition for automatic conversion + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_conversionCheck + * + * Public: No + */ + +params ["_unit"]; +_result = false; +if ((!(ACEGVAR(medical_statemachine,AIUnconsciousness))) && (!isPlayer _unit)) then { + _result = !((GET_CONVERT_STATUS(_unit)) || (_unit getVariable [QACEGVAR(medical_statemachine,AIUnconsciousness), false])); +}; +_result \ No newline at end of file diff --git a/addons/conversion/functions/fnc_conversionCondition.sqf b/addons/conversion/functions/fnc_conversionCondition.sqf new file mode 100644 index 000000000..3a37d7bf5 --- /dev/null +++ b/addons/conversion/functions/fnc_conversionCondition.sqf @@ -0,0 +1,62 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Check if a unit is in a stable state for resource conversion + * + * Arguments: + * 0: The patient + * + * Return Value: + * Has no critical health conditions + * + * Example: + * [player] call kat_conversion_conversionCondition + * + * Public: No + */ + +params ["_unit"]; + +private _bloodVolume = GET_BLOOD_VOLUME_LITERS(_unit); +if ((_bloodVolume < ACEGVAR(medical,const_stableVitalsBloodThreshold)) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +if (IN_CRDC_ARRST(_unit) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _bloodPressure = GET_BLOOD_PRESSURE(_unit); +_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; +private _map = GET_MAP(_unit); +if ((_map < 70 || _map > 110) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _heartRate = GET_HEART_RATE(_unit); +private _defaultHeartRate = _unit getVariable [QEGVAR(circulation,defaultHeartRate), 80]; +if ((_heartRate < (_defaultHeartRate - 25) || _heartRate > (_defaultHeartRate + 25)) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _o2 = GET_KAT_SPO2(_unit); +if ((_o2 < EGVAR(breathing,Stable_spo2)) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _ptx = _unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; +if (((selectMax _ptx) > 0) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _hemopneumothorax = _unit getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]]; +private _tensionpneumothorax = _unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]]; +if (((_tensionpneumothorax select 0) || (_tensionpneumothorax select 1) || ((_hemopneumothorax select 0) > 0.3) || ((_hemopneumothorax select 1) > 0.3)) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _fractures = _unit getVariable [QEGVAR(surgery,fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; +if ((({_x == 0} count _fractures) != 6) && (GVAR(conversionRequirements) > 1)) exitWith { false }; + +private _unitTemperature = _unit getVariable [QGVAR(unitTemperature), 37]; +if ((_unitTemperature < 34) && (GVAR(conversionRequirements) > 0)) exitWith { false }; + +private _jointInjuries = GET_JOINTS(_unit); +private _hasInjury = false; +{ + { + if (_x > 0) exitWith { _hasInjury = true }; + } forEach _x; + if (_hasInjury) exitWith {}; +} forEach _jointInjuries; +if ((_hasInjury) && (GVAR(conversionRequirements) > 1)) exitWith { false }; + +if ((_unit getVariable [QEGVAR(surgery,reboa), false]) && (GVAR(conversionRequirements) > 1)) exitWith { false }; + +true \ No newline at end of file diff --git a/addons/conversion/functions/fnc_facilityConversion.sqf b/addons/conversion/functions/fnc_facilityConversion.sqf new file mode 100644 index 000000000..88f2a133f --- /dev/null +++ b/addons/conversion/functions/fnc_facilityConversion.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Converts patient to respawn tickets + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_ticketConversion + * + * Public: No + */ + +params ["_medic", "_patient"]; + +if (GVAR(enableSpectatorRespawn)) then { + if (lifeState (_patient getVariable [QGVAR(associatedPlayer), objNull]) isEqualTo "DEAD-RESPAWN") then { + [QGVAR(respawnTimer), [0, _patient], _patient] call CBA_fnc_targetEvent; + }; +}; + +_patient setDamage 1; +deleteVehicle _patient; \ No newline at end of file diff --git a/addons/conversion/functions/fnc_facilityConversionCondition.sqf b/addons/conversion/functions/fnc_facilityConversionCondition.sqf new file mode 100644 index 000000000..537760a81 --- /dev/null +++ b/addons/conversion/functions/fnc_facilityConversionCondition.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Checks if patient can be converted into respawn tickets + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_ticketConversionCondition + * + * Public: No + */ + +params ["_medic", "_patient"]; +if (GVAR(enableTicketConversion)) exitWith { false }; +if !(_patient getVariable [QGVAR(currentlyConverted), false]) exitWith { false }; +if !(_patient call ACEFUNC(medical_treatment,isInMedicalFacility)) exitWith { false }; +if !(_patient call FUNC(conversionCondition)) exitWith { false }; +true \ No newline at end of file diff --git a/addons/conversion/functions/fnc_fullHealLocal.sqf b/addons/conversion/functions/fnc_fullHealLocal.sqf new file mode 100644 index 000000000..60f0ca71d --- /dev/null +++ b/addons/conversion/functions/fnc_fullHealLocal.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: MiszczuZPolski + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_fullHealLocal + * + * Public: No + */ + +params ["_patient"]; + +if (hasInterface && GVAR(enable)) then { + _patient setVariable [QGVAR(convert), true, true]; +}; + +_patient setVariable [QGVAR(currentlyConverted), false, true]; +_patient setVariable [QGVAR(associatedPlayer), player, true]; \ No newline at end of file diff --git a/addons/conversion/functions/fnc_getList.sqf b/addons/conversion/functions/fnc_getList.sqf new file mode 100644 index 000000000..06d3f793a --- /dev/null +++ b/addons/conversion/functions/fnc_getList.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* +* Author: DiGii +* This cant be called manualy! +* +* +* Arguments: +* 0: classname +* 1: configname (CfgGlasses) +* +* Return Value: +* List +* +* Example: +* [backpack player, "Cfgweapons"] call kat_chemical_fnc_getlist; +* +* Public: No +*/ +params ["_str", ["_cfg", "", [""]]]; + +private _clipstring = _str splitString ", ""[]()'"; +private _array = []; +{ + if (isClass(configFile >> _cfg >> _x) || _cfg isEqualTo "") then { + _array pushBackUnique _x + }; + nil +} count _clipstring; + +_array \ No newline at end of file diff --git a/addons/chemical/functions/fnc_gui_updateInjuryListGeneral.sqf b/addons/conversion/functions/fnc_gui_updateInjuryListPart.sqf similarity index 50% rename from addons/chemical/functions/fnc_gui_updateInjuryListGeneral.sqf rename to addons/conversion/functions/fnc_gui_updateInjuryListPart.sqf index aef0ab087..9711ea24d 100644 --- a/addons/chemical/functions/fnc_gui_updateInjuryListGeneral.sqf +++ b/addons/conversion/functions/fnc_gui_updateInjuryListPart.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: AtrixZockt + * Author: MiszczuZPolski * Updates injury list for given body part for the target. * * Arguments: @@ -13,15 +13,13 @@ * None * * Example: - * [_ctrlInjuries, _target, 0] call kat_chemical_fnc_gui_updateInjuryListGeneral + * [_ctrlInjuries, _target, 0] call kat_conversion_fnc_gui_updateInjuryListPart * * Public: No */ params ["_ctrl", "_target", "_selectionN", "_entries"]; -private _poisontype = _target getVariable [QGVAR(poisonType),""]; - -if (_target getVariable [QGVAR(airPoisoning),false] && (missionNamespace getVariable [QGVAR(showPoisoning), true])) then{ - _entries pushBack [LLSTRING(Intoxication), [0.4,0,0.5,1]]; -}; +if (_target getVariable [QGVAR(currentlyConverted), false] && GVAR(enableConversionMessage)) then { + _entries pushBack [LLSTRING(ConversionText), [0.35, 0.72, 0.82, 1]]; +}; \ No newline at end of file diff --git a/addons/conversion/functions/fnc_handleRespawn.sqf b/addons/conversion/functions/fnc_handleRespawn.sqf new file mode 100644 index 000000000..6d9cea6bb --- /dev/null +++ b/addons/conversion/functions/fnc_handleRespawn.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: MiszczuZPolski + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_handleRespawn + * + * Public: No + */ + +params ["_patient"]; + +[_patient] call FUNC(fullHealLocal); \ No newline at end of file diff --git a/addons/conversion/functions/fnc_init.sqf b/addons/conversion/functions/fnc_init.sqf new file mode 100644 index 000000000..cc4d35273 --- /dev/null +++ b/addons/conversion/functions/fnc_init.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Initializes unit variables. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_init + * + * Public: No + */ + +params ["_patient"]; + +[_patient] call FUNC(fullHealLocal); \ No newline at end of file diff --git a/addons/conversion/functions/fnc_manualConversion.sqf b/addons/conversion/functions/fnc_manualConversion.sqf new file mode 100644 index 000000000..dff19e1c4 --- /dev/null +++ b/addons/conversion/functions/fnc_manualConversion.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Performs initial patient conversion + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_manualConversion + * + * Public: No + */ + + params ["_medic", "_patient"]; + +[QGVAR(convertCasualty), [_patient], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/conversion/functions/fnc_manualConversionCondition.sqf b/addons/conversion/functions/fnc_manualConversionCondition.sqf new file mode 100644 index 000000000..0b410c928 --- /dev/null +++ b/addons/conversion/functions/fnc_manualConversionCondition.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Checks if patient can be manually converted + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_manualConversionCondition + * + * Public: No + */ + +params ["_medic", "_patient"]; + +if !(IS_UNCONSCIOUS(_patient)) exitWith { false }; +if !(isPlayer _patient) exitWith { false }; +if !(GVAR(allowManualConversion)) exitWith { false }; +if (_patient getVariable [QGVAR(currentlyConverted), false]) exitWith { false }; +true diff --git a/addons/conversion/functions/fnc_setDead.sqf b/addons/conversion/functions/fnc_setDead.sqf new file mode 100644 index 000000000..45816ba4b --- /dev/null +++ b/addons/conversion/functions/fnc_setDead.sqf @@ -0,0 +1,58 @@ +#include "..\script_component.hpp" +/* + * Author: commy2 + * Edited: Mazinski + * Kills a local unit. + * + * Arguments: + * 0: The unit + * 1: Reason for death + * 2: Killer + * 3: Instigator + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit", ["_reason", "#setDead"], ["_source", objNull], ["_instigator", objNull]]; +TRACE_4("setDead",_unit,_reason,_source,_instigator); + +// If patient is marked for conversion, send them into arrest rather than killing them if the reason for dying is that they are AI +private _unitState = [_unit, ACEGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; + +if (GET_CONVERT_STATUS(_unit) && (_reason isEqualTo "CardiacArrest:DeathAI" || _reason isEqualTo "Unconscious:DeathAI")) exitWith { + [_unit, ACEGVAR(medical,STATE_MACHINE), _unitState, "CardiacArrest"] call CBA_statemachine_fnc_manualTransition; +}; + +// No heart rate or blood pressure to measure when dead +_unit setVariable [VAR_HEART_RATE, 0, true]; +_unit setVariable [VAR_BLOOD_PRESS, [0, 0], true]; + +// Clear uncon variable just to be safe +_unit setVariable [VAR_UNCON, nil, true]; + +_unit setVariable [QACEGVAR(medical,causeOfDeath), _reason, true]; + +// Send a local event before death +[QACEGVAR(medical,death), [_unit]] call CBA_fnc_localEvent; + +// Update the state machine if necessary (forced respawn, scripted death, etc) +if (_unitState isNotEqualTo "Dead") then { + [_unit, ACEGVAR(medical,STATE_MACHINE), _unitState, "Dead"] call CBA_statemachine_fnc_manualTransition; +}; + +// (#8803) Reenable damage if disabled to prevent having live units in dead state +// Keep this after death event for compatibility with third party hooks +if (!isDamageAllowed _unit) then { + WARNING_1("setDead executed on unit with damage blocked - %1",_this); + _unit allowDamage true; +}; + +// Kill the unit without changing visual apperance +private _prevDamage = _unit getHitPointDamage "HitHead"; + +_unit setHitPointDamage ["HitHead", 1, true, _source, _instigator]; + +_unit setHitPointDamage ["HitHead", _prevDamage, true, _source, _instigator]; \ No newline at end of file diff --git a/addons/conversion/functions/fnc_ticketConversion.sqf b/addons/conversion/functions/fnc_ticketConversion.sqf new file mode 100644 index 000000000..0c1394fe1 --- /dev/null +++ b/addons/conversion/functions/fnc_ticketConversion.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Converts patient to respawn tickets + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_ticketConversion + * + * Public: No + */ + +params ["_medic", "_patient"]; + +[(side group _patient), GVAR(ticketConversionGain)] call BIS_fnc_respawnTickets; + +if (GVAR(enableSpectatorRespawn)) then { + if (lifeState (_patient getVariable [QGVAR(associatedPlayer), objNull]) isEqualTo "DEAD-RESPAWN") then { + [QGVAR(respawnTimer), [0, _patient], _patient] call CBA_fnc_targetEvent; + }; +}; + +_patient setDamage 1; +deleteVehicle _patient; \ No newline at end of file diff --git a/addons/conversion/functions/fnc_ticketConversionCondition.sqf b/addons/conversion/functions/fnc_ticketConversionCondition.sqf new file mode 100644 index 000000000..904e93dbf --- /dev/null +++ b/addons/conversion/functions/fnc_ticketConversionCondition.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Checks if patient can be converted into respawn tickets + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_conversion_fnc_ticketConversionCondition + * + * Public: No + */ + +params ["_medic", "_patient"]; +if !(GVAR(enableTicketConversion)) exitWith { false }; +if !(_patient getVariable [QGVAR(currentlyConverted), false]) exitWith { false }; + +if !(_patient call ACEFUNC(medical_treatment,isInMedicalFacility)) exitWith { false }; +if !(_patient call FUNC(conversionCondition)) exitWith { false }; +true \ No newline at end of file diff --git a/addons/conversion/initSettings.inc.sqf b/addons/conversion/initSettings.inc.sqf new file mode 100644 index 000000000..897483dac --- /dev/null +++ b/addons/conversion/initSettings.inc.sqf @@ -0,0 +1,123 @@ + +[ + QGVAR(enable), + "CHECKBOX", + [LLSTRING(CONVERSION_ENABLE), LLSTRING(CONVERSION_ENABLE_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableConversionMessage), + "CHECKBOX", + [LLSTRING(CONVERSION_MESSAGE), LLSTRING(CONVERSION_MESSAGE_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableAutomaticConversion), + "CHECKBOX", + [LLSTRING(AutomaticCONVERSION), LLSTRING(AutomaticCONVERSION_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableTicketConversion), + "CHECKBOX", + [LLSTRING(CONVERSION_TICKET_CONVERSION), LLSTRING(CONVERSION_TICKET_CONVERSION_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(ticketConversionGain), + "SLIDER", + [LLSTRING(CONVERSION_TICKET_CONVERSION_GAIN), LLSTRING(CONVERSION_TICKET_CONVERSION_GAIN_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 10, 1, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableSpectatorRespawn), + "CHECKBOX", + [LLSTRING(CONVERSION_SPECTATOR_RESPAWN), LLSTRING(CONVERSION_SPECTATOR_RESPAWN_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(forceVehicleConversion), + "CHECKBOX", + [LLSTRING(CONVERSION_FORCE_VEHICLE), LLSTRING(CONVERSION_FORCE_VEHICLE_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(convertVehicles), + "EDITBOX", + [LLSTRING(CONVERSION_FORCE_VEHICLE_LIST), LLSTRING(CONVERSION_FORCE_VEHICLE_LIST_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + "'kat_stretcher'", + 1, + { + private _array = [_this, "CfgVehicles"] call FUNC(getList); + missionNamespace setVariable [QGVAR(convertVehicles), _array, true]; + }, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(conversionRequirements), + "LIST", + [LLSTRING(CONVERSION_REQUIREMENTS), LLSTRING(CONVERSION_REQUIREMENTS_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [[0, 1, 2], [LLSTRING(CONVERSION_REQUIREMENTS_0), LLSTRING(CONVERSION_REQUIREMENTS_1), LLSTRING(CONVERSION_REQUIREMENTS_2)], 1], + true +] call CBA_fnc_addSetting; + + +[ + QGVAR(allowManualConversion), + "CHECKBOX", + [LLSTRING(CONVERSION_MANUAL_CONVERSION), LLSTRING(CONVERSION_MANUAL_CONVERSION_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(manualConversionLevel), + "LIST", + [LLSTRING(CONVERSION_MANUAL_CONVERSION_LEVEL), LLSTRING(CONVERSION_MANUAL_CONVERSION_LEVEL_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(manualConversionLocation), + "LIST", + [LLSTRING(CONVERSION_MANUAL_CONVERSION_LOCATION), LLSTRING(CONVERSION_MANUAL_CONVERSION_LOCATION_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [[0,1,2,3],["STR_ACE_Common_Anywhere", "STR_ACE_Common_Vehicle", "STR_ACE_Medical_Treatment_MedicalFacilities", "STR_ACE_Medical_Treatment_VehiclesAndFacilities"],0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(manualConversionTime), + "SLIDER", + [LLSTRING(CONVERSION_MANUAL_CONVERSION_TIME), LLSTRING(CONVERSION_MANUAL_CONVERSION_TIME_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 60, 15, 0], + true +] call CBA_fnc_addSetting; diff --git a/addons/conversion/script_component.hpp b/addons/conversion/script_component.hpp new file mode 100644 index 000000000..792efc6cd --- /dev/null +++ b/addons/conversion/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT conversion +#define COMPONENT_BEAUTIFIED KAT - Conversion +#include "\x\kat\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_CONVERSION + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_CONVERSION + #define DEBUG_SETTINGS DEBUG_SETTINGS_CONVERSION +#endif + +#include "\x\kat\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/conversion/stringtable.xml b/addons/conversion/stringtable.xml new file mode 100644 index 000000000..8ebbb3132 --- /dev/null +++ b/addons/conversion/stringtable.xml @@ -0,0 +1,107 @@ + + + + + Enable Casualty Conversion + + + Enables Casualty Conversion for Players and Select AI + + + Force Vehicle Conversion + + + Should patients only be allowed to be converted when in a vehicle? + + + Conversion Vehicles + + + List of vehicles that can be used for conversion + + + Enable Manual Initial Conversion + + + Enables manual initial conversion by medical personnel + + + Medical Level for Conversion + + + What level should a player be in order to perform an initial conversion + + + Location for Conversion + + + What medical facility should a player be in order to perform an initial conversion + + + Manual Conversion Time + + + Time to convert patient + + + Display Conversion + + + Enables text in patient menu that they are converted + + + One Life Conversion + + + Prevents spectating players from respawning until their body has been converted + + + Ticket for Patient Conversion + + + Enables ticket gain when converting casualties + + + Tickets Gained + + + How many tickets should be regained when converting patients + + + Converted + + + Move Casualty to Higher Care + + + KAT - ADV Medical: Conversion + + + Perform Initial Conversion + + + Converting... + + + Enable Automatic Conversion + + + Enable Automatic Conversion upon receiving fatal vitals (Bleeding at lost fatal, large hits to vital organs, ETC) + + + Rear Area Conversion Settings + + + Changes what is required to convert a casualty back into tickets at a medical facility + + + Nothing + + + Stable Vitals + + + Stable Vitals + No joint Injuries or fractures + + + diff --git a/addons/fatigue/$PBOPREFIX$ b/addons/fatigue/$PBOPREFIX$ new file mode 100644 index 000000000..ac5a4c817 --- /dev/null +++ b/addons/fatigue/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\fatigue \ No newline at end of file diff --git a/addons/fatigue/CfgEventHandlers.hpp b/addons/fatigue/CfgEventHandlers.hpp new file mode 100644 index 000000000..3e29d8b77 --- /dev/null +++ b/addons/fatigue/CfgEventHandlers.hpp @@ -0,0 +1,13 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + disableModuload = "true"; + }; +}; + + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/fatigue/CfgFunctions.hpp b/addons/fatigue/CfgFunctions.hpp new file mode 100644 index 000000000..812acc5a3 --- /dev/null +++ b/addons/fatigue/CfgFunctions.hpp @@ -0,0 +1,16 @@ +class CfgFunctions { + class overwrite_ace_advanced_fatigue { + tag = "ace_advanced_fatigue"; + class ace_advanced_fatigue { + class getMetabolicCosts { + file = QPATHTOF(functions\fnc_getMetabolicCosts.sqf); + }; + class mainLoop { + file = QPATHTOF(functions\fnc_mainLoop.sqf); + }; + class handleEffects { + file = QPATHTOF(functions\fnc_handleEffects.sqf); + }; + }; + }; +}; diff --git a/addons/fatigue/LICENSE b/addons/fatigue/LICENSE new file mode 100644 index 000000000..6f4c47cdb --- /dev/null +++ b/addons/fatigue/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2023 johnb432 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/addons/fatigue/XEH_PREP.hpp b/addons/fatigue/XEH_PREP.hpp new file mode 100644 index 000000000..9495854d3 --- /dev/null +++ b/addons/fatigue/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(getMetabolicCosts); +PREP(handleEffects); +PREP(mainLoop); \ No newline at end of file diff --git a/addons/fatigue/XEH_postInit.sqf b/addons/fatigue/XEH_postInit.sqf new file mode 100644 index 000000000..cd8d79bca --- /dev/null +++ b/addons/fatigue/XEH_postInit.sqf @@ -0,0 +1,115 @@ +#include "script_component.hpp" + +// Duty < 1: Reduces fatigue impact; duty > 1 increases fatigue impact +// https://github.com/acemod/ACE3/blob/master/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +[QGVAR(advancedFatigueDuty), { + params ["_unit"]; + + private _duty = 1; + private _animName = animationState _unit; + private _animType = _animName select [1, 3]; + + if (_animType in ["idl", "mov", "adj"]) then { + switch (_animName select [5, 3]) do { + // Crouching + case "knl": { + _duty = 1 / ([GVAR(advancedFatigueDutyCrouching), GVAR(advancedFatigueDutyCrouchingSprinting)] select GVAR(sprinting)); + }; + // Prone + case "pne": { + _duty = 1 / ([GVAR(advancedFatigueDutyProne), GVAR(advancedFatigueDutyProneSprinting)] select GVAR(sprinting)); + }; + default { + _duty = 1 / ([GVAR(advancedFatigueDutyDefault), GVAR(advancedFatigueDutyDefaultSprinting)] select GVAR(sprinting)); + }; + }; + + if (currentWeapon _unit != handgunWeapon _unit) then { + // Low ready jog (weapon up, but not ADS) + if (_animName select [13, 3] == "ras") then { + // Only compensate when sprinting and if setting enabled + if (!GVAR(advancedFatigueDutyWeaponRaisedSprinting) || !GVAR(sprinting)) then { + _duty = _duty / GVAR(advancedFatigueDutyWeaponRaised); + }; + + // High ready jog/walk (weapon up and ADS); Sprinting not possible here + if (_animName select [9, 3] == "tac") then { + _duty = _duty / GVAR(advancedFatigueDutyAimingDownSights); + }; + }; + }; + } else { + // Swimming and diving + switch (true) do { + // Swimming + case (_animType in ["swm", "ssw", "bsw"]): { + _duty = 1 / ([GVAR(advancedFatigueDutySwimming), GVAR(advancedFatigueDutySwimmingSprinting)] select GVAR(sprinting)); + }; + // Diving + case (_animType in ["dve", "sdv", "bdv"]): { + _duty = 1 / ([GVAR(advancedFatigueDutyDiving), GVAR(advancedFatigueDutyDivingSprinting)] select GVAR(sprinting)); + }; + }; + }; + + _duty +}] call ACEFUNC(advanced_fatigue,addDutyFactor); + +// Alternative Running - compat +if (isClass (configFile >> "CfgPatches" >> "Alternative_Running")) then { + [QGVAR(advancedFatigueAlternativeRunningDuty), { + params ["_unit"]; + + private _duty = 1; + + if ((animationState _unit) in ["arma_alternativerunwithlauncher", "arma_alternativepistol", "arma_alternativerun_water_light", "arma_alternativerun", "arma_alternativerunlowered", "arma_alternativerun_water_heavy", "arma_alternativerun_ww2style"]) then { + _duty = 1 / GVAR(advancedFatigueDutyAlternativeRunning); + }; + + _duty + }] call ACEFUNC(advanced_fatigue,addDutyFactor); +}; + +// Advanced Vault System: Remastered - compat +if (isClass (configFile >> "CfgPatches" >> "APS_System")) then { + [QGVAR(advancedFatigueAVSRemasteredDuty), { + params ["_unit"]; + + private _animName = animationState _unit; + + switch (true) do { + // Vaulting + case (_animName in [ + "mainweapon_vault_fast", "pistol_vault_fast", "unarmed_vault_fast", "mainweapon_vault_slow", "pistol_vault_fast", "unarmed_vault_slow", "mainweapon_vault_little", "pistol_vault_little", "unarmed_vault_little", + "mainweapon_vault_middle", "pistol_vault_middle", "unarmed_vault_middle", "mainweapon_vault_middle_over", "pistol_vault_middle_over", "unarmed_vault_middle_over" + ]): { + 1 / GVAR(advancedFatigueDutyAVSVault) + }; + // Climbing + case (_animName in ["mainweapon_climb_on", "unarmed_climb_on", "mainweapon_climb_on_over", "unarmed_climb_on_over", "unarmed_in_air_grab_middle", "unarmed_in_air_grab_high"]): { + 1 / GVAR(advancedFatigueDutyAVSClimb) + }; + // Jumping + case (_animName in ["mainweapon_jump_land_roll", "pistol_jump_land_roll", "unarmed_jump_land_roll"]): { + 1 / GVAR(advancedFatigueDutyAVSJump) + }; + // Sliding + case (_animName in ["mainweapon_slide", "pistol_slide"]): { + 1 / GVAR(advancedFatigueDutyAVSSlide) + }; + default { + 1 + }; + } + }] call ACEFUNC(advanced_fatigue,addDutyFactor); +}; + +GVAR(sprinting) = false; + +addUserActionEventHandler ["turbo", "Activate", { + GVAR(sprinting) = true; +}]; + +addUserActionEventHandler ["turbo", "Deactivate", { + GVAR(sprinting) = false; +}]; diff --git a/addons/fatigue/XEH_preInit.sqf b/addons/fatigue/XEH_preInit.sqf new file mode 100644 index 000000000..54bc70a53 --- /dev/null +++ b/addons/fatigue/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; +#define CBA_SETTINGS_CAT LSTRING(cba_name) +// CBA Settings +#include "initSettings.inc.sqf" + +ADDON = true; diff --git a/addons/fatigue/config.cpp b/addons/fatigue/config.cpp new file mode 100644 index 000000000..84093737b --- /dev/null +++ b/addons/fatigue/config.cpp @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; + units[] = {}; + weapons[] = {}; + magazines[] = { }; + requiredAddons[] = { + "kat_main", + "ace_advanced_fatigue", + "ace_dogtags", + "cba_settings", + "cba_main", + "cba_xeh" + }; + author = "Cplhardcore"; + authors[] = {"Cplhardcore"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; +#include "CfgFunctions.hpp" +#include "CfgEventHandlers.hpp" + diff --git a/addons/fatigue/functions/fnc_getMetabolicCosts.sqf b/addons/fatigue/functions/fnc_getMetabolicCosts.sqf new file mode 100644 index 000000000..cf1c1b337 --- /dev/null +++ b/addons/fatigue/functions/fnc_getMetabolicCosts.sqf @@ -0,0 +1,84 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, ulteq + * Calculates the current metabolic costs. + * Calculation is done according to the Pandolf/Wojtowicz formulas. + * + * Arguments: + * 0: Mass of unit + * 1: Terrain gradient + * 2: Terrain factor + * 3: Speed + * + * Return Value: + * Metabolic cost + * + * Example: + * [840, 20, 1, 4] call ace_advanced_fatigue_fnc_getMetabolicCosts + * + * Public: No + */ + +params ["_gearMass", "_terrainGradient", "_terrainFactor", "_speed"]; + +// Get the current duty +private _duty = ACEGVAR(advanced_fatigue,animDuty); +private _bodyMass = ACE_player getVariable [QEGVAR(vitals,currentWeight), 80]; +{ + _duty = if (_x isEqualType 0) then { + _duty * _x + } else { + _duty * (ACE_player call _x) + }; +} forEach (values ACEGVAR(advanced_fatigue,dutyList)); + +// Metabolic cost for walking and running is different +if (_speed > 2) then { + // Running + #ifdef DEBUG_MODE_FULL + private _baseline = 2.1 * _bodyMass + 4 * (_bodyMass + _gearMass) * ((_gearMass / _bodyMass) ^ 2) + (_bodyMass + _gearMass) * 0.9 * (_speed ^ 2); + private _graded = 2.1 * _bodyMass + 4 * (_bodyMass + _gearMass) * ((_gearMass / _bodyMass) ^ 2) + _terrainFactor * (_bodyMass + _gearMass) * (0.9 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient); + private _terrainImpact = abs ((_graded / _baseline) - 1); + hintSilent format ["FwdAngle: %1 | SideAngle: %2 \n TerrainFactor: %3 | TerrainGradient: %4 \n TerrainImpact: %5 \n Speed: %6 | CarriedLoad: %7 \n Duty: %8 | Work: %9", + _fwdAngle toFixed 1, //IGNORE_PRIVATE_WARNING ["_fwdAngle", "_sideAngle"]; // from mainLoop + _sideAngle toFixed 1, + _terrainFactor toFixed 2, + _terrainGradient toFixed 1, + _terrainImpact toFixed 2, + _speed toFixed 2, + _gearMass toFixed 1, + _duty toFixed 2, + round (_graded * BIOMECH_EFFICIENCY * _duty) + ]; + #endif + + ( + 2.1 * _bodyMass + + 4 * (_bodyMass + _gearMass) * ((_gearMass / _bodyMass) ^ 2) + + _terrainFactor * (_bodyMass + _gearMass) * (0.9 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient) + ) * BIOMECH_EFFICIENCY * _duty +} else { + // Walking + #ifdef DEBUG_MODE_FULL + private _baseline = 1.05 * _bodyMass + 2 * (_bodyMass + _gearMass) * ((_gearMass / _bodyMass) ^ 2) + (_bodyMass + _gearMass) * 1.15 * (_speed ^ 2); + private _graded = 1.05 * _bodyMass + 2 * (_bodyMass + _gearMass) * ((_gearMass / _bodyMass) ^ 2) + _terrainFactor * (_bodyMass + _gearMass) * (1.15 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient); + private _terrainImpact = abs ((_graded / _baseline) - 1); + hintSilent format ["FwdAngle: %1 | SideAngle: %2 \n TerrainFactor: %3 | TerrainGradient: %4 \n TerrainImpact: %5 \n Speed: %6 | CarriedLoad: %7 \n Duty: %8 | Work: %9", + _fwdAngle toFixed 1, + _sideAngle toFixed 1, + _terrainFactor toFixed 2, + _terrainGradient toFixed 1, + _terrainImpact toFixed 2, + _speed toFixed 2, + _gearMass toFixed 1, + _duty toFixed 2, + round (_graded * BIOMECH_EFFICIENCY * _duty) + ]; + #endif + + ( + 1.05 * _bodyMass + + 2 * (_bodyMass + _gearMass) * ((_gearMass / _bodyMass) ^ 2) + + _terrainFactor * (_bodyMass + _gearMass) * (1.15 * (_speed ^ 2) + 0.66 * _speed * _terrainGradient) + ) * BIOMECH_EFFICIENCY * _duty +}; \ No newline at end of file diff --git a/addons/fatigue/functions/fnc_handleEffects.sqf b/addons/fatigue/functions/fnc_handleEffects.sqf new file mode 100644 index 000000000..0a3d147d6 --- /dev/null +++ b/addons/fatigue/functions/fnc_handleEffects.sqf @@ -0,0 +1,98 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, ulteq + * Handles any audible, visual and physical effects of fatigue. + * + * Arguments: + * 0: Unit + * 1: Fatigue + * 2: Overexhausted + * 3: Forward Angle + * 4: Side Angle + * + * Return Value: + * None + * + * Example: + * [_player, 0.5, 3.3, true, 0, 0] call ace_advanced_fatigue_fnc_handleEffects + * + * Public: No + */ + +params ["_unit", "_fatigue", "_overexhausted", "_fwdAngle", "_sideAngle"]; + +// - Audible effects ---------------------------------------------------------- +ACEGVAR(advanced_fatigue,lastBreath) = ACEGVAR(advanced_fatigue,lastBreath) + 1; + +if (_fatigue > 0.4 && {ACEGVAR(advanced_fatigue,lastBreath) > (_fatigue * -10 + 9)} && {!underwater _unit}) then { + if (!isGameFocused) exitWith {}; + + switch (true) do { + case (_fatigue < 0.6): { + playSound (QACEGVAR(advanced_fatigue,breathLow) + str (floor random 6)); + }; + case (_fatigue < 0.85): { + playSound (QACEGVAR(advanced_fatigue,breathMid) + str (floor random 6)); + }; + default { + playSound (QACEGVAR(advanced_fatigue,breathMax) + str (floor random 6)); + }; + }; + + ACEGVAR(advanced_fatigue,lastBreath) = 0; +}; + +// - Visual effects ----------------------------------------------------------- +ACEGVAR(advanced_fatigue,ppeBlackoutLast) = ACEGVAR(advanced_fatigue,ppeBlackoutLast) + 1; +if (ACEGVAR(advanced_fatigue,ppeBlackoutLast) == 1) then { + ACEGVAR(advanced_fatigue,ppeBlackout) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]]; + ACEGVAR(advanced_fatigue,ppeBlackout) ppEffectCommit 1; +} else { + if (_fatigue > 0.85) then { + if (ACEGVAR(advanced_fatigue,ppeBlackoutLast) > (100 - _fatigue * 100) / 3) then { + ACEGVAR(advanced_fatigue,ppeBlackout) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[2,2,0,0,0,0.1,0.5]]; + ACEGVAR(advanced_fatigue,ppeBlackout) ppEffectCommit 1; + ACEGVAR(advanced_fatigue,ppeBlackoutLast) = 0; + }; + }; +}; + +// - Physical effects --------------------------------------------------------- +if (ACEGVAR(advanced_fatigue,isSwimming)) exitWith { + if (ACEGVAR(advanced_fatigue,setAnimExclusions) isEqualTo []) then { + _unit setAnimSpeedCoef linearConversion [0.7, 0.9, _fatigue, 1, 0.5, true]; + }; + + if (isSprintAllowed _unit && _fatigue > 0.7) then { // small checks like these are faster without lazy eval + [_unit, "blockSprint", QUOTE(ADDON), true] call ACEFUNC(common,statusEffect_set); + } else { + if (!isSprintAllowed _unit && _fatigue < 0.7) then { + [_unit, "blockSprint", QUOTE(ADDON), false] call ACEFUNC(common,statusEffect_set); + }; + }; +}; + +// If other components are setting setAnimSpeedCoef, do not change animSpeedCoef +if (getAnimSpeedCoef _unit != 1 && {ACEGVAR(advanced_fatigue,setAnimExclusions) isEqualTo []}) then { + TRACE_1("reset",getAnimSpeedCoef _unit); + _unit setAnimSpeedCoef 1; +}; + +if (!isForcedWalk _unit && _fatigue >= 1) then { // small checks like these are faster without lazy eval + [_unit, "forceWalk", QUOTE(ADDON), true] call ACEFUNC(common,statusEffect_set); + [_unit, "blockSprint", QUOTE(ADDON), true] call ACEFUNC(common,statusEffect_set); +} else { + if (isForcedWalk _unit && _fatigue < 0.7) then { + [_unit, "forceWalk", QUOTE(ADDON), false] call ACEFUNC(common,statusEffect_set); + [_unit, "blockSprint", QUOTE(ADDON), false] call ACEFUNC(common,statusEffect_set); + } else { + // Forward angle is the slope of the terrain, side angle simulates the unevenness/roughness of the terrain + if (isSprintAllowed _unit && {_fatigue > 0.7 || abs _fwdAngle > 20 || abs _sideAngle > 20}) then { + [_unit, "blockSprint", QUOTE(ADDON), true] call ACEFUNC(common,statusEffect_set); + } else { + if (!isSprintAllowed _unit && _fatigue < 0.6 && abs _fwdAngle < 20 && abs _sideAngle < 20) then { + [_unit, "blockSprint", QUOTE(ADDON), false] call ACEFUNC(common,statusEffect_set); + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/fatigue/functions/fnc_mainLoop.sqf b/addons/fatigue/functions/fnc_mainLoop.sqf new file mode 100644 index 000000000..aca630b9d --- /dev/null +++ b/addons/fatigue/functions/fnc_mainLoop.sqf @@ -0,0 +1,171 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, ulteq + * Main looping function that updates fatigue values. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_advanced_fatigue_fnc_mainLoop + * + * Public: No + */ + +// Dead people don't breathe, will also handle null (map intros) +if (!alive ACE_player) exitWith { + [LINKFUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; + + private _staminaBarContainer = uiNamespace getVariable [QACEGVAR(advanced_fatigue,staminaBarContainer), controlNull]; + _staminaBarContainer ctrlSetFade 1; + _staminaBarContainer ctrlCommit 1; +}; + +private _velocity = velocity ACE_player; +private _normal = surfaceNormal (getPosWorld ACE_player); +private _movementVector = vectorNormalized _velocity; +private _fwdAngle = asin (_movementVector select 2); +private _sideAngle = if ((getPosATL ACE_player) select 2 > 0.01) then { + 0 // ignore terrain normal if not touching it +} else { + private _sideVector = vectorNormalized (_movementVector vectorCrossProduct _normal); + asin (_sideVector select 2); +}; +if (ACEGVAR(advanced_fatigue,isSwimming)) then { // ignore when floating + _fwdAngle = 0; + _sideAngle = 0; +}; + +private _bodyMass = ACE_player getVariable [QEGVAR(vitals,currentWeight), 80]; +private _currentWork = ((0.5617 * _bodyMass + 42.57) * BIOMECH_EFFICIENCY); +private _currentSpeed = (vectorMagnitude _velocity) min 6; +private _caffeineCount = ([ACE_player, "Caffeine", false] call ACEFUNC(medical_status,getMedicationCount)) select 1; +private _pervatinCount = ([ACE_player, "Pervatin", false] call ACEFUNC(medical_status,getMedicationCount)) select 1; +// fix #4481. Diving to the ground is recorded as PRONE stance with running speed velocity. Cap maximum speed to fix. +if (ACEGVAR(advanced_fatigue,isProne)) then { + _currentSpeed = _currentSpeed min 1.5; +}; + +private _terrainGradient = abs _fwdAngle; +private _terrainFactor = 1; +private _gearMass = 0 max (((ACE_player getVariable [QACEGVAR(movement,totalLoad), loadAbs ACE_player]) / 22.046 - UNDERWEAR_WEIGHT) * ACEGVAR(advanced_fatigue,loadFactor)); + +if (isNull objectParent ACE_player && {_currentSpeed > 0.1} && {isTouchingGround ACE_player || {underwater ACE_player}}) then { + if (!ACEGVAR(advanced_fatigue,isSwimming)) then { + // If the unit is going downhill, it's much less demanding + if (_fwdAngle < 0) then { + _terrainGradient = 0.15 * _terrainGradient; + }; + + // Used to simulate the unevenness/roughness of the terrain + if (_sideAngle != 0) then { + private _sideGradient = abs (_sideAngle / 45) min 1; + + _terrainFactor = 1 + _sideGradient ^ 4; + }; + }; + + // Add a scaling factor of 0.1 to reduce excessive stamina consumption on default settings (see #10361) + _currentWork = [_gearMass, _terrainGradient * ACEGVAR(advanced_fatigue,terrainGradientFactor) * 0.1, _terrainFactor, _currentSpeed] call FUNC(getMetabolicCosts); + _currentWork = _currentWork max ((0.5617 * _bodyMass + 42.57) * BIOMECH_EFFICIENCY); +}; + +// Oxygen calculation +private _oxygen = (GET_KAT_SPO2(ACE_player) / 100); +// Calculate muscle damage increase +ACEGVAR(advanced_fatigue,muscleDamage) = ACEGVAR(advanced_fatigue,muscleDamage) + (_currentWork / ACEGVAR(advanced_fatigue,peakPower)) ^ 3.2 * MUSCLE_TEAR_RATE; + +// Calculate muscle damage recovery +ACEGVAR(advanced_fatigue,muscleDamage) = 0 max (ACEGVAR(advanced_fatigue,muscleDamage) - MUSCLE_RECOVERY * ACEGVAR(advanced_fatigue,recoveryFactor)) min 1; +private _muscleIntegrity = 1 - ACEGVAR(advanced_fatigue,muscleDamage); +private _muscleFactor = sqrt _muscleIntegrity; + +// Calculate available power +private _stimulantLoad = (_caffeineCount) + (_pervatinCount * 1.5); +private _stimulantEfficiency = linearConversion [0, 3, _stimulantLoad, 1, 1.35, true]; +private _stimulantMult = linearConversion [0, 3, _stimulantLoad, 1, 0.5, true]; +private _ae1PathwayPowerFatigued = ACEGVAR(advanced_fatigue,ae1PathwayPower) * sqrt (ACEGVAR(advanced_fatigue,ae1Reserve) / AE1_MAXRESERVE) * _oxygen * _muscleFactor; +private _ae2PathwayPowerFatigued = ACEGVAR(advanced_fatigue,ae2PathwayPower) * sqrt (ACEGVAR(advanced_fatigue,ae2Reserve) / AE2_MAXRESERVE) * _oxygen * _muscleFactor; +_ae1PathwayPowerFatigued = _ae1PathwayPowerFatigued / _stimulantMult; +_ae2PathwayPowerFatigued = _ae2PathwayPowerFatigued / _stimulantMult; +private _acidPowerPenalty = linearConversion [0, 1, ACEGVAR(advanced_fatigue,anFatigue), 1, 0.6, true]; +_ae1PathwayPowerFatigued = _ae1PathwayPowerFatigued * _acidPowerPenalty; +_ae2PathwayPowerFatigued = _ae2PathwayPowerFatigued * _acidPowerPenalty; +private _aePathwayPowerFatigued = _ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued; +// private _anPathwayPowerFatigued = ACEGVAR(advanced_fatigue,anPathwayPower) * sqrt (ACEGVAR(advanced_fatigue,anReserve) / AN_MAXRESERVE) * _oxygen * _muscleIntegrity; // not used + +// Calculate how much power is consumed from each reserve +private _ae1Power = _currentWork min _ae1PathwayPowerFatigued; +private _ae2Power = (_currentWork - _ae1Power) min _ae2PathwayPowerFatigued; +private _anPowerRaw = 0 max (_currentWork - _ae1Power - _ae2Power); +private _anPower = _anPowerRaw; + +// Remove ATP from reserves for current work +ACEGVAR(advanced_fatigue,ae1Reserve) = 0 max (ACEGVAR(advanced_fatigue,ae1Reserve) - _ae1Power / ACEGVAR(advanced_fatigue,aeWattsPerATP)); +ACEGVAR(advanced_fatigue,ae2Reserve) = 0 max (ACEGVAR(advanced_fatigue,ae2Reserve) - _ae2Power / ACEGVAR(advanced_fatigue,aeWattsPerATP)); +ACEGVAR(advanced_fatigue,anReserve) = + 0 max ( + ACEGVAR(advanced_fatigue,anReserve) + - (_anPower / ACEGVAR(advanced_fatigue,anWattsPerATP)) / _stimulantEfficiency + ); + +private _ltFatigueFactor = linearConversion [0, 0.4, ACEGVAR(advanced_fatigue,muscleDamage), 1, 0.85, true]; + +private _lactateThreshold = 0.75 * ACEGVAR(advanced_fatigue,VO2MaxPower) * _ltFatigueFactor; +if (_currentWork > _lactateThreshold) then { + private _ltExcess = + (_currentWork - _lactateThreshold) + / (ACEGVAR(advanced_fatigue,VO2MaxPower) - _lactateThreshold); + + ACEGVAR(advanced_fatigue,anFatigue) = + ACEGVAR(advanced_fatigue,anFatigue) + + (_ltExcess ^ 2.5) + * ACEGVAR(advanced_fatigue,maxPowerFatigueRatio); +}; +private _clearanceRate = 0.0025 * _oxygen * ACEGVAR(advanced_fatigue,recoveryFactor) * (1 - (_currentWork / ACEGVAR(advanced_fatigue,VO2MaxPower)) max 0); + +ACEGVAR(advanced_fatigue,anFatigue) = 0 max (ACEGVAR(advanced_fatigue,anFatigue) - _clearanceRate); + +// Aerobic ATP reserve recovery +ACEGVAR(advanced_fatigue,ae1Reserve) = (ACEGVAR(advanced_fatigue,ae1Reserve) + _oxygen * ACEGVAR(advanced_fatigue,recoveryFactor) * AE1_ATP_RECOVERY * (ACEGVAR(advanced_fatigue,ae1PathwayPower) - _ae1Power) / ACEGVAR(advanced_fatigue,ae1PathwayPower)) min AE1_MAXRESERVE; +ACEGVAR(advanced_fatigue,ae2Reserve) = (ACEGVAR(advanced_fatigue,ae2Reserve) + _oxygen * ACEGVAR(advanced_fatigue,recoveryFactor) * AE2_ATP_RECOVERY * (ACEGVAR(advanced_fatigue,ae2PathwayPower) - _ae2Power) / ACEGVAR(advanced_fatigue,ae2PathwayPower)) min AE2_MAXRESERVE; + +private _aeSurplus = 0 max (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power); + +// Anaerobic ATP reserve recovery +private _acidInhibition = linearConversion [0, 1, ACEGVAR(advanced_fatigue,anFatigue), 1, 0.4, true]; +ACEGVAR(advanced_fatigue,anReserve) = + 0 max ( + ACEGVAR(advanced_fatigue,anReserve) + + _aeSurplus + / ACEGVAR(advanced_fatigue,VO2MaxPower) + * AN_ATP_RECOVERY + * ACEGVAR(advanced_fatigue,recoveryFactor) + * _acidInhibition + * _stimulantEfficiency + ) min AN_MAXRESERVE; + +// max linearConversion ensures that if ACEGVAR(advanced_fatigue,anFatigue) is very low, it will still regenerate reserves +// Calculate a pseudo-perceived fatigue, which is used for effects +ACEGVAR(advanced_fatigue,aeReservePercentage) = (ACEGVAR(advanced_fatigue,ae1Reserve) / AE1_MAXRESERVE + ACEGVAR(advanced_fatigue,ae2Reserve) / AE2_MAXRESERVE) / 2; +ACEGVAR(advanced_fatigue,anReservePercentage) = ACEGVAR(advanced_fatigue,anReserve) / AN_MAXRESERVE; +private _perceivedFatigue = 1 - (ACEGVAR(advanced_fatigue,anReservePercentage) min ACEGVAR(advanced_fatigue,aeReservePercentage)); + +#ifdef DEBUG_MODE_FULL +systemChat format ["---- muscleDamage: %1 ----", ACEGVAR(advanced_fatigue,muscleDamage) toFixed 8]; +systemChat format ["---- ae2: %1 - an: %2 ----", (ACEGVAR(advanced_fatigue,ae2Reserve) / AE2_MAXRESERVE) toFixed 2, (ACEGVAR(advanced_fatigue,anReserve) / AN_MAXRESERVE) toFixed 2]; +systemChat format ["---- anFatigue: %1 - perceivedFatigue: %2 ----", ACEGVAR(advanced_fatigue,anFatigue) toFixed 2, _perceivedFatigue toFixed 2]; +systemChat format ["---- velocity %1 - respiratoryRate: %2 ----", (vectorMagnitude _velocity) toFixed 2, ACEGVAR(advanced_fatigue,respiratoryRate) toFixed 2]; +// systemChat format ["---- aePower: %1 ----", _aePathwayPowerFatigued toFixed 1]; +#endif + +[ACE_player, _perceivedFatigue, ACEGVAR(advanced_fatigue,anReserve) == 0, _fwdAngle, _sideAngle] call FUNC(handleEffects); + +if (ACEGVAR(advanced_fatigue,enableStaminaBarRealized)) then { + [ACEGVAR(advanced_fatigue,anReserve) / AN_MAXRESERVE] call ACEFUNC(advanced_fatigue,handleStaminaBar); +}; + +[LINKFUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/fatigue/initSettings.inc.sqf b/addons/fatigue/initSettings.inc.sqf new file mode 100644 index 000000000..f5e267285 --- /dev/null +++ b/addons/fatigue/initSettings.inc.sqf @@ -0,0 +1,225 @@ +// ACE Advanced fatigue duty factors +[ + QGVAR(advancedFatigueDutyDefault), + "SLIDER", + ["Default duty factor", "Duty factor that is applied by default. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyCrouching), + "SLIDER", + ["Crouching duty factor", "Duty factor that is applied when a player is crouching. Higher means lower stamina drain.\nIf you want to negate the effect that crouching has on ACE advanced fatigue, you must set this setting to 1.5."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyProne), + "SLIDER", + ["Prone duty factor", "Duty factor that is applied when a player is prone. Higher means lower stamina drain.\nIf you want to negate the effect that prone has on ACE advanced fatigue, you must set this setting to 10."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyWeaponRaised), + "SLIDER", + ["Weapon raised duty factor", "Duty factor that is applied when a player has their weapon raised. Higher means lower stamina drain.\nIf you want to negate the effect that a raised weapon has on ACE advanced fatigue, you must set this setting to 1.2."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyAimingDownSights), + "SLIDER", + ["Aiming down sights duty factor", "Duty factor that is applied when a player is aiming down sights. Higher means lower stamina drain.\nIf you want to negate the effect that aiming down sights has on ACE advanced fatigue, you must set this setting to 1.5 and the raised weapon setting to 1.2."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutySwimming), + "SLIDER", + ["Swimming duty factor", "Duty factor that is applied when a player is swimming. Higher means lower stamina drain.\nIf you want to negate the effect that swimming has on ACE advanced fatigue, you must set this setting to 6.5."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyDiving), + "SLIDER", + ["Diving duty factor", "Duty factor that is applied when a player is diving. Higher means lower stamina drain.\nIf you want to negate the effect that diving has on ACE advanced fatigue, you must set this setting to 2.5."], + [CBA_SETTINGS_CAT, "Normal"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +// Sprinting +[ + QGVAR(advancedFatigueDutyDefaultSprinting), + "SLIDER", + ["Default sprinting duty factor", "Duty factor that is applied by default when sprinting. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Sprinting"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyCrouchingSprinting), + "SLIDER", + ["Crouch-sprinting duty factor", "Duty factor that is applied when a player is crouch-sprinting. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Sprinting"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyProneSprinting), + "SLIDER", + ["Prone-sprinting duty factor", "Duty factor that is applied when a player is prone-sprinting. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Sprinting"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyWeaponRaisedSprinting), + "CHECKBOX", + ["Weapon-raised-sprinting compensation", "If enabled and sprinting, it will not apply the 'Weapon raised duty factor' setting."], + [CBA_SETTINGS_CAT, "Sprinting"], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutySwimmingSprinting), + "SLIDER", + ["Swim-sprinting duty factor", "Duty factor that is applied when a player is swim-sprinting. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Sprinting"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +[ + QGVAR(advancedFatigueDutyDivingSprinting), + "SLIDER", + ["Dive-sprinting duty factor", "Duty factor that is applied when a player is dive-sprinting. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Sprinting"], + DEFAULT_SETTINGS +] call CBA_fnc_addSetting; + +// Muscle damage +[ + QGVAR(muscleDamageFactor), + "SLIDER", + ["Muscle damage factor", "Factor that is applied to muscle damage. If set to 0, muscle damage is disabled."], + [CBA_SETTINGS_CAT, "Muscle Damage"], + [0, 1.5, 1, 6] +] call CBA_fnc_addSetting; + +// AE reserves +[ + QGVAR(ae1ReserveFactor), + "SLIDER", + ["AE1 Reserve recovery factor", "Recovery factor that is applied to the AE1 Reserve. If set to < 0, the AE1 Reserve are kept at maximum."], + [CBA_SETTINGS_CAT, "Energy Reserves"], + [-0.01, 1.5, 1, 6] +] call CBA_fnc_addSetting; + +[ + QGVAR(ae2ReserveFactor), + "SLIDER", + ["AE2 Reserve recovery factor", "Recovery factor that is applied to the AE2 Reserve. If set to < 0, the AE2 Reserve are kept at maximum."], + [CBA_SETTINGS_CAT, "Energy Reserves"], + [-0.01, 1.5, 1, 6] +] call CBA_fnc_addSetting; + +// AN reserve & fatigue +[ + QGVAR(anReserveFactor), + "SLIDER", + ["AN Reserve recovery factor", "Recovery factor that is applied to the AN Reserve. If set to < 0, the AN Reserve are kept at maximum."], + [CBA_SETTINGS_CAT, "Energy Reserves"], + [-0.01, 1.5, 1, 6] +] call CBA_fnc_addSetting; + +[ + QGVAR(anFatigueFactor), + "SLIDER", + ["AN Fatigue factor", "Factor that is applied to the AN Fatigue. If set to 0, the AN Fatigue is disabled, but you must set 'anReserveFactor' to > 1, otherwise the AN Reserve will not recover."], + [CBA_SETTINGS_CAT, "Energy Reserves"], + [0, 1.5, 1, 6] +] call CBA_fnc_addSetting; + +// Alternative running compat +if (isClass (configFile >> "CfgPatches" >> "Alternative_Running")) then { + [ + QGVAR(advancedFatigueDutyAlternativeRunning), + "SLIDER", + ["Alternative running duty factor", "Duty factor that is applied when using alternative running. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Compats"], + DEFAULT_SETTINGS + ] call CBA_fnc_addSetting; +}; + +// AVS compat +if (isClass (configFile >> "CfgPatches" >> "APS_System")) then { + [ + QGVAR(advancedFatigueDutyAVSVault), + "SLIDER", + ["AVS vaulting duty factor", "Duty factor that is applied when using alternative running. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Compats"], + DEFAULT_SETTINGS + ] call CBA_fnc_addSetting; + + [ + QGVAR(advancedFatigueDutyAVSClimb), + "SLIDER", + ["AVS climbing duty factor", "Duty factor that is applied when using alternative running. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Compats"], + DEFAULT_SETTINGS + ] call CBA_fnc_addSetting; + + [ + QGVAR(advancedFatigueDutyAVSJump), + "SLIDER", + ["AVS jumping duty factor", "Duty factor that is applied when using alternative running. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Compats"], + DEFAULT_SETTINGS + ] call CBA_fnc_addSetting; + + [ + QGVAR(advancedFatigueDutyAVSSlide), + "SLIDER", + ["AVS sliding duty factor", "Duty factor that is applied when using alternative running. Higher means lower stamina drain."], + [CBA_SETTINGS_CAT, "Compats"], + DEFAULT_SETTINGS + ] call CBA_fnc_addSetting; +}; + +// 'ace_advanced_fatigue_enabled' can only be set at mission start +["CBA_settingsInitialized", { + if (!ace_advanced_fatigue_enabled) exitWith {}; + + [{ + if (!alive ACE_player || isGamePaused) exitWith {}; + + ace_advanced_fatigue_muscleDamage = ace_advanced_fatigue_muscleDamage * GVAR(muscleDamageFactor); + + if (GVAR(ae1ReserveFactor) < 0) then { + ace_advanced_fatigue_ae1Reserve = AE1_MAXRESERVE; + } else { + ace_advanced_fatigue_ae1Reserve = ((ace_advanced_fatigue_ae1Reserve * GVAR(ae1ReserveFactor)) min AE1_MAXRESERVE) max 0; + }; + + if (GVAR(ae2ReserveFactor) < 0) then { + ace_advanced_fatigue_ae2Reserve = AE2_MAXRESERVE; + } else { + ace_advanced_fatigue_ae2Reserve = ((ace_advanced_fatigue_ae2Reserve * GVAR(ae2ReserveFactor)) min AE2_MAXRESERVE) max 0; + }; + + if (GVAR(anReserveFactor) < 0) then { + ace_advanced_fatigue_anReserve = AN_MAXRESERVE; + } else { + ace_advanced_fatigue_anReserve = ((ace_advanced_fatigue_anReserve * GVAR(anReserveFactor)) min AN_MAXRESERVE) max 0; + }; + + ace_advanced_fatigue_anFatigue = ((ace_advanced_fatigue_anFatigue * GVAR(anFatigueFactor)) min 1) max 0; + }, 1] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; diff --git a/addons/fatigue/script_component.hpp b/addons/fatigue/script_component.hpp new file mode 100644 index 000000000..940c1f438 --- /dev/null +++ b/addons/fatigue/script_component.hpp @@ -0,0 +1,45 @@ +#define COMPONENT fatigue +#define COMPONENT_BEAUTIFIED KAT - Advanced Fatigue +#include "\x\kat\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "\x\kat\addons\main\script_macros.hpp" +#define DEFAULT_SETTINGS [ARR_4(0.04,25,1,2)] + +#define UNDERWEAR_WEIGHT 3.5 + +#define ANTPERCENT 0.8 +#define JOULES_PER_ML_O2 20.9 +#define VO2MAX_STRENGTH 4.1 +#define BIOMECH_EFFICIENCY 0.23 +#define REE 18.83 // ((0.5617 * SIM_BODYMASS + 42.57) * BIOMECH_EFFICIENCY) + +#define RESPIRATORY_BUFFER 60 + +#define MUSCLE_TEAR_RATE 0.00004 +#define MUSCLE_RECOVERY 0.00000386 + +#define AE1_ATP_RELEASE_RATE 13.3 // mmol +#define AE2_ATP_RELEASE_RATE 16.7 // mmol +#define AN_ATP_RELEASE_RATE 113.3 // mmol + +#define AE1_ATP_RECOVERY 6.60 // mmol +#define AE2_ATP_RECOVERY 5.83 // mmol +#define AN_ATP_RECOVERY 56.70 // mmol + +#define AE1_MAXRESERVE 4000000 // mmol +#define AE2_MAXRESERVE 84000 // mmol +#define AN_MAXRESERVE 2300 // mmol + +#define MAX_PERFORMANCE_FACTOR 10 \ No newline at end of file diff --git a/addons/fatigue/stringtable.xml b/addons/fatigue/stringtable.xml new file mode 100644 index 000000000..8facd5c96 --- /dev/null +++ b/addons/fatigue/stringtable.xml @@ -0,0 +1,8 @@ + + + + + KAT - ADV Medical: Fatigue + + + diff --git a/addons/feedback/CfgSounds.hpp b/addons/feedback/CfgSounds.hpp new file mode 100644 index 000000000..e69de29bb diff --git a/addons/feedback/XEH_PREP.hpp b/addons/feedback/XEH_PREP.hpp index f5eab06cf..8f2d4be2a 100644 --- a/addons/feedback/XEH_PREP.hpp +++ b/addons/feedback/XEH_PREP.hpp @@ -1,8 +1,12 @@ +PREP(effectAirways); +PREP(effectAirwaysColor); +PREP(effectBreathingGasp); PREP(effectBreathingWheeze); -PREP(effectCoughing); +PREP(effectConcussion); PREP(effectEyeBlink); PREP(effectEyeInjury); PREP(effectHurtEye); +PREP(effectLossCMR); PREP(effectLowSpO2); PREP(effectOpioid); PREP(effectTearHaze); diff --git a/addons/feedback/XEH_preInit.sqf b/addons/feedback/XEH_preInit.sqf index f29e83b4b..403ef43d2 100644 --- a/addons/feedback/XEH_preInit.sqf +++ b/addons/feedback/XEH_preInit.sqf @@ -9,4 +9,13 @@ PREP_RECOMPILE_END; #define CBA_SETTINGS_CAT LSTRING(cba_name) #include "initSettings.inc.sqf" -ADDON = true; \ No newline at end of file +[ + QGVAR(enableBrainEffect), + "CHECKBOX", + [LLSTRING(SETTING_BrainEffect_display), LLSTRING(SETTING_BrainEffect_DESC)], + CBA_SETTINGS_CAT, + [true], + true +] call CBA_Settings_fnc_init; + +ADDON = true; diff --git a/addons/feedback/audio/pneumothoraxcough.ogg b/addons/feedback/audio/pneumothoraxcough.ogg new file mode 100644 index 000000000..db7ae82fa Binary files /dev/null and b/addons/feedback/audio/pneumothoraxcough.ogg differ diff --git a/addons/feedback/functions/fnc_effectAirways.sqf b/addons/feedback/functions/fnc_effectAirways.sqf new file mode 100644 index 000000000..627478e6e --- /dev/null +++ b/addons/feedback/functions/fnc_effectAirways.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda, Digii + * Modified by MiszczuZPolski + * Triggers the low SPO2 visual effect. + * +* Arguments: + * 0: Enable + * 1: Intensity + * + * Return Value: + * None + * + * Example: + * [true, 0.5] call kat_feedback_fnc_effectairwayInjury; + * + * Public: No + */ + +params ["_enable", "_enabled"]; + +if ((!_enable) || (!_enabled)) exitWith { + if (GVAR(airwayInjury)!= -1) then { GVAR(airwayInjury) ppEffectEnable false; }; +}; +if (GVAR(airwayInjury)!= -1) then { GVAR(airwayInjury) ppEffectEnable true; }; + +// Trigger effect every 2s +private _showNextTick = missionNamespace getVariable [QGVAR(showAirwaysNextTick), true]; +GVAR(showAirwaysNextTick) = !_showNextTick; +if (_showNextTick) exitWith {}; + +private _initialAdjust = []; +private _delayedAdjust = []; + +_initialAdjust = [1, 1, 0, [0, 0, 0, 0.9], [0, 0, 0, 1], [0.33, 0.33, 0.33, 0], [0.55, 0.5, 0, 0, 0, 0, 4]]; +_delayedAdjust = [1, 1, 0, [0, 0, 0, 0.1], [0, 0, 0, 1], [0.33, 0.33, 0.33, 0], [0.55, 0.5, 0, 0, 0, 0, 4]]; + +GVAR(airwayInjury) ppEffectAdjust _initialAdjust; +GVAR(airwayInjury) ppEffectCommit FX_SPO2_FADE_IN; +[{ + params ["_adjust"]; + GVAR(airwayInjury) ppEffectAdjust _adjust; + GVAR(airwayInjury) ppEffectCommit FX_SPO2_FADE_OUT; +}, [_delayedAdjust], FX_SPO2_FADE_IN] call CBA_fnc_waitAndExecute; diff --git a/addons/feedback/functions/fnc_effectAirwaysColor.sqf b/addons/feedback/functions/fnc_effectAirwaysColor.sqf new file mode 100644 index 000000000..9e9c3994d --- /dev/null +++ b/addons/feedback/functions/fnc_effectAirwaysColor.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda, Digii + * Modified by MiszczuZPolski + * Triggers the low SPO2 visual effect. + * +* Arguments: + * 0: Enable + * 1: Intensity + * + * Return Value: + * None + * + * Example: + * [true, 0.5] call kat_feedback_fnc_effectairwayInjury; + * + * Public: No + */ + +params ["_enable", "_enabled", "_intensity"]; +if ((!_enable) || (!_enabled)) exitWith { + GVAR(airwayInjuryColor) ppEffectEnable false; + ACE_player setVariable [QGVAR(airwayInjuryColorTime), 0]; +}; +private _time = ACE_player getVariable [QGVAR(airwayInjuryColorTime), 0]; +if (_time == 0) then { + ACE_player setVariable [QGVAR(airwayInjuryColorTime), CBA_missionTime]; +}; + +GVAR(airwayInjuryColor) ppEffectEnable true; +GVAR(airwayInjuryColor) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1 - _intensity], [0.2, 0.2, 0.2, 0]]; +GVAR(airwayInjuryColor) ppEffectCommit 1; \ No newline at end of file diff --git a/addons/feedback/functions/fnc_effectBreathingGasp.sqf b/addons/feedback/functions/fnc_effectBreathingGasp.sqf new file mode 100644 index 000000000..d19f72aab --- /dev/null +++ b/addons/feedback/functions/fnc_effectBreathingGasp.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Triggers the wheezing effect. + * + * Arguments: + * 0: Enable + * 1: Intensity + * 2: Unit + * + * Return Value: + * None + * + * Example: + * [true, 0.5, player] call kat_feedback_fnc_effectBreathingGasp; + * + * Public: No + */ + +params ["_unit"]; + +private _soundTargets = allPlayers inAreaArray [ASLToAGL getPosASL _unit, 15, 15, 0, false, 15]; +if (_soundTargets isNotEqualTo []) then { + [QEGVAR(breathing,playGasp), [_unit], _soundTargets] call CBA_fnc_targetEvent; +}; + diff --git a/addons/feedback/functions/fnc_effectBreathingWheeze.sqf b/addons/feedback/functions/fnc_effectBreathingWheeze.sqf index ee6841636..c1a3a20ee 100644 --- a/addons/feedback/functions/fnc_effectBreathingWheeze.sqf +++ b/addons/feedback/functions/fnc_effectBreathingWheeze.sqf @@ -33,5 +33,5 @@ if (!(_unit getVariable [QEGVAR(breathing,PneumoBreathCooldownOn), false])) then params["_unit"]; _unit setVariable [QEGVAR(breathing,PneumoBreathCooldownOn), false, true]; }, - [_unit], 20] call CBA_fnc_waitAndExecute; + [_unit], 10] call CBA_fnc_waitAndExecute; }; diff --git a/addons/feedback/functions/fnc_effectConcussion.sqf b/addons/feedback/functions/fnc_effectConcussion.sqf new file mode 100644 index 000000000..dcbe902f8 --- /dev/null +++ b/addons/feedback/functions/fnc_effectConcussion.sqf @@ -0,0 +1,61 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle, MiszczuZPolski + * Triggers the ICP effect. + * +* Arguments: + * 0: Enable + * 1: Current CMR + * + * Return Value: + * None + * + * Example: + * [true, 0.5] call kat_feedback_fnc_effectConcussion; + * + * Public: No + */ + +params ["_enable", "_concussionSeverity"]; + +// Early exit if system is disabled +if (!GVAR(enableBrainEffect)) exitWith {}; +private _concussion = ACE_player getVariable [QEGVAR(brain,concussion), 0]; +// Disable effect if switched off or severity is zero +if (!_enable || (_concussion <= 0)) exitWith { + if (GVAR(ppConcussion) != -1) then { + GVAR(ppConcussion) ppEffectEnable false; + GVAR(ppConcussion) ppEffectAdjust [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; + GVAR(ppConcussion) ppEffectCommit 0; + }; +}; + +// Ensure effect is on +if (GVAR(ppConcussion) != -1) then { + GVAR(ppConcussion) ppEffectEnable true; +}; + +// Scale the severity + +private _ppMult = linearConversion [0, 1, _concussion, 1, 8, true]; + +// Apply the concussion visual effect +GVAR(ppConcussion) ppEffectAdjust [ + 0.51, + 0.2, + 0.2, + 1, + 1, + 1, + 1, + 0.05 * (_ppMult * random [0.6, 1, 1.4]), + 0.01 * (_ppMult * random [0.6, 1, 1.4]), + 0.05 * (_ppMult * random [0.6, 1, 1.4]), + 0.01 * (_ppMult * random [0.6, 1, 1.4]), + 0, + 0, + 0, + 0 +]; + +GVAR(ppConcussion) ppEffectCommit 1; \ No newline at end of file diff --git a/addons/feedback/functions/fnc_effectCoughing.sqf b/addons/feedback/functions/fnc_effectCoughing.sqf deleted file mode 100644 index 343e9fb71..000000000 --- a/addons/feedback/functions/fnc_effectCoughing.sqf +++ /dev/null @@ -1,65 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: MiszczuZPolski & Digii - * Triggers the coughing effect. - * - * Arguments: - * 0: Enable - * 1: Intensity - * 2: Unit - * - * Return Value: - * None - * - * Example: - * [true, 0.5, player] call kat_feedback_fnc_effectCoughing; - * - * Public: No - */ - -params ["_enable", "_poisoned", "_unit"]; -if (!_enable || !_poisoned) exitWith { - if (GVAR(airPoisoning) != -1) then { GVAR(airPoisoning) ppEffectEnable false; }; -}; -if (GVAR(airPoisoning) != -1) then { GVAR(airPoisoning) ppEffectEnable true; }; - -if (!(_unit getVariable [QEGVAR(chemical,CoughCooldown), false])) then { - _unit setVariable [QEGVAR(chemical,CoughCooldown), true, true]; - - private _random = floor (random 4); - switch (_random) do { - case 0: { _unit say3D QEGVAR(chemical,cough_0); }; - case 1: { _unit say3D QEGVAR(chemical,cough_1); }; - case 2: { _unit say3D QEGVAR(chemical,cough_2); }; - case 3: { _unit say3D QEGVAR(chemical,cough_3); }; - }; - - addCamShake [3, 4, 0]; - - [{ - params["_unit"]; - _unit setVariable [QEGVAR(chemical,CoughCooldown), false, true]; - }, - [_unit], 7] call CBA_fnc_waitAndExecute; -}; - -// Trigger effect every 2s -private _showNextTick = missionNamespace getVariable [QGVAR(showCoughNextTick), true]; -GVAR(showCoughNextTick) = !_showNextTick; -if (_showNextTick) exitWith {}; - -private _initialAdjust = []; -private _delayedAdjust = []; - -private _intensity = linearConversion [0, 1, 0.5, 0, 0.06, true]; -_initialAdjust = [_intensity, _intensity, true]; -_delayedAdjust = [_intensity * 0.15, _intensity * 0.15, true]; - -GVAR(airPoisoning) ppEffectAdjust _initialAdjust; -GVAR(airPoisoning) ppEffectCommit FX_COUGH_FADE_IN; - -[{ - params ["_adjust"]; - GVAR(airPoisoning) ppEffectAdjust _adjust; - GVAR(airPoisoning) ppEffectCommit FX_COUGH_FADE_OUT; -}, [_delayedAdjust], 3] call CBA_fnc_waitAndExecute; diff --git a/addons/feedback/functions/fnc_effectLossCMR.sqf b/addons/feedback/functions/fnc_effectLossCMR.sqf new file mode 100644 index 000000000..ddaa9fab5 --- /dev/null +++ b/addons/feedback/functions/fnc_effectLossCMR.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" +/* + * Author: apo_tle, MiszczuZPolski + * Triggers the minor CMR effect, radial blur. + * +* Arguments: + * 0: Enable + * 1: Current CMR + * + * Return Value: + * None + * + * Example: + * [true, 0.5] call kat_feedback_fnc_effectMinorLossCMR; + * + * Public: No + */ + +params ["_enable", "_cmr"]; + +if !GVAR(enableBrainEffect) exitWith {}; +if ((!_enable) || {_cmr > 95}) exitWith { + if (GVAR(minorLossCMR) != -1) then { GVAR(minorLossCMR) ppEffectEnable false; }; +}; +if (GVAR(minorLossCMR) != -1) then { GVAR(minorLossCMR) ppEffectEnable true; }; +// Trigger effect every 2s +private _showNextTick = missionNamespace getVariable [QGVAR(showBrainNextTick), true]; +GVAR(showBrainNextTick) = !_showNextTick; +if (_showNextTick) exitWith {}; + +private _initialAdjust = []; +private _delayedAdjust = []; +private _adjust = 95 - _cmr; +private _adjustment = 0.1 * linearConversion [0, 95, _adjust, 1, 5, true]; +_initialAdjust = [_adjustment]; +_delayedAdjust = [0]; + +GVAR(minorLossCMR) ppEffectAdjust _initialAdjust; +GVAR(minorLossCMR) ppEffectCommit FX_MINOR_CMR_FADE_IN; +[{ + params ["_delayedAdjust"]; + GVAR(minorLossCMR) ppEffectAdjust _delayedAdjust; + GVAR(minorLossCMR) ppEffectCommit FX_MINOR_CMR_FADE_OUT; +}, [_delayedAdjust], FX_MINOR_CMR_FADE_IN] call CBA_fnc_waitAndExecute; diff --git a/addons/feedback/functions/fnc_handleEffects.sqf b/addons/feedback/functions/fnc_handleEffects.sqf index 353c9b04e..4c6e2e9d4 100644 --- a/addons/feedback/functions/fnc_handleEffects.sqf +++ b/addons/feedback/functions/fnc_handleEffects.sqf @@ -21,6 +21,8 @@ if (ACEGVAR(common,OldIsCamera) || {!alive ACE_player}) exitWith { [false] call FUNC(effectLowSpO2); [false] call FUNC(effectHurtEye); [false] call FUNC(effectEyeInjury); + [false] call FUNC(effectLossCMR); + [false] call FUNC(effectConcussion); }; BEGIN_COUNTER(handleEffects); @@ -29,25 +31,50 @@ BEGIN_COUNTER(handleEffects); private _opioid = GET_PP(ACE_player); private _spO2 = GET_KAT_SPO2(ACE_player); private _unconscious = IS_UNCONSCIOUS(ACE_player); -private _poisoned = IS_AIRPOISONED(ACE_player); -private _tear = IN_TEARGAS(ACE_player); -private _wheeze = ((ACE_player getVariable [QGVAR(pneumothorax), 0] > 0) || ACE_player getVariable [QGVAR(hemopneumothorax), false] || ACE_player getVariable [QGVAR(tensionpneumothorax), false] || ACE_player getVariable [QEGVAR(chemical,airPoisoning), false]); +private _pneumo = ACE_player getVariable [QEGVAR(breathing,pneumothorax), [0,0]]; +private _tensionPneumo = ACE_player getVariable [QEGVAR(breathing,tensionpneumothorax), [false,false]]; +private _hemoPneumo = ACE_player getVariable [QEGVAR(breathing,hemopneumothorax), [0,0]]; +private _lungSurface = ACE_player getVariable [QEGVAR(breathing,lungSurfaceArea), 400]; +private _pL = _pneumo select 0; +private _pR = _pneumo select 1; +private _tL = _tensionPneumo select 0; +private _tR = _tensionPneumo select 1; +private _hL = _hemoPneumo select 0; +private _hR = _hemoPneumo select 1; +private _wheeze = ( + _pL > 0.2 || + _pR > 0.2 || + _tL || + _tR || + _hL > 0.2 || + _hR > 0.2 || + _lungSurface < 350 +); private _eyeInjurySeverity = GET_DUST_INJURY(ACE_player); private _eyeInjuries = GET_EYE_INJURIES(ACE_player); - +private _cmr = GET_CMR(ACE_player); +[!_unconscious] call FUNC(effectConcussion); +private _airwayState = HAS_AIRWAY(ACE_player); // - Visual effects ----------------------------------------------------------- - [!_unconscious, _opioid] call FUNC(effectOpioid); - +private _spo2Die = EGVAR(breathing,SpO2_dieValue); [ !_unconscious, - linearConversion [GVAR(effectLowSpO2), EGVAR(breathing,SpO2_dieValue), _spO2, 0, 1, true] + linearConversion [90, _spo2Die, _spO2, 0, 1, true] ] call FUNC(effectLowSpO2); - -[!_unconscious, _poisoned, ACE_player] call FUNC(effectCoughing); -[!_unconscious, _tear] call FUNC(effectTearHaze); -[!_unconscious, _wheeze, ACE_player] call (effectBreathingWheeze); +[!_unconscious, !_airwayState] call FUNC(effectAirways); +private _time = ACE_player getVariable [QGVAR(airwayInjuryColorTime), 0]; +private _intensity = 0; +private _timeFixed = 0; +if (_time != 0) then { + _timeFixed = CBA_missionTime - _time; +}; +[!_unconscious, !_airwayState, linearConversion [0, 20, _timeFixed, 0, 1, true]] call FUNC(effectAirwaysColor); +[!_unconscious, _wheeze, ACE_player] call FUNC(effectBreathingWheeze); [!_unconscious, _eyeInjurySeverity] call FUNC(effectEyeInjury); [!_unconscious, _eyeInjuries, _manualUpdate] call FUNC(effectHurtEye); +[!_unconscious, _cmr] call FUNC(effectLossCMR); + + END_COUNTER(handleEffects); diff --git a/addons/feedback/functions/fnc_initEffects.sqf b/addons/feedback/functions/fnc_initEffects.sqf index 399a76699..e5a3f4f13 100644 --- a/addons/feedback/functions/fnc_initEffects.sqf +++ b/addons/feedback/functions/fnc_initEffects.sqf @@ -46,20 +46,16 @@ GVAR(lowSpO2) = [ [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0.33, 0.33, 0.33, 0], [0.55, 0.5, 0, 0, 0, 0, 4]] ] call _fnc_createEffect; -GVAR(airPoisoning) = [ - "ChromAberration", - 213703, - [0, 0, true] +GVAR(airwayInjury) = [ + "ColorCorrections", + 213702, + [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0.33, 0.33, 0.33, 0], [0.55, 0.5, 0, 0, 0, 0, 4]] ] call _fnc_createEffect; -GVAR(tearHaze) = [ - "WetDistortion", - 213704, - [1, - 1, 1, - 4.10, 3.70, 2.50, 1.85, - 0.0054, 0.0041, 0.0090, 0.0070, - 0.5, 0.3, 10.0, 6.0] +GVAR(airwayInjuryColor) = [ + "ColorCorrections", + 213703, + [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [0.2, 0.2, 0.2, 0]] ] call _fnc_createEffect; // - Eye Injury ----------------------------------------------------------- @@ -67,4 +63,18 @@ GVAR(ppBlurBlink) = [ "DynamicBlur", 213706, [1] +] call _fnc_createEffect; + +// - Low CMR (brain addon) --------------------------------------------- +GVAR(minorLossCMR) = [ + "DynamicBlur", + 213712, + [0] +] call _fnc_createEffect; + + +GVAR(ppConcussion) = [ + "WetDistortion", + 213711, + [0.51,0.2,0.2,1,1,1,1,0.05,0.01,0.05,0.01,0.1,0.1,0.2,0.2] ] call _fnc_createEffect; \ No newline at end of file diff --git a/addons/feedback/initSettings.inc.sqf b/addons/feedback/initSettings.inc.sqf index 3cad96c68..a9e9c64c6 100644 --- a/addons/feedback/initSettings.inc.sqf +++ b/addons/feedback/initSettings.inc.sqf @@ -16,4 +16,13 @@ CBA_SETTINGS_CAT, [true], true -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting; + +[ + QGVAR(effectOverdose), + "CHECKBOX", + [LLSTRING(SETTING_effectOverdose_display), LLSTRING(SETTING_effectOverdose_DESC)], + CBA_SETTINGS_CAT, + [true], + true +] call CBA_fnc_addSetting; diff --git a/addons/feedback/script_component.hpp b/addons/feedback/script_component.hpp index dd25742a1..a3af4d4e4 100644 --- a/addons/feedback/script_component.hpp +++ b/addons/feedback/script_component.hpp @@ -24,3 +24,5 @@ #define FX_COUGH_FADE_IN 0.3 #define FX_COUGH_FADE_OUT 0.7 +#define FX_MINOR_CMR_FADE_IN 0.5 +#define FX_MINOR_CMR_FADE_OUT 1.8 diff --git a/addons/feedback/stringtable.xml b/addons/feedback/stringtable.xml index 91c2331d7..7b58aca66 100644 --- a/addons/feedback/stringtable.xml +++ b/addons/feedback/stringtable.xml @@ -60,5 +60,17 @@ KAT - ADV Medical: Feedback KAM - フィードバック + + Enable Overdose effects + + + Enables Overdose effects on certain medications + + + Enable Brain Injury Effects + + + Enables Brain Injury Effects + diff --git a/addons/gui/CfgFunctions.hpp b/addons/gui/CfgFunctions.hpp index a9e6c4cd1..f8c9f7b59 100644 --- a/addons/gui/CfgFunctions.hpp +++ b/addons/gui/CfgFunctions.hpp @@ -2,6 +2,12 @@ class CfgFunctions { class overwrite_medical_gui { tag = "ace_medical_gui"; class ace_medical_gui { + class addTreatmentActions { + file = QPATHTOF(functions\fnc_addTreatmentActions.sqf); + }; + class collectActions { + file = QPATHTOF(functions\fnc_collectActions.sqf); + }; class menuPFH { file = QPATHTOF(functions\fnc_menuPFH.sqf); }; @@ -20,6 +26,9 @@ class CfgFunctions { class updateBodyImage { file = QPATHTOF(functions\fnc_updateBodyImage.sqf); }; + class displayPatientInformation { + file = QPATHTOF(functions\fnc_displayPatientInformation.sqf); + }; }; }; }; diff --git a/addons/gui/CfgVehicles.hpp b/addons/gui/CfgVehicles.hpp new file mode 100644 index 000000000..c37cefec1 --- /dev/null +++ b/addons/gui/CfgVehicles.hpp @@ -0,0 +1,107 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_Actions { + class ACE_Torso { + displayName = CSTRING(Torso); + selection = "spine1"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_Chest { + displayName = CSTRING(Chest); + selection = "spine3"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_Head { + displayName = CSTRING(Head); + selection = "pilot"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_Neck { + displayName = CSTRING(Neck); + selection = "Neck"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_ArmLeft { + displayName = CSTRING(LeftArm); + selection = "LWrist"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_ArmUpperLeft { + displayName = CSTRING(UpperLeftArm); + selection = "LeftForeArm"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_ArmRight { + displayName = CSTRING(RightArm); + selection = "RWrist"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_ArmUpperRight { + displayName = CSTRING(UpperRightArm); + selection = "RightForeArm"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_LegLeft { + displayName = CSTRING(LeftLeg); + selection = "LeftFoot"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_LegUpperLeft { + displayName = CSTRING(UpperLeftLeg); + selection = "LKnee"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_LegRight { + displayName = CSTRING(RightLeg); + selection = "RightFoot"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + class ACE_LegUpperRight { + displayName = CSTRING(UpperRightLeg); + selection = "RKnee"; + distance = 1.5; + condition = ""; + statement = ""; + exceptions[] = {"isNotSwimming"}; + }; + }; + class ACE_SelfActions { + class ACE_Medical { + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/gui/XEH_PREP.hpp b/addons/gui/XEH_PREP.hpp index 6f9422561..d2764babd 100644 --- a/addons/gui/XEH_PREP.hpp +++ b/addons/gui/XEH_PREP.hpp @@ -1,13 +1,23 @@ +PREP(addTreatmentActions); +PREP(closeSyringeMenu); +PREP(collectActions); +PREP(displayPatientInformation); PREP(dumpBloodGas); PREP(handleABGShow); PREP(handleIVAdjust); PREP(handleIVShow); PREP(logListAppended); PREP(menuPFH); +PREP(modifyAction); PREP(onMenuClose); PREP(onMenuOpen); +PREP(openSyringeMenu); +PREP(prepSyringe); PREP(updateABGStatus); PREP(updateBodyImage); PREP(updateCategories); +PREP(updateDoses); +PREP(updateIVStatus); PREP(updateInjuryList); -PREP(updateIVStatus); \ No newline at end of file +PREP(updateMedications); +PREP(updateSyringes); \ No newline at end of file diff --git a/addons/gui/config.cpp b/addons/gui/config.cpp index e073902f6..5d6d9a2c1 100644 --- a/addons/gui/config.cpp +++ b/addons/gui/config.cpp @@ -33,3 +33,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgFunctions.hpp" #include "gui.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/gui/data/body_image/Crike.paa b/addons/gui/data/body_image/Crike.paa new file mode 100644 index 000000000..ef653f915 Binary files /dev/null and b/addons/gui/data/body_image/Crike.paa differ diff --git a/addons/gui/data/body_image/EJV.paa b/addons/gui/data/body_image/EJV.paa new file mode 100644 index 000000000..701f04bb2 Binary files /dev/null and b/addons/gui/data/body_image/EJV.paa differ diff --git a/addons/gui/data/body_image/EZIOLLL.paa b/addons/gui/data/body_image/EZIOLLL.paa new file mode 100644 index 000000000..5565ba3b4 Binary files /dev/null and b/addons/gui/data/body_image/EZIOLLL.paa differ diff --git a/addons/gui/data/body_image/EZIOLRL.paa b/addons/gui/data/body_image/EZIOLRL.paa new file mode 100644 index 000000000..8862ecd59 Binary files /dev/null and b/addons/gui/data/body_image/EZIOLRL.paa differ diff --git a/addons/gui/data/body_image/EZIOULA.paa b/addons/gui/data/body_image/EZIOULA.paa new file mode 100644 index 000000000..75f50df80 Binary files /dev/null and b/addons/gui/data/body_image/EZIOULA.paa differ diff --git a/addons/gui/data/body_image/EZIOURA.paa b/addons/gui/data/body_image/EZIOURA.paa new file mode 100644 index 000000000..95a72ec14 Binary files /dev/null and b/addons/gui/data/body_image/EZIOURA.paa differ diff --git a/addons/gui/data/body_image/NPA.paa b/addons/gui/data/body_image/NPA.paa new file mode 100644 index 000000000..344672f3b Binary files /dev/null and b/addons/gui/data/body_image/NPA.paa differ diff --git a/addons/gui/data/body_image/arm_left.paa b/addons/gui/data/body_image/arm_left.paa new file mode 100644 index 000000000..42802c8ae Binary files /dev/null and b/addons/gui/data/body_image/arm_left.paa differ diff --git a/addons/gui/data/body_image/arm_left_b.paa b/addons/gui/data/body_image/arm_left_b.paa new file mode 100644 index 000000000..232cf38e7 Binary files /dev/null and b/addons/gui/data/body_image/arm_left_b.paa differ diff --git a/addons/gui/data/body_image/arm_left_s.paa b/addons/gui/data/body_image/arm_left_s.paa new file mode 100644 index 000000000..f7e4d01b4 Binary files /dev/null and b/addons/gui/data/body_image/arm_left_s.paa differ diff --git a/addons/gui/data/body_image/arm_left_t.paa b/addons/gui/data/body_image/arm_left_t.paa new file mode 100644 index 000000000..6ff23f9f5 Binary files /dev/null and b/addons/gui/data/body_image/arm_left_t.paa differ diff --git a/addons/gui/data/body_image/arm_lower_left_t.paa b/addons/gui/data/body_image/arm_lower_left_t.paa new file mode 100644 index 000000000..f2918488a Binary files /dev/null and b/addons/gui/data/body_image/arm_lower_left_t.paa differ diff --git a/addons/gui/data/body_image/arm_lower_right_t.paa b/addons/gui/data/body_image/arm_lower_right_t.paa new file mode 100644 index 000000000..845556254 Binary files /dev/null and b/addons/gui/data/body_image/arm_lower_right_t.paa differ diff --git a/addons/gui/data/body_image/arm_right.paa b/addons/gui/data/body_image/arm_right.paa new file mode 100644 index 000000000..deeb20ecc Binary files /dev/null and b/addons/gui/data/body_image/arm_right.paa differ diff --git a/addons/gui/data/body_image/arm_right_b.paa b/addons/gui/data/body_image/arm_right_b.paa new file mode 100644 index 000000000..2535aa2a9 Binary files /dev/null and b/addons/gui/data/body_image/arm_right_b.paa differ diff --git a/addons/gui/data/body_image/arm_right_s.paa b/addons/gui/data/body_image/arm_right_s.paa new file mode 100644 index 000000000..fb7861926 Binary files /dev/null and b/addons/gui/data/body_image/arm_right_s.paa differ diff --git a/addons/gui/data/body_image/arm_right_t.paa b/addons/gui/data/body_image/arm_right_t.paa new file mode 100644 index 000000000..ef1d42335 Binary files /dev/null and b/addons/gui/data/body_image/arm_right_t.paa differ diff --git a/addons/gui/data/body_image/arm_upper_left.paa b/addons/gui/data/body_image/arm_upper_left.paa new file mode 100644 index 000000000..6c4f147b2 Binary files /dev/null and b/addons/gui/data/body_image/arm_upper_left.paa differ diff --git a/addons/gui/data/body_image/arm_upper_left_b.paa b/addons/gui/data/body_image/arm_upper_left_b.paa new file mode 100644 index 000000000..dfa8516f7 Binary files /dev/null and b/addons/gui/data/body_image/arm_upper_left_b.paa differ diff --git a/addons/gui/data/body_image/arm_upper_left_s.paa b/addons/gui/data/body_image/arm_upper_left_s.paa new file mode 100644 index 000000000..95e3eb560 Binary files /dev/null and b/addons/gui/data/body_image/arm_upper_left_s.paa differ diff --git a/addons/gui/data/body_image/arm_upper_right.paa b/addons/gui/data/body_image/arm_upper_right.paa new file mode 100644 index 000000000..36e713b03 Binary files /dev/null and b/addons/gui/data/body_image/arm_upper_right.paa differ diff --git a/addons/gui/data/body_image/arm_upper_right_b.paa b/addons/gui/data/body_image/arm_upper_right_b.paa new file mode 100644 index 000000000..a7d1284e6 Binary files /dev/null and b/addons/gui/data/body_image/arm_upper_right_b.paa differ diff --git a/addons/gui/data/body_image/arm_upper_right_s.paa b/addons/gui/data/body_image/arm_upper_right_s.paa new file mode 100644 index 000000000..59c751826 Binary files /dev/null and b/addons/gui/data/body_image/arm_upper_right_s.paa differ diff --git a/addons/gui/data/body_image/background.paa b/addons/gui/data/body_image/background.paa new file mode 100644 index 000000000..525d9c4b6 Binary files /dev/null and b/addons/gui/data/body_image/background.paa differ diff --git a/addons/gui/data/body_image/chest.paa b/addons/gui/data/body_image/chest.paa new file mode 100644 index 000000000..ac9227436 Binary files /dev/null and b/addons/gui/data/body_image/chest.paa differ diff --git a/addons/gui/data/body_image/chest_s.paa b/addons/gui/data/body_image/chest_s.paa new file mode 100644 index 000000000..d168af58d Binary files /dev/null and b/addons/gui/data/body_image/chest_s.paa differ diff --git a/addons/gui/data/body_image/head.paa b/addons/gui/data/body_image/head.paa new file mode 100644 index 000000000..f3056bc21 Binary files /dev/null and b/addons/gui/data/body_image/head.paa differ diff --git a/addons/gui/data/body_image/head_s.paa b/addons/gui/data/body_image/head_s.paa new file mode 100644 index 000000000..69ac9547f Binary files /dev/null and b/addons/gui/data/body_image/head_s.paa differ diff --git a/addons/gui/data/body_image/leg_left.paa b/addons/gui/data/body_image/leg_left.paa new file mode 100644 index 000000000..8764e2999 Binary files /dev/null and b/addons/gui/data/body_image/leg_left.paa differ diff --git a/addons/gui/data/body_image/leg_left_b.paa b/addons/gui/data/body_image/leg_left_b.paa new file mode 100644 index 000000000..65b5d68fd Binary files /dev/null and b/addons/gui/data/body_image/leg_left_b.paa differ diff --git a/addons/gui/data/body_image/leg_left_s.paa b/addons/gui/data/body_image/leg_left_s.paa new file mode 100644 index 000000000..9350ef489 Binary files /dev/null and b/addons/gui/data/body_image/leg_left_s.paa differ diff --git a/addons/gui/data/body_image/leg_left_t.paa b/addons/gui/data/body_image/leg_left_t.paa new file mode 100644 index 000000000..111426a00 Binary files /dev/null and b/addons/gui/data/body_image/leg_left_t.paa differ diff --git a/addons/gui/data/body_image/leg_lower_left_t.paa b/addons/gui/data/body_image/leg_lower_left_t.paa new file mode 100644 index 000000000..aa274f284 Binary files /dev/null and b/addons/gui/data/body_image/leg_lower_left_t.paa differ diff --git a/addons/gui/data/body_image/leg_lower_right_t.paa b/addons/gui/data/body_image/leg_lower_right_t.paa new file mode 100644 index 000000000..2894ddf80 Binary files /dev/null and b/addons/gui/data/body_image/leg_lower_right_t.paa differ diff --git a/addons/gui/data/body_image/leg_right.paa b/addons/gui/data/body_image/leg_right.paa new file mode 100644 index 000000000..f27d8aeff Binary files /dev/null and b/addons/gui/data/body_image/leg_right.paa differ diff --git a/addons/gui/data/body_image/leg_right_b.paa b/addons/gui/data/body_image/leg_right_b.paa new file mode 100644 index 000000000..00cc8c458 Binary files /dev/null and b/addons/gui/data/body_image/leg_right_b.paa differ diff --git a/addons/gui/data/body_image/leg_right_s.paa b/addons/gui/data/body_image/leg_right_s.paa new file mode 100644 index 000000000..47000de78 Binary files /dev/null and b/addons/gui/data/body_image/leg_right_s.paa differ diff --git a/addons/gui/data/body_image/leg_right_t.paa b/addons/gui/data/body_image/leg_right_t.paa new file mode 100644 index 000000000..18d5bdcbd Binary files /dev/null and b/addons/gui/data/body_image/leg_right_t.paa differ diff --git a/addons/gui/data/body_image/leg_upper_left.paa b/addons/gui/data/body_image/leg_upper_left.paa new file mode 100644 index 000000000..d05550684 Binary files /dev/null and b/addons/gui/data/body_image/leg_upper_left.paa differ diff --git a/addons/gui/data/body_image/leg_upper_left_b.paa b/addons/gui/data/body_image/leg_upper_left_b.paa new file mode 100644 index 000000000..3a8cd9e1a Binary files /dev/null and b/addons/gui/data/body_image/leg_upper_left_b.paa differ diff --git a/addons/gui/data/body_image/leg_upper_left_s.paa b/addons/gui/data/body_image/leg_upper_left_s.paa new file mode 100644 index 000000000..86930c689 Binary files /dev/null and b/addons/gui/data/body_image/leg_upper_left_s.paa differ diff --git a/addons/gui/data/body_image/leg_upper_right.paa b/addons/gui/data/body_image/leg_upper_right.paa new file mode 100644 index 000000000..bc513a1b4 Binary files /dev/null and b/addons/gui/data/body_image/leg_upper_right.paa differ diff --git a/addons/gui/data/body_image/leg_upper_right_b.paa b/addons/gui/data/body_image/leg_upper_right_b.paa new file mode 100644 index 000000000..eb1bc61a6 Binary files /dev/null and b/addons/gui/data/body_image/leg_upper_right_b.paa differ diff --git a/addons/gui/data/body_image/leg_upper_right_s.paa b/addons/gui/data/body_image/leg_upper_right_s.paa new file mode 100644 index 000000000..0b6ba7c01 Binary files /dev/null and b/addons/gui/data/body_image/leg_upper_right_s.paa differ diff --git a/addons/gui/data/body_image/neck.paa b/addons/gui/data/body_image/neck.paa new file mode 100644 index 000000000..09b0be46e Binary files /dev/null and b/addons/gui/data/body_image/neck.paa differ diff --git a/addons/gui/data/body_image/neck_s.paa b/addons/gui/data/body_image/neck_s.paa new file mode 100644 index 000000000..46b758c2c Binary files /dev/null and b/addons/gui/data/body_image/neck_s.paa differ diff --git a/addons/gui/data/body_image/torso.paa b/addons/gui/data/body_image/torso.paa new file mode 100644 index 000000000..666d0cc21 Binary files /dev/null and b/addons/gui/data/body_image/torso.paa differ diff --git a/addons/gui/data/body_image/torso_evisceration.paa b/addons/gui/data/body_image/torso_evisceration.paa new file mode 100644 index 000000000..b3a05b79c Binary files /dev/null and b/addons/gui/data/body_image/torso_evisceration.paa differ diff --git a/addons/gui/data/body_image/torso_rightchestseal.paa b/addons/gui/data/body_image/torso_rightchestseal.paa new file mode 100644 index 000000000..4d6c3c11c Binary files /dev/null and b/addons/gui/data/body_image/torso_rightchestseal.paa differ diff --git a/addons/gui/data/body_image/torso_rightpneumothorax.paa b/addons/gui/data/body_image/torso_rightpneumothorax.paa new file mode 100644 index 000000000..072f45e60 Binary files /dev/null and b/addons/gui/data/body_image/torso_rightpneumothorax.paa differ diff --git a/addons/gui/data/body_image/torso_s.paa b/addons/gui/data/body_image/torso_s.paa new file mode 100644 index 000000000..dac714528 Binary files /dev/null and b/addons/gui/data/body_image/torso_s.paa differ diff --git a/addons/gui/data/body_image/torso_woundPack.paa b/addons/gui/data/body_image/torso_woundPack.paa new file mode 100644 index 000000000..04d0ce915 Binary files /dev/null and b/addons/gui/data/body_image/torso_woundPack.paa differ diff --git a/addons/gui/data/body_image/torso_woundPack_Vacuum.paa b/addons/gui/data/body_image/torso_woundPack_Vacuum.paa new file mode 100644 index 000000000..1aa707e57 Binary files /dev/null and b/addons/gui/data/body_image/torso_woundPack_Vacuum.paa differ diff --git a/addons/gui/functions/fnc_addTreatmentActions.sqf b/addons/gui/functions/fnc_addTreatmentActions.sqf new file mode 100644 index 000000000..7536c7dd2 --- /dev/null +++ b/addons/gui/functions/fnc_addTreatmentActions.sqf @@ -0,0 +1,67 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, mharis001 + * Creates actions for treatments from config and adds them to the interaction menu. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_gui_fnc_addTreatmentActions + * + * Public: No + */ + +private _actionsConfig = configFile >> QACEGVAR(medical_treatment,actions); +private _actionPaths = ["ACE_Head", "ACE_Neck", "ACE_Torso", "ACE_Chest", "ACE_ArmLeft", "ACE_ArmUpperLeft", "ACE_ArmRight", "ACE_ArmUpperRight", "ACE_LegLeft", "ACE_LegUpperLeft", "ACE_LegRight", "ACE_LegUpperRight"]; + +private _fnc_statement = { + params ["_target", "_player", "_args"]; + _args params ["_bodyPart", "_treatmentName"]; + [_player, _target, _bodyPart, _treatmentName] call ACEFUNC(medical_treatment,treatment); +}; + +private _fnc_condition = { + params ["_target", "_player", "_args"]; + _args params ["_bodyPart", "_treatmentName"]; + [_player, _target, _bodyPart, _treatmentName] call ACEFUNC(medical_treatment,canTreatCached); +}; + +{ + private _configName = configName _x; + private _actionName = format [QACEGVAR(medical_gui,_%1), _configName]; + private _displayName = getText (_x >> "displayName"); + private _icon = getText (_x >> "icon"); + + private _allowedBodyParts = getArray (_x >> "allowedSelections") apply {toLowerANSI _x}; + if (_allowedBodyParts isEqualTo ["all"]) then { + _allowedBodyParts = ALL_BODY_PARTS apply {toLowerANSI _x}; + }; + private _removeFromInteractions = getText (_x >> "removeFromInteractions");; + if (_removeFromInteractions isEqualTo "true") exitWith {}; + + { + private _bodyPart = _x; + private _actionPath = _actionPaths select (ALL_BODY_PARTS find toLowerANSI _bodyPart); + + private _action = [ + _actionName, + _displayName, + _icon, + _fnc_statement, + _fnc_condition, + {}, + [_bodyPart, _configName], + {[0, 0, 0]}, + 2, + [false, true, false, false, false] + ] call ACEFUNC(interact_menu,createAction); + + ["CAManBase", 0, [_actionPath], _action, true] call ACEFUNC(interact_menu,addActionToClass); + ["CAManBase", 0, ["ACE_MainActions", "ACE_Medical_Radial", _actionPath], _action, true] call ACEFUNC(interact_menu,addActionToClass); + ACEGVAR(medical_gui,selfInteractionActions) pushBack ["", 1, ["ACE_SelfActions", "ACE_Medical", _actionPath], _action]; + } forEach _allowedBodyParts; +} forEach configProperties [_actionsConfig, "isClass _x"]; \ No newline at end of file diff --git a/addons/gui/functions/fnc_closeSyringeMenu.sqf b/addons/gui/functions/fnc_closeSyringeMenu.sqf new file mode 100644 index 000000000..1a3bb15dd --- /dev/null +++ b/addons/gui/functions/fnc_closeSyringeMenu.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * closes the syringe menu + * + * Arguments: + * none + * + * Return Value: + * None + * + * Example: + * [] call kat_medical_gui_fnc_closeSyringeMenu; + * + * Public: No + */ +[{ACEGVAR(medical_gui,target) setVariable ["kat_SyringeMenu", false, true]; +ctrlShow [71300, false]; +ctrlShow [71301, false]; +ctrlShow [71311, false]; +ctrlShow [71310, true];}, []] call CBA_fnc_execNextFrame; \ No newline at end of file diff --git a/addons/gui/functions/fnc_collectActions.sqf b/addons/gui/functions/fnc_collectActions.sqf new file mode 100644 index 000000000..8fba03a38 --- /dev/null +++ b/addons/gui/functions/fnc_collectActions.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001 + * Collect treatment actions for medical menu from config. + * Adds dragging actions if it exists. + * + * Arguments: + * None + * + * Return Value: + * None ACEGVAR(medical_gui,pendingReopen) + * + * Example: + * [] call ace_medical_gui_fnc_collectActions + * + * Public: No + */ + +ACEGVAR(medical_gui,actions) = []; + +{ + private _configName = configName _x; + private _displayName = getText (_x >> "displayName"); + private _category = getText (_x >> "category"); + private _condition = compile format [QUOTE([ARR_4(ACE_player,ACEGVAR(medical_gui,target),%1 select ACEGVAR(medical_gui,selectedBodyPart),'%2')] call ACEFUNC(medical_treatment,canTreatCached)), ALL_BODY_PARTS, _configName]; + private _statement = compile format [QUOTE([ARR_4(ACE_player,ACEGVAR(medical_gui,target),%1 select ACEGVAR(medical_gui,selectedBodyPart),'%2')] call ACEFUNC(medical_treatment,treatment)), ALL_BODY_PARTS, _configName]; + private _items = getArray (_x >> "items"); + + ACEGVAR(medical_gui,actions) pushBack [_displayName, _category, _condition, _statement, _items]; +} forEach configProperties [configFile >> QACEGVAR(medical_treatment,actions), "isClass _x"]; + + +if ("ace_dragging" call ACEFUNC(common,isModLoaded)) then { + ACEGVAR(medical_gui,actions) pushBack [ + localize ACELSTRING(dragging,drag), "drag", + {ACE_player != ACEGVAR(medical_gui,target) && {[ACE_player, ACEGVAR(medical_gui,target)] call ACEFUNC(dragging,canDrag)}}, + { + ACEGVAR(medical_gui,pendingReopen) = false; + [ACE_player, ACEGVAR(medical_gui,target)] call ACEFUNC(dragging,startDrag); + } + ]; + + ACEGVAR(medical_gui,actions) pushBack [ + localize ACELSTRING(dragging,carry), "drag", + {ACE_player != ACEGVAR(medical_gui,target) && {[ACE_player, ACEGVAR(medical_gui,target)] call ACEFUNC(dragging,canCarry)}}, + { + ACEGVAR(medical_gui,pendingReopen) = false; + [ACE_player, ACEGVAR(medical_gui,target)] call ACEFUNC(dragging,startCarry); + } + ]; +}; \ No newline at end of file diff --git a/addons/gui/functions/fnc_displayPatientInformation.sqf b/addons/gui/functions/fnc_displayPatientInformation.sqf new file mode 100644 index 000000000..944cc17a5 --- /dev/null +++ b/addons/gui/functions/fnc_displayPatientInformation.sqf @@ -0,0 +1,64 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001 + * Opens the patient information display for given target. + * + * Arguments: + * 0: Target + * 1: Body part + * + * Return Value: + * None + * + * Example: + * [_target, 0] call ace_medical_gui_fnc_displayPatientInformation + * + * Public: No + */ + +#define MAX_DISTANCE 4 + +params ["_target", ["_selectionN", -1]]; + +private _display = uiNamespace getVariable [QACEGVAR(medical_gui,RscPatientInfo), displayNull]; + +if (isNull _display) then { + QACEGVAR(medical_gui,RscPatientInfo) cutRsc [QACEGVAR(medical_gui,RscPatientInfo), "PLAIN", -1, false]; + _display = uiNamespace getVariable [QACEGVAR(medical_gui,RscPatientInfo), displayNull]; + + [{ + params ["_display", "_pfhID"]; + + if (isNull _display) exitWith { + [_pfhID] call CBA_fnc_removePerFrameHandler; + }; + + private _target = _display getVariable [QACEGVAR(medical_gui,target), objNull]; + private _selectionN = _display getVariable [QACEGVAR(medical_gui,selectionN), -1]; + // Close display if target moved too far away (ignore if in same vehicle) + if (ACE_player distance _target > MAX_DISTANCE && {vehicle _target != vehicle ACE_player}) exitWith { + [_pfhID] call CBA_fnc_removePerFrameHandler; + QACEGVAR(medical_gui,RscPatientInfo) cutFadeOut 0.3; + if (((getPosATL _target) # 2) < -9) exitWith {}; // handle dragging corpse/clone + [[ACELSTRING(medical,DistanceToFar), _target call ACEFUNC(common,getName)], 2] call ACEFUNC(common,displayTextStructured); + }; + // Update body image + private _ctrlBodyImage = _display displayCtrl IDC_BODY_GROUP; + [_ctrlBodyImage, _target, _selectionN] call FUNC(updateBodyImage); + + // Update injury list + private _ctrlInjuries = _display displayCtrl IDC_INJURIES; + [_ctrlInjuries, _target, _selectionN] call FUNC(updateInjuryList); + + // Update activity log + private _ctrlActivityLog = _display displayCtrl IDC_ACTIVITY; + private _activityLog = _target getVariable [MED_LOG_VARNAME("activity"), []]; + [_ctrlActivityLog, _activityLog] call ACEFUNC(medical_gui,updateLogList); + + // Update triage status + [_display, _target] call ACEFUNC(medical_gui,updateTriageStatus); + }, 0, _display] call CBA_fnc_addPerFrameHandler; +}; + +_display setVariable [QACEGVAR(medical_gui,target), _target]; +_display setVariable [QACEGVAR(medical_gui,selectionN), _selectionN]; \ No newline at end of file diff --git a/addons/gui/functions/fnc_dumpBloodGas.sqf b/addons/gui/functions/fnc_dumpBloodGas.sqf index a0250af6b..8ce861074 100644 --- a/addons/gui/functions/fnc_dumpBloodGas.sqf +++ b/addons/gui/functions/fnc_dumpBloodGas.sqf @@ -17,4 +17,4 @@ params ["_target"]; - _target setVariable [QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0], true]; \ No newline at end of file + _target setVariable [QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0,0], true]; \ No newline at end of file diff --git a/addons/gui/functions/fnc_handleIVAdjust.sqf b/addons/gui/functions/fnc_handleIVAdjust.sqf index 5bc50112c..2ce5f8dc6 100644 --- a/addons/gui/functions/fnc_handleIVAdjust.sqf +++ b/addons/gui/functions/fnc_handleIVAdjust.sqf @@ -17,9 +17,19 @@ * Public: No */ + params ["_target", "_bodyPartN", "_adjust"]; +private _ivFlow = _target getVariable [QEGVAR(pharma,IVFlow), [0,0,0,0,0,0,0,0,0,0,0,0]]; + +private _pairs = [[4,5], [6,7], [8,9], [10,11]]; +private _affectedPair = _pairs findIf { _bodyPartN in _x }; -private _ivFlow = _target getVariable [QEGVAR(pharma,IVFlow),[0,0,0,0,0,0]]; +if (_affectedPair != -1) then { + { + _ivFlow set [_x, ((((_ivFlow select _x) + _adjust) max 0) min 1.5)]; + } forEach (_pairs select _affectedPair); +} else { + _ivFlow set [_bodyPartN, ((((_ivFlow select _bodyPartN) + _adjust) max 0) min 1.5)]; +}; -_ivFlow set [_bodyPartN, ((((_ivFlow select _bodyPartN) + _adjust) max 0) min 1.5)]; _target setVariable [QEGVAR(pharma,IVFlow), _ivFlow, true]; \ No newline at end of file diff --git a/addons/gui/functions/fnc_modifyAction.sqf b/addons/gui/functions/fnc_modifyAction.sqf new file mode 100644 index 000000000..98e00c5ee --- /dev/null +++ b/addons/gui/functions/fnc_modifyAction.sqf @@ -0,0 +1,39 @@ +#include "..\script_component.hpp" +/* + * Author: esteldunedain, kymckay, mharis001 + * Modifies the medical action icons to show blood loss and tourniquets. + * + * Arguments: + * 0: Unit + * 1: Body part + * 2: Action data + * + * Return Value: + * None + * + * Example: + * [_target, "head", _actionData] call ace_medical_gui_fnc_modifyAction + * + * Public: No + */ + +#define COLOR_SCALE ["#ffffff", "#fff1a1", "#ffe075", "#ffcb55", "#ffb73c", "#ffa127", "#ff8815", "#ff6d05", "#ff4b00", "#ff0000"] + +params ["_target", "_bodyPart", "_actionData"]; +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _bloodLossOnBodyPart = 0; + +// Add all bleeding from wounds on selection +{ + _x params ["", "_amountOf", "_bleeding"]; + _bloodLossOnBodyPart = _bloodLossOnBodyPart + (_amountOf * _bleeding); +} forEach (GET_OPEN_WOUNDS(_target) getOrDefault [_bodyPart, []]); + +private _frBL = 0 max (_bloodLossOnBodyPart / BLOOD_LOSS_RED_THRESHOLD) min 1; +private _colorInt = ceil (_frBL * (BLOOD_LOSS_TOTAL_COLORS - 1)); // ceil because any bleeding more than zero shouldn't be white + +if (HAS_TOURNIQUET_APPLIED_ON(_target,_partIndex)) then { + _actionData set [2, format [QACEPATHTOF(medical_gui,ui\cross_t_%1.paa), _colorInt]]; +} else { + _actionData set [2, [QACEPATHTOF(medical_gui,ui\cross.paa), COLOR_SCALE select _colorInt]]; +}; \ No newline at end of file diff --git a/addons/gui/functions/fnc_onMenuOpen.sqf b/addons/gui/functions/fnc_onMenuOpen.sqf index 18398cc1f..bdbb236be 100644 --- a/addons/gui/functions/fnc_onMenuOpen.sqf +++ b/addons/gui/functions/fnc_onMenuOpen.sqf @@ -98,6 +98,8 @@ if (EGVAR(pharma,RequireInsIV) && EGVAR(pharma,IVflowControl)) then { (_display displayCtrl IDC_IV_FLOW_SHOWBUTTON) ctrlShow true; }; +(_display displayCtrl IDC_SYRINGE_OPEN) ctrlShow true; + if (EGVAR(circulation,abgEnable)) then { (_display displayCtrl IDC_TEST_SHOWBUTTON) ctrlShow true; }; @@ -111,3 +113,10 @@ if (ACEGVAR(medical_gui,target) == ACE_player) then { _ctrl ctrlSetText QACEPATHTOF(medical_gui,data\categories\toggle_to_self.paa); _ctrl ctrlSetTooltip ACELLSTRING(medical_gui,ToggleToSelf); }; + +private _syringeMenuStatus = ACEGVAR(medical_gui,target) getVariable ["kat_SyringeMenu", false]; +if (_syringeMenuStatus) then { + [true] call FUNC(openSyringeMenu); +} else { + [] call FUNC(closeSyringeMenu); +}; \ No newline at end of file diff --git a/addons/gui/functions/fnc_openSyringeMenu.sqf b/addons/gui/functions/fnc_openSyringeMenu.sqf new file mode 100644 index 000000000..1e6b1fdaa --- /dev/null +++ b/addons/gui/functions/fnc_openSyringeMenu.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * opens the syringe menu and populates it + * + * Arguments: + * none + * + * Return Value: + * None + * + * Example: + * [] call kat_medical_gui_fnc_openSyringeMenu; + * + * Public: No + */ +params ["_isForced"]; +private _requiredMedicalLevel = missionNamespace getVariable [QEGVAR(pharma,medLvl_PrepSyringe), 2]; +private _isMedic = [ACE_player, _requiredMedicalLevel] call ACEFUNC(common,isMedic); +if (_isMedic || _isForced) then { + [] call FUNC(updateSyringes); +[{[] call FUNC(updateMedications);}, [], 0.1] call CBA_fnc_waitAndExecute; +[{[] call FUNC(updateDoses);}, [], 0.1] call CBA_fnc_waitAndExecute; +[{ACEGVAR(medical_gui,target) setVariable ["kat_SyringeMenu", true, true]; +ctrlShow [71300, true]; +ctrlShow [71301, true]; +ctrlShow [71311, true]; +ctrlShow [71310, false];}, []] call CBA_fnc_execNextFrame; +}; diff --git a/addons/gui/functions/fnc_prepSyringe.sqf b/addons/gui/functions/fnc_prepSyringe.sqf new file mode 100644 index 000000000..f7ab5cbcf --- /dev/null +++ b/addons/gui/functions/fnc_prepSyringe.sqf @@ -0,0 +1,91 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks the medications in the players inventory and then populates the listbox with the medications, + * + * Arguments: + * none + * + * Return Value: + * None + * + * Example: + * [] call kat_medical_gui_fnc_prepSyringe; + * + * Public: No + */ +private _player = ACE_player; +TRACE_1("prepSyringe",_player); +private _requiredMedicalLevel = missionNamespace getVariable [QEGVAR(pharma,medLvl_PrepSyringe), 2]; +private _playerMedicalLevel = [_player, _requiredMedicalLevel] call ACEFUNC(common,isMedic); +TRACE_3("prepSyringe",_player,_requiredMedicalLevel,_playerMedicalLevel); +if !(_playerMedicalLevel) exitWith {}; +private _syringeBox = findDisplay 38580 displayCtrl 71303; +private _medicationBox = findDisplay 38580 displayCtrl 71305; +private _doseCombo = findDisplay 38580 displayCtrl 71307; +private _syringeSelected = lbCurSel _syringeBox; +private _medicationSelected = lbCurSel _medicationBox; +private _doseSelected = lbCurSel _doseCombo; +if (_syringeSelected < 0 || _medicationSelected < 0 || _doseSelected < 0) exitWith { + [LLSTRING(Make_All_Selections), 2, _player, 10] call ACEFUNC(common,displayTextStructured); +}; +private _syringeType = _syringeBox lbData _syringeSelected; +private _medicationType = _medicationBox lbData _medicationSelected; +private _doseType = _doseCombo lbValue _doseSelected; +TRACE_3("prepSyringe1",_syringeType,_medicationType,_doseType); +if (_doseType != 4) then { + private _syringeClassName = format ["kat_syringe_%1_%2_%3", _medicationType, _syringeType, _doseType]; + private _syringeDisplayName = getText (configFile >> "CfgWeapons" >> _syringeClassName >> "displayName"); + private _hasSyringe = isClass (configFile >> "CfgWeapons" >> _syringeClassName); + TRACE_3("prepSyringe2",_syringeDisplayName,_syringeClassName,_hasSyringe); + if (!_hasSyringe) exitWith { + [LLSTRING(No_Syringe_Available), 2, _player, 10] call ACEFUNC(common,displayTextStructured); + }; + [EGVAR(pharma,prepTime_PrepSyringe), + [_medicationType, _syringeType, _doseType], + { + params["_args"]; + _args params ["_medicationType", "_syringeType", "_doseType"]; + TRACE_3("prepSyringe3",_medicationType,_syringeType,_doseType); + [_player, _medicationType, _syringeType, _doseType] call EFUNC(pharma,prepareSyringe); + }, + {TRACE_3("prepSyringe3",_medicationType,_syringeType,_doseType);}, format [LLSTRING(Preparing_Syringe), _syringeDisplayName], {true}, ["isNotInside"] ] call ACEFUNC(common,progressBar); +} else { + if (_syringeType == "salineiv") then { + _syringeClassName = format ["kat_%1Infusion", _medicationType]; + _size = "250"; + private _syringeDisplayName = getText (configFile >> "CfgWeapons" >> _syringeClassName >> "displayName"); + private _hasSyringe = isClass (configFile >> "CfgWeapons" >> _syringeClassName); + TRACE_3("prepSyringe4",_medicationType,_syringeClassName,_size); + if (!_hasSyringe) exitWith { + [LLSTRING(No_Syringe_Available), 2, _player, 10] call ACEFUNC(common,displayTextStructured); + }; + [EGVAR(pharma,prepTime_PrepInfusion), + [_player, _medicationType, _syringeClassName, _size], + { + params["_args"]; + _args params ["_player", "_medicationType", "_syringeClassName", "_size"]; + TRACE_3("prepSyringe5",_medicationType,_syringeClassName,_size); + [_player, _medicationType, _syringeClassName, _size] call EFUNC(pharma,prepareInfusion); + }, + {}, format [LLSTRING(Preparing_Syringe), _syringeDisplayName], {true}, ["isNotInside"] ] call ACEFUNC(common,progressBar); + } else { + _syringeClassName = format ["kat_%1Infusion100", _medicationType]; + _size = "100"; + private _syringeDisplayName = getText (configFile >> "CfgWeapons" >> _syringeClassName >> "displayName"); + private _hasSyringe = isClass (configFile >> "CfgWeapons" >> _syringeClassName); + TRACE_3("prepSyringe4",_medicationType,_syringeClassName,_size); + if (!_hasSyringe) exitWith { + [LLSTRING(No_Syringe_Available), 2, _player, 10] call ACEFUNC(common,displayTextStructured); + }; + [EGVAR(pharma,prepTime_PrepInfusion), + [_player, _medicationType, _syringeClassName, _size], + { + params["_args"]; + _args params ["_player", "_medicationType", "_syringeClassName", "_size"]; + TRACE_3("prepSyringe5",_medicationType,_syringeClassName,_size); + [_player, _medicationType, _syringeClassName, _size] call EFUNC(pharma,prepareInfusion); + }, + {}, format [LLSTRING(Preparing_Syringe), _syringeDisplayName], {true}, ["isNotInside"] ] call ACEFUNC(common,progressBar); + }; +}; diff --git a/addons/gui/functions/fnc_updateABGStatus.sqf b/addons/gui/functions/fnc_updateABGStatus.sqf index b26b63e81..f61ce1dcb 100644 --- a/addons/gui/functions/fnc_updateABGStatus.sqf +++ b/addons/gui/functions/fnc_updateABGStatus.sqf @@ -18,18 +18,16 @@ params ["_target"]; // Get tourniquets, damage, and blood loss for target -private _bloodGasTest = _target getVariable [QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0]]; +private _bloodGasTest = _target getVariable [QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0,0]]; private _activeBlood = 0; private _ABGmenuShow = _target getVariable [QEGVAR(pharma,ABGmenuShow), false]; if (_ABGmenuShow) then { ctrlShow [IDC_ABG_TITLE, true]; ctrlShow [IDC_ABG_BACKGROUND, true]; - ctrlShow [IDC_TEST_RESET, true]; } else { ctrlShow [IDC_ABG_TITLE, false]; ctrlShow [IDC_ABG_BACKGROUND, false]; - ctrlShow [IDC_TEST_RESET, false]; }; { @@ -48,4 +46,4 @@ if (_ABGmenuShow) then { }; }; -} forEach [IDC_TEST_PACO2, IDC_TEST_PAO2, IDC_TEST_SPO2, IDC_TEST_HCO3, IDC_TEST_PH]; +} forEach [IDC_TEST_PACO2, IDC_TEST_PAO2, IDC_TEST_SPO2, IDC_TEST_HCO3, IDC_TEST_PH, IDC_TEST_ETCO2, IDC_TEST_CA]; diff --git a/addons/gui/functions/fnc_updateBodyImage.sqf b/addons/gui/functions/fnc_updateBodyImage.sqf index 604bf9aca..2510b52e6 100644 --- a/addons/gui/functions/fnc_updateBodyImage.sqf +++ b/addons/gui/functions/fnc_updateBodyImage.sqf @@ -18,42 +18,93 @@ */ params ["_ctrlGroup", "_target", "_selectionN"]; +TRACE_3("Params",_ctrlGroup,_target,_selectionN); // Get tourniquets, damage, and blood loss for target private _tourniquets = GET_TOURNIQUETS(_target); private _fractures = GET_FRACTURES(_target); -private _bodyPartDamage = _target getVariable [QACEGVAR(medical,bodyPartDamage), [0, 0, 0, 0, 0, 0]]; +private _bodyPartDamage = GET_BODYPART_DAMAGE(_target); private _damageThreshold = GET_DAMAGE_THRESHOLD(_target); -private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0]; +private _bodyPartBloodLoss = [0,0,0,0,0,0,0,0,0,0,0,0]; private _surgicalBlock = GET_SURGICAL_TOURNIQUETS(_target); +TRACE_5("Medical state", + _tourniquets, + _fractures, + _bodyPartDamage, + _damageThreshold, + _surgicalBlock +); + +// Calculate blood loss per body part { private _partIndex = ALL_BODY_PARTS find _x; + TRACE_2("Open wounds body part",_x,_partIndex); + { - _x params ["", "_amountOf", "_bleeding"]; - _bodyPartBloodLoss set [_partIndex, (_bodyPartBloodLoss select _partIndex) + (_bleeding * _amountOf)]; + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + TRACE_4("Wound", + _woundClassID, + _className, + _amountOf, + _bleeding + ); + + if !(_className in ["InternalBleeding"]) then { + _bodyPartBloodLoss set [ + _partIndex, + (_bodyPartBloodLoss select _partIndex) + (_bleeding * _amountOf) + ]; + }; } forEach _y; } forEach GET_OPEN_WOUNDS(_target); +TRACE_1("Body part blood loss",_bodyPartBloodLoss); + +// UI update loop { _x params ["_bodyPartIDC", "_selectedIDC", ["_tourniquetIDC", -1], ["_fractureIDC", -1]]; - private _selected = _forEachIndex == _selectionN; + + TRACE_4("UI element", + _forEachIndex, + _bodyPartIDC, + _selected, + _tourniquetIDC + ); + private _ctrlSelected = _ctrlGroup controlsGroupCtrl _selectedIDC; _ctrlSelected ctrlSetTextColor ACEGVAR(medical_gui,bodypartOutlineColor); _ctrlSelected ctrlShow _selected; - - // Show or hide the tourniquet icon + TRACE_4("UI element", + _ctrlSelected, + _selectedIDC, + _selected, + _tourniquetIDC + ); + // Tourniquet icon if (_tourniquetIDC != -1) then { - private _hasTourniquet = (_tourniquets select _forEachIndex > 0) && (_surgicalBlock select _forEachIndex == 0); + private _hasTourniquet = + (_tourniquets select _forEachIndex > 0) + && (_surgicalBlock select _forEachIndex == 0); + + TRACE_2("Tourniquet",_forEachIndex,_hasTourniquet); + private _ctrlTourniquet = _ctrlGroup controlsGroupCtrl _tourniquetIDC; _ctrlTourniquet ctrlShow _hasTourniquet; }; - // Show or hide fractrue/bones + // Fracture / bone state if (_fractureIDC != -1) then { + private _fractureState = _fractures select _forEachIndex; + TRACE_2("Fracture state",_forEachIndex,_fractureState); + private _ctrlBone = _ctrlGroup controlsGroupCtrl _fractureIDC; - switch (_fractures select _forEachIndex) do { + + switch (_fractureState) do { case 0: { _ctrlBone ctrlShow false; }; @@ -61,7 +112,8 @@ private _surgicalBlock = GET_SURGICAL_TOURNIQUETS(_target); _ctrlBone ctrlShow true; _ctrlBone ctrlSetTextColor [1, 0, 0, 1]; }; - case -1: { + case -1; + case -2: { if (ACEGVAR(medical,fractures) in [2, 3]) then { _ctrlBone ctrlShow true; _ctrlBone ctrlSetTextColor [0, 0, 1, 1]; @@ -69,52 +121,85 @@ private _surgicalBlock = GET_SURGICAL_TOURNIQUETS(_target); _ctrlBone ctrlShow false; }; }; + case -3: { + if (ACEGVAR(medical,fractures) in [2, 3]) then { + _ctrlBone ctrlShow true; + _ctrlBone ctrlSetTextColor [1, 0, 1, 1]; + } else { + _ctrlBone ctrlShow false; + }; + }; }; }; - // Update body part color based on blood loss and damage + // Body part coloring private _bloodLoss = _bodyPartBloodLoss select _forEachIndex; private _bodyPartColor = if (_bloodLoss > 0) then { + + TRACE_2("Blood loss color",_forEachIndex,_bloodLoss); [_bloodLoss] call ACEFUNC(medical_gui,bloodLossToRGBA); + } else { + private _damage = _bodyPartDamage select _forEachIndex; - // _damageThreshold here indicates how close unit is to guaranteed death via sum of trauma, so use the same multipliers used in medical_damage/functions/fnc_determineIfFatal.sqf - // TODO: make multipliers for head and torso a macro in medical_engine/script_macros_medical.hpp - switch (true) do { // torso damage threshold doesn't need scaling - case (_forEachIndex > 3): { // legs: index 4 & 5 - if (ACEGVAR(medical,limbDamageThreshold) != 0 && {[false, !isPlayer _target, true] select ACEGVAR(medical,useLimbDamage)}) then { // Just indicate how close to the limping threshold we are - _damageThreshold = _damageThreshold * EGVAR(medical,limbDamageThreshold); + + TRACE_3("Damage pre-scale",_forEachIndex,_damage,_damageThreshold); + + switch (true) do { + case (_forEachIndex > 7): { + if ( + ACEGVAR(medical,limbDamageThreshold) != 0 + && {[false, !isPlayer _target, true] select ACEGVAR(medical,useLimbDamage)} + ) then { + _damageThreshold = _damageThreshold * ACEGVAR(medical,limbDamageThreshold); } else { _damageThreshold = LIMPING_DAMAGE_THRESHOLD * 4; }; }; - case (_forEachIndex > 1): { // arms: index 2 & 3 - if (ACEGVAR(medical,limbDamageThreshold) != 0 && {[false, !isPlayer _target, true] select ACEGVAR(medical,useLimbDamage)}) then { // Just indicate how close to the fracture threshold we are + + case (_forEachIndex > 3): { + if ( + ACEGVAR(medical,limbDamageThreshold) != 0 + && {[false, !isPlayer _target, true] select ACEGVAR(medical,useLimbDamage)} + ) then { _damageThreshold = _damageThreshold * ACEGVAR(medical,limbDamageThreshold); } else { _damageThreshold = FRACTURE_DAMAGE_THRESHOLD * 4; }; }; - case (_forEachIndex == 0): { // head: index 0 - _damageThreshold = _damageThreshold * 1.25; + + case (_forEachIndex > 1): { + _damageThreshold = _damageThreshold * 1.5; }; - default { // torso: index 1 - _damageThreshold = _damageThreshold * 1.5 + + default { + _damageThreshold = _damageThreshold * 1.5; }; }; + _damage = (_damage / (0.01 max _damageThreshold)) min 1; + + TRACE_3("Damage post-scale",_forEachIndex,_damage,_damageThreshold); [_damage] call ACEFUNC(medical_gui,damageToRGBA); }; private _ctrlBodyPart = _ctrlGroup controlsGroupCtrl _bodyPartIDC; + TRACE_3("bodyParts",_ctrlGroup,_ctrlBodyPart,_bodyPartIDC); _ctrlBodyPart ctrlSetTextColor _bodyPartColor; + } forEach [ [IDC_BODY_HEAD, IDC_BODY_HEAD_S], + [IDC_BODY_NECK, IDC_BODY_NECK_S], + [IDC_BODY_CHEST, IDC_BODY_CHEST_S], [IDC_BODY_TORSO, IDC_BODY_TORSO_S], - [IDC_BODY_ARMLEFT, IDC_BODY_ARMLEFT_S, IDC_BODY_ARMLEFT_T, IDC_BODY_ARMLEFT_B], + [IDC_BODY_ARMLEFT, IDC_BODY_ARMLEFT_S, IDC_BODY_ARMLEFT_T, IDC_BODY_ARMLEFT_B], + [IDC_BODY_ARMUPPERLEFT, IDC_BODY_ARMUPPERLEFT_S, IDC_BODY_ARMUPPERLEFT_T, IDC_BODY_ARMUPPERLEFT_B], [IDC_BODY_ARMRIGHT, IDC_BODY_ARMRIGHT_S, IDC_BODY_ARMRIGHT_T, IDC_BODY_ARMRIGHT_B], - [IDC_BODY_LEGLEFT, IDC_BODY_LEGLEFT_S, IDC_BODY_LEGLEFT_T, IDC_BODY_LEGLEFT_B], - [IDC_BODY_LEGRIGHT, IDC_BODY_LEGRIGHT_S, IDC_BODY_LEGRIGHT_T, IDC_BODY_LEGRIGHT_B] + [IDC_BODY_ARMUPPERRIGHT, IDC_BODY_ARMUPPERRIGHT_S, IDC_BODY_ARMUPPERRIGHT_T, IDC_BODY_ARMUPPERRIGHT_B], + [IDC_BODY_LEGLEFT, IDC_BODY_LEGLEFT_S, IDC_BODY_LEGLEFT_T, IDC_BODY_LEGLEFT_B], + [IDC_BODY_LEGUPPERLEFT, IDC_BODY_LEGUPPERLEFT_S, IDC_BODY_LEGUPPERLEFT_T, IDC_BODY_LEGUPPERLEFT_B], + [IDC_BODY_LEGRIGHT, IDC_BODY_LEGRIGHT_S, IDC_BODY_LEGRIGHT_T, IDC_BODY_LEGRIGHT_B], + [IDC_BODY_LEGUPPERRIGHT, IDC_BODY_LEGUPPERRIGHT_S, IDC_BODY_LEGUPPERRIGHT_T, IDC_BODY_LEGUPPERRIGHT_B] ]; [QACEGVAR(medical_gui,updateBodyImage), [_ctrlGroup, _target, _selectionN]] call CBA_fnc_localEvent; diff --git a/addons/gui/functions/fnc_updateDoses.sqf b/addons/gui/functions/fnc_updateDoses.sqf new file mode 100644 index 000000000..a9f0c8a09 --- /dev/null +++ b/addons/gui/functions/fnc_updateDoses.sqf @@ -0,0 +1,65 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks the medications in the players inventory and then populates the listbox with the medications, + * + * Arguments: + * none + * + * Return Value: + * None + * + * Example: + * [] call kat_medical_gui_fnc_updateDoses; + * + * Public: No + */ + +disableSerialization; +private _medListBox = findDisplay 38580 displayCtrl 71305; +_medListBox ctrlRemoveAllEventHandlers "LBSelChanged"; +_medListBox ctrlAddEventHandler ["LBSelChanged", { + params ["_control", "_selectedIndex"]; + if (_selectedIndex >= 0) then { + private _medItem = _control lbData _selectedIndex; + private _capturedMedItem = _medItem; + + [{ + params ["_capturedMedItem"]; + + private _syringeListBox = findDisplay 38580 displayCtrl 71303; + private _syringeSelected = lbCurSel _syringeListBox; + private _syringeType = _syringeListBox lbData _syringeSelected; + + private _doseListBox = findDisplay 38580 displayCtrl 71307; + lbClear _doseListBox; + + if (isNil "_capturedMedItem" || {_capturedMedItem == ""}) exitWith {}; + + private _medParts = _capturedMedItem splitString "_"; + private _medBaseName = _medParts select -1; + switch (true) do { + case (_syringeType in ["salineiv100", "salineiv"]): { + private _index = _doseListBox lbAdd LLSTRING(Infusion); + _doseListBox lbSetValue [_index, 4]; + }; + default { + private _doseLevels = [10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]; + + { + private _testClass = format ["kat_syringe_%1_%2_%3", _medBaseName, _syringeType, _x]; + + if (isClass(configFile >> "CfgWeapons" >> _testClass)) then { + private _stringtableKey = format ["STR_KAT_Pharma_SyringeDisplay_%1_%2_%3", _medBaseName, _syringeType, _x]; + private _localizedText = localize _stringtableKey; + private _doseText = (_localizedText splitString " ") select 3; + private _index = _doseListBox lbAdd _doseText; + _doseListBox lbSetValue [_index, _x]; + }; + } forEach _doseLevels; + }; + }; + + }, [_capturedMedItem], 0.05] call CBA_fnc_waitAndExecute; + }; +}]; \ No newline at end of file diff --git a/addons/gui/functions/fnc_updateIVStatus.sqf b/addons/gui/functions/fnc_updateIVStatus.sqf index 68d7401ab..5555b546f 100644 --- a/addons/gui/functions/fnc_updateIVStatus.sqf +++ b/addons/gui/functions/fnc_updateIVStatus.sqf @@ -19,9 +19,9 @@ params ["_target"]; -// Get tourniquets, damage, and blood loss for target -private _IV = _target getVariable [QEGVAR(pharma,IV), [0,0,0,0,0,0]]; -private _ivFlow = _target getVariable [QEGVAR(pharma,IVflow), [0,0,0,0,0,0]]; +private _IV = _target getVariable [QEGVAR(pharma,IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _ivFlow = _target getVariable [QEGVAR(pharma,IVflow), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _ivRate = _target getVariable [QEGVAR(pharma,IVincomingFlowAmount), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _ivMenuShow = _target getVariable [QEGVAR(pharma,IVmenuActive), false]; if (_ivMenuShow) then { @@ -33,21 +33,42 @@ if (_ivMenuShow) then { }; { - _x params ["_coverIDC", "_titleIDC", "_typeIDC", "_valueIDC", "_buttonIDCArray", "_bodyPartN"]; + _x params ["_coverIDC", "_titleIDC", "_typeIDC", "_valueIDC", "_rateIDC", "_buttonIDCArray", "_idxA", "_idxB"]; - private _activeIV = _IV select _bodyPartN; - private _activeFlow = _ivFlow select _bodyPartN; + if (isNil "_idxB") then { + _idxB = _idxA; + }; + + private _ivA = _IV select _idxA; + private _ivB = _IV select _idxB; + private _flowA = _ivFlow select _idxA; + private _flowB = _ivFlow select _idxB; + private _rateA = _ivRate select _idxA; + private _rateB = _ivRate select _idxB; + private _activeIV = -1; + private _activeFlow = 0; + private _activeRate = 0; - if !(_ivMenuShow) then { - _activeIV = -1; + if (_ivMenuShow) then { + if (_ivA > 0) then { + _activeIV = _ivA; + _activeFlow = _flowA; + _activeRate = _rateA; + } else { + _activeIV = _ivB; + _activeFlow = _flowB; + _activeRate = _rateB; + }; }; + switch (true) do { case (_activeIV == 0): { ctrlShow [_coverIDC, true]; ctrlShow [_titleIDC, false]; ctrlShow [_typeIDC, false]; ctrlShow [_valueIDC, false]; + ctrlShow [_rateIDC, false]; _buttonIDCArray apply {ctrlShow [_x, false]}; _buttonIDCArray apply {ctrlEnable [_x, false]}; }; @@ -56,35 +77,124 @@ if (_ivMenuShow) then { ctrlShow [_titleIDC, true]; ctrlShow [_typeIDC, true]; ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "IO"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 2): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "16g"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 3): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "14g"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 4): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "20g"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 10): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "16g"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 11): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "14g"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 12): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; + _buttonIDCArray apply {ctrlShow [_x, true]}; + _buttonIDCArray apply {ctrlEnable [_x, true]}; + ctrlSetText [_typeIDC, "20g"]; + ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; + }; + case (_activeIV == 13): { + ctrlShow [_coverIDC, false]; + ctrlShow [_titleIDC, true]; + ctrlShow [_typeIDC, true]; + ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; _buttonIDCArray apply {ctrlShow [_x, true]}; _buttonIDCArray apply {ctrlEnable [_x, true]}; ctrlSetText [_typeIDC, "IO"]; ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; }; - case (_activeIV > 1): { + case (_activeIV == 14): { ctrlShow [_coverIDC, false]; ctrlShow [_titleIDC, true]; ctrlShow [_typeIDC, true]; ctrlShow [_valueIDC, true]; + ctrlShow [_rateIDC, true]; _buttonIDCArray apply {ctrlShow [_x, true]}; _buttonIDCArray apply {ctrlEnable [_x, true]}; - ctrlSetText [_typeIDC, "IV"]; + ctrlSetText [_typeIDC, "EJV"]; ctrlSetText [_valueIDC, (_activeFlow toFixed 1)]; + ctrlSetText [_rateIDC, (_activeRate toFixed 1)]; }; case (_activeIV == -1): { ctrlShow [_coverIDC, false]; ctrlShow [_titleIDC, false]; ctrlShow [_typeIDC, false]; ctrlShow [_valueIDC, false]; + ctrlShow [_rateIDC, false]; _buttonIDCArray apply {ctrlShow [_x, false]}; _buttonIDCArray apply {ctrlEnable [_x, false]}; }; }; } forEach [ - [IDC_IV_FLOW_HEADCOVER, IDC_IV_FLOW_HEADTITLE, IDC_IV_FLOW_HEADTYPE, IDC_IV_FLOW_HEADIV_VALUE, [IDC_IV_FLOW_HEADSUBTRACTFULL, IDC_IV_FLOW_HEADSUBTRACT, IDC_IV_FLOW_HEADADD, IDC_IV_FLOW_HEADADDFULL], 0], - [IDC_IV_FLOW_CHESTCOVER, IDC_IV_FLOW_CHESTTITLE, IDC_IV_FLOW_CHESTTYPE, IDC_IV_FLOW_CHESTTEST, [IDC_IV_FLOW_CHESTSUBTRACTFULL, IDC_IV_FLOW_CHESTSUBTRACT, IDC_IV_FLOW_CHESTADD, IDC_IV_FLOW_CHESTADDFULL], 1], - [IDC_IV_FLOW_LARMCOVER, IDC_IV_FLOW_LARMTITLE, IDC_IV_FLOW_LARMTYPE, IDC_IV_FLOW_LARMIVVALUE, [IDC_IV_FLOW_LARMSUBTRACTFULL, IDC_IV_FLOW_LARMSUBTRACT, IDC_IV_FLOW_LARMADD, IDC_IV_FLOW_LARMADDFULL], 2], - [IDC_IV_FLOW_RARMCOVER, IDC_IV_FLOW_RARMTITLE, IDC_IV_FLOW_RARMTYPE, IDC_IV_FLOW_RARMIVVALUE, [IDC_IV_FLOW_RARMSUBTRACTFULL, IDC_IV_FLOW_RARMSUBTRACT, IDC_IV_FLOW_RARMADD, IDC_IV_FLOW_RARMADDFULL], 3], - [IDC_IV_FLOW_LLEGCOVER, IDC_IV_FLOW_LLEGTITLE, IDC_IV_FLOW_LLEGTYPE, IDC_IV_FLOW_LLEGIVVALUE, [IDC_IV_FLOW_LLEGSUBTRACTFULL, IDC_IV_FLOW_LLEGSUBTRACT, IDC_IV_FLOW_LLEGADD, IDC_IV_FLOW_LLEGADDFULL], 4], - [IDC_IV_FLOW_RLEGCOVER, IDC_IV_FLOW_RLEGTITLE, IDC_IV_FLOW_RLEGTYPE, IDC_IV_FLOW_RLEGIVVALUE, [IDC_IV_FLOW_RLEGSUBTRACTFULL, IDC_IV_FLOW_RLEGSUBTRACT, IDC_IV_FLOW_RLEGADD, IDC_IV_FLOW_RLEGADDFULL], 5] + [IDC_IV_FLOW_HEADCOVER, IDC_IV_FLOW_HEADTITLE, IDC_IV_FLOW_HEADTYPE, IDC_IV_FLOW_HEADIV_VALUE, IDC_IV_FLOW_HEADIVRATE, [IDC_IV_FLOW_HEADSUBTRACTFULL, IDC_IV_FLOW_HEADSUBTRACT, IDC_IV_FLOW_HEADADD, IDC_IV_FLOW_HEADADDFULL], 1], + [IDC_IV_FLOW_CHESTCOVER, IDC_IV_FLOW_CHESTTITLE, IDC_IV_FLOW_CHESTTYPE, IDC_IV_FLOW_CHESTTEST, IDC_IV_FLOW_CHESTIVRATE, [IDC_IV_FLOW_CHESTSUBTRACTFULL, IDC_IV_FLOW_CHESTSUBTRACT, IDC_IV_FLOW_CHESTADD, IDC_IV_FLOW_CHESTADDFULL], 2], + [IDC_IV_FLOW_LARMCOVER, IDC_IV_FLOW_LARMTITLE, IDC_IV_FLOW_LARMTYPE, IDC_IV_FLOW_LARMIVVALUE, IDC_IV_FLOW_LARMIVRATE, [IDC_IV_FLOW_LARMSUBTRACTFULL, IDC_IV_FLOW_LARMSUBTRACT, IDC_IV_FLOW_LARMADD, IDC_IV_FLOW_LARMADDFULL], 4, 5], + [IDC_IV_FLOW_RARMCOVER, IDC_IV_FLOW_RARMTITLE, IDC_IV_FLOW_RARMTYPE, IDC_IV_FLOW_RARMIVVALUE, IDC_IV_FLOW_RARMIVRATE, [IDC_IV_FLOW_RARMSUBTRACTFULL, IDC_IV_FLOW_RARMSUBTRACT, IDC_IV_FLOW_RARMADD, IDC_IV_FLOW_RARMADDFULL], 6, 7], + [IDC_IV_FLOW_LLEGCOVER, IDC_IV_FLOW_LLEGTITLE, IDC_IV_FLOW_LLEGTYPE, IDC_IV_FLOW_LLEGIVVALUE, IDC_IV_FLOW_LLEGIVRATE, [IDC_IV_FLOW_LLEGSUBTRACTFULL, IDC_IV_FLOW_LLEGSUBTRACT, IDC_IV_FLOW_LLEGADD, IDC_IV_FLOW_LLEGADDFULL], 8, 9], + [IDC_IV_FLOW_RLEGCOVER, IDC_IV_FLOW_RLEGTITLE, IDC_IV_FLOW_RLEGTYPE, IDC_IV_FLOW_RLEGIVVALUE, IDC_IV_FLOW_RLEGIVRATE, [IDC_IV_FLOW_RLEGSUBTRACTFULL, IDC_IV_FLOW_RLEGSUBTRACT, IDC_IV_FLOW_RLEGADD, IDC_IV_FLOW_RLEGADDFULL], 10, 11] ]; \ No newline at end of file diff --git a/addons/gui/functions/fnc_updateInjuryList.sqf b/addons/gui/functions/fnc_updateInjuryList.sqf index 3efb0d8d4..a32f9c165 100644 --- a/addons/gui/functions/fnc_updateInjuryList.sqf +++ b/addons/gui/functions/fnc_updateInjuryList.sqf @@ -21,17 +21,42 @@ params ["_ctrl", "_target", "_selectionN"]; private _entries = []; private _nonissueColor = [1, 1, 1, 0.33]; +private _wounds = GET_OPEN_WOUNDS(_target); +private _hasExternalBleeding = false; + +{ + private _bodyPart = _x; + private _woundList = _wounds get _bodyPart; + + { + private _woundClassID = _x select 0; + private _amountOf = _x select 1; + private _bleeding = _x select 2; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if ( + _amountOf > 0 + && {_className != "InternalBleeding"} + && {_bleeding > 0} + ) exitWith { + _hasExternalBleeding = true; + }; + } forEach _woundList; + + if (_hasExternalBleeding) exitWith {}; +} forEach (keys _wounds); // Indicate if unit is bleeding at all -if (IS_BLEEDING(_target)) then { - switch (ACEGVAR(medical_gui,showBleeding)) do { +if (_hasExternalBleeding && (IS_BLEEDING(_target))) then { + switch (GVAR(showBleeding)) do { case 1: { // Just show whether the unit is bleeding at all _entries pushBack [localize ACELSTRING(medical_gui,Status_Bleeding), [1, 0, 0, 1]]; }; case 2: { // Give a qualitative description of the rate of bleeding - private _cardiacOutput = [_target] call ACEFUNC(medical_status,getCardiacOutput); + private _cardiacOutput = [_target] call EFUNC(vitals,getCardiacOutput); private _bleedRate = GET_BLOOD_LOSS(_target); private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05); // Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest @@ -50,6 +75,30 @@ if (IS_BLEEDING(_target)) then { }; }; }; + case 3: { + // Give a qualitative description of the rate of bleeding on a limb by limb basis + if (HAS_LIMB_BLEEDING(_target,_selectionN)) then { + private _cardiacOutput = [_target] call EFUNC(vitals,getCardiacOutput); + + private _bleedRate = GET_BODY_PART_RATE(_target,_selectionN); + private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05); + // Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest + switch (true) do { + case (_bleedRate < (_bleedRateKO * BLEED_RATE_SLOW * 8)): { + _entries pushBack [localize ACELSTRING(medical_gui,Bleed_Rate1), [1, 1, 0, 1]]; + }; + case (_bleedRate < (_bleedRateKO * BLEED_RATE_MODERATE * 8)): { + _entries pushBack [localize ACELSTRING(medical_gui,Bleed_Rate2), [1, 0.67, 0, 1]]; + }; + case (_bleedRate < (_bleedRateKO * BLEED_RATE_SEVERE * 8)): { + _entries pushBack [localize ACELSTRING(medical_gui,Bleed_Rate3), [1, 0.33, 0, 1]]; + }; + default { + _entries pushBack [localize ACELSTRING(medical_gui,Bleed_Rate4), [1, 0, 0, 1]]; + }; + }; + }; + }; }; } else { _entries pushBack [localize ACELSTRING(medical_gui,Status_Nobleeding), _nonissueColor]; @@ -79,11 +128,24 @@ if (ACEGVAR(medical_gui,showBloodlossEntry)) then { // Show receiving IV volume remaining private _totalIvVolume = 0; private _saline = 0; +private _hypertonicSaline = 0; +private _hextend = 0; private _blood = 0; private _plasma = 0; +private _ringers = 0; +private _packedRBC = 0; +private _MorphineIVInfusion = 0; +private _EpinephrineIVInfusion = 0; +private _EtomidateIVInfusion = 0; +private _DoxapramIVInfusion = 0; +private _NitroglycerinIVInfusion = 0; +private _NorepinephrineIVInfusion = 0; +private _platelets = 0; +private _fbtk = 0; { - _x params ["_volumeRemaining", "_type"]; - switch (_type) do { + _x params ["_volumeRemaining", "_type", "_partIndex"]; + if (_partIndex == _selectionN) then{ + switch (_type) do { case "Saline": { _saline = _saline + _volumeRemaining; }; @@ -93,40 +155,123 @@ private _plasma = 0; case "Plasma": { _plasma = _plasma + _volumeRemaining; }; + case "Hypertonic Saline": { + _hypertonicSaline = _hypertonicSaline + _volumeRemaining; + }; + case "Hextend": { + _hextend = _hextend + _volumeRemaining; + }; + case "Ringers Lactate": { + _ringers = _ringers + _volumeRemaining; + }; + case "PackedRBC": { + _packedRBC = _packedRBC + _volumeRemaining; + }; + case "Morphine_IVInfusion": { + _MorphineIVInfusion = _MorphineIVInfusion + _volumeRemaining; + }; + case "Epinephrine_IVInfusion": { + _EpinephrineIVInfusion = _EpinephrineIVInfusion + _volumeRemaining; + }; + case "Etomidate_IVInfusion": { + _EtomidateIVInfusion = _EtomidateIVInfusion + _volumeRemaining; + }; + case "Doxapram_IVInfusion": { + _DoxapramIVInfusion = _DoxapramIVInfusion + _volumeRemaining; + }; + case "Nitroglycerin_IVInfusion": { + _NitroglycerinIVInfusion = _NitroglycerinIVInfusion + _volumeRemaining; + }; + case "Norepinephrine_IVInfusion": { + _NorepinephrineIVInfusion = _NorepinephrineIVInfusion + _volumeRemaining; + }; + case "Platelets": { + _platelets = _platelets + _volumeRemaining; + }; + case "FBTK_500": { + _fbtk = _fbtk + _volumeRemaining; + }; + case "FBTK_250": { + _fbtk = _fbtk + _volumeRemaining; + }; }; _totalIvVolume = _totalIvVolume + _volumeRemaining; + }; } forEach (_target getVariable [QACEGVAR(medical,ivBags), []]); if (_totalIvVolume > 0) then { if (_saline > 0) then { - _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingSalineIvVolume), floor _saline], [1, 1, 1, 1]]; + _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingSalineIvVolume), floor _saline], [0.388,0.584,0.933,1]]; + }; + if (_hypertonicSaline > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingHypertonic_SalineIvVolume), floor _hypertonicSaline], [0.388,0.584,0.933,1]]; }; if (_blood > 0) then { - _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingBloodIvVolume), floor _blood], [1, 1, 1, 1]]; + _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingBloodIvVolume), floor _blood], [0.58,0.133,0.133,1]]; }; if (_plasma > 0) then { - _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingPlasmaIvVolume), floor _plasma], [1, 1, 1, 1]]; + _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingPlasmaIvVolume), floor _plasma], [0.827,0.686,0.216,1]]; + }; + if (_hextend > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingHextendIvVolume), floor _hextend], [0.827,0.686,0.216,1]]; + }; + if (_ringers > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingRingers_LactateIvVolume), floor _ringers], [0.388,0.584,0.933,1]]; + }; + if (_packedRBC > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingPacked_RBCIvVolume), floor _packedRBC], [0.58,0.133,0.133,1]]; + }; + if (_DoxapramIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingDoxapramIVInfusionVolume), floor _DoxapramIVInfusion], [0.878,0.69,1,1]]; + }; + if (_EpinephrineIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingEpinephrineIVInfusionVolume), floor _EpinephrineIVInfusion], [0.878,0.69,1,1]]; + }; + if (_EtomidateIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingEtomidateIVInfusionVolume), floor _EtomidateIVInfusion], [0.878,0.69,1,1]]; + }; + if (_MorphineIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingMorphineIVInfusionVolume), floor _MorphineIVInfusion], [0.878,0.69,1,1]]; + }; + if (_NitroglycerinIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingNitroglycerinIVInfusionVolume), floor _NitroglycerinIVInfusion], [0.878,0.69,1,1]]; + }; + if (_NorepinephrineIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingNorepinephrineIVInfusionVolume), floor _NorepinephrineIVInfusion], [0.878,0.69,1,1]]; + }; + if (_NorepinephrineIVInfusion > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingPlateletsVolume), floor _platelets], [0.827,0.686,0.216,1]]; + }; + if (_fbtk > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,drawingBloodVolume), floor _fbtk], [0.58,0.133,0.133,1]]; }; } else { _entries pushBack [localize ACELSTRING(medical_treatment,Status_NoIv), _nonissueColor]; }; - +if ((_target getVariable [QEGVAR(pharma,pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]] select _selectionN) > 0) then { + if ((_target getVariable [QEGVAR(pharma,pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]] select _selectionN) == 1) then { + _entries pushBack [localize ELSTRING(pharma,IVPressureBag), [1, 1, 1, 1]]; + } else { + _entries pushBack [localize ELSTRING(pharma,IVSqueezed), [1, 1, 1, 1]]; + }; +}; +// Indicate the amount of pain the unit is in // Indicate the amount of pain the unit is in if (_target call ACEFUNC(common,isAwake)) then { private _pain = GET_PAIN_PERCEIVED(_target); if (_pain > 0) then { - private _painText = switch (true) do { - case (_pain > PAIN_UNCONSCIOUS): { - ACELSTRING(medical_treatment,Status_SeverePain); - }; - case (_pain > (PAIN_UNCONSCIOUS / 5)): { - ACELSTRING(medical_treatment,Status_Pain); - }; - default { - ACELSTRING(medical_treatment,Status_MildPain); - }; + private _painText = switch (true) do { + case (_pain > PAIN_UNCONSCIOUS): { + ACELSTRING(medical_treatment,Status_SeverePain); + }; + case (_pain > (PAIN_UNCONSCIOUS / 5)): { + ACELSTRING(medical_treatment,Status_Pain); }; - _entries pushBack [localize _painText, [1, 1, 1, 1]]; + default { + ACELSTRING(medical_treatment,Status_MildPain); + }; + }; + _entries pushBack [localize _painText, [1, 1, 1, 1]]; } else { if (ACEGVAR(medical_gui,showInactiveStatuses)) then {_entries pushBack [localize ACELSTRING(medical_treatment,Status_NoPain), _nonissueColor];}; }; @@ -151,43 +296,50 @@ if (_selectionN == -1) exitWith { // Add selected body part name private _bodyPartName = [ ACELSTRING(medical_gui,Head), + ELSTRING(hitpoints,Neck), + ELSTRING(hitpoints,Chest), ACELSTRING(medical_gui,Torso), ACELSTRING(medical_gui,LeftArm), + ELSTRING(hitpoints,UpperLeftArm), ACELSTRING(medical_gui,RightArm), + ELSTRING(hitpoints,UpperRightArm), ACELSTRING(medical_gui,LeftLeg), - ACELSTRING(medical_gui,RightLeg) + ELSTRING(hitpoints,UpperLeftLeg), + ACELSTRING(medical_gui,RightLeg), + ELSTRING(hitpoints,UpperRightLeg) ] select _selectionN; _entries pushBack [localize _bodyPartName, [1, 1, 1, 1]]; // Damage taken tooltip if (ACEGVAR(medical_gui,showDamageEntry)) then { - private _bodyPartDamage = (_target getVariable [QACEGVAR(medical,bodyPartDamage), [0, 0, 0, 0, 0, 0]]) select _selectionN; + private _bodyPartDamage = GET_BODYPART_DAMAGE(_target) select _selectionN; if (_bodyPartDamage > 0) then { private _damageThreshold = GET_DAMAGE_THRESHOLD(_target); switch (true) do { - case (_selectionN > 3): { // legs: index 4 & 5 + case (_selectionN > 7): { // legs: index 4 & 5 if (ACEGVAR(medical,limbDamageThreshold) != 0 && {[false, !isPlayer _target, true] select ACEGVAR(medical,useLimbDamage)}) then { // Just indicate how close to the limping threshold we are _damageThreshold = _damageThreshold * ACEGVAR(medical,limbDamageThreshold); } else { _damageThreshold = FRACTURE_DAMAGE_THRESHOLD * 4; }; }; - case (_selectionN > 1): { // arms: index 2 & 3 + case (_selectionN > 3): { // arms: index 2 & 3 if (ACEGVAR(medical,limbDamageThreshold) != 0 && {[false, !isPlayer _target, true] select ACEGVAR(medical,useLimbDamage)}) then { // Just indicate how close to the fracture threshold we are _damageThreshold = _damageThreshold * ACEGVAR(medical,limbDamageThreshold); } else { _damageThreshold = FRACTURE_DAMAGE_THRESHOLD * 4; }; }; - case (_selectionN == 0): { // head: index 0 - _damageThreshold = _damageThreshold * 1.25; - }; - default { // torso: index 1 + case (_selectionN > 1): { // chest and torso index 2-3 _damageThreshold = _damageThreshold * 1.5; }; + default { // Head and neck index 0-1 + _damageThreshold = _damageThreshold * 1.25; + }; + }; - _bodyPartDamage = (_bodyPartDamage / _damageThreshold) min 1; + _bodyPartDamage = (_bodyPartDamage / (0.01 max _damageThreshold)) min 1; switch (true) do { case (_bodyPartDamage isEqualTo 1): { _entries pushBack [localize ACELSTRING(medical_gui,traumaSustained4), [_bodyPartDamage] call ACEFUNC(medical_gui,damageToRGBA)]; @@ -207,14 +359,45 @@ if (ACEGVAR(medical_gui,showDamageEntry)) then { // Indicate if a tourniquet is applied if (HAS_TOURNIQUET_ACTUAL(_target,_selectionN)) then { - _entries pushBack [format ["%1 [%2]", localize ACELSTRING(medical_gui,Status_Tourniquet_Applied), _target getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0]] select _selectionN], [0.77, 0.51, 0.08, 1]]; + if ((GET_KAT_TOURNIQUETS(_target) select _selectionN) >= 1) then { + _entries pushBack [format ["%1 [%2]", localize ACELSTRING(medical_gui,Status_Tourniquet_Applied), _target getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]] select _selectionN], [0.77, 0.51, 0.08, 1]]; + } else { + _entries pushBack [format ["[H] %1 [%2]", localize ACELSTRING(medical_gui,Status_Tourniquet_Applied), _target getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]] select _selectionN], [0.77, 0.51, 0.08, 1]]; + }; }; + -private _warmerPlaced = _target getVariable [QEGVAR(hypothermia,fluidWarmer), [0,0,0,0,0,0]]; +private _warmerPlaced = _target getVariable [QEGVAR(hypothermia,fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]]; if (_warmerPlaced select _selectionN == 1) then { _entries pushBack [LELSTRING(hypothermia,LineWarmer), [1, 0.75, 0.18, 1]]; }; +private _wounds = GET_OPEN_WOUNDS(_target); +private _bodyPart = ALL_BODY_PARTS select _selectionN; +private _partWounds = _wounds getOrDefault [_bodyPart, []]; +private _internalBleedAmount = 0; + +{ + _x params ["_woundClassID", "_amountOf"]; + private _classIndex = _woundClassID / 10; + private _category = _woundClassID % 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + TRACE_1("checkLimb4",_className); + if (_className isEqualTo "InternalBleeding") then { + _internalBleedAmount = _internalBleedAmount + _category; + }; +} forEach _partWounds; +private _sizeLabel = ""; +TRACE_1("checkLimb2",_internalBleedAmount); +if (_internalBleedAmount > 0) then { + _sizeLabel = switch (true) do { + case (_internalBleedAmount < 3): { localize ELSTRING(hitpoints,InternalBleeding_Minor) }; + case (_internalBleedAmount < 6): { localize ELSTRING(hitpoints,InternalBleeding_Medium) }; + case (_internalBleedAmount < 10): { localize ELSTRING(hitpoints,InternalBleeding_Large) }; + default {}; + }; + _entries pushBack [_sizeLabel, [0.8, 0.76, 0.9, 1]]; +}; // Indicate current body part fracture status switch (GET_FRACTURES(_target) select _selectionN) do { @@ -226,6 +409,11 @@ switch (GET_FRACTURES(_target) select _selectionN) do { _entries pushBack [localize ACELSTRING(medical_gui,Status_SplintApplied), [0.2, 0.2, 1, 1]]; }; }; + case -2: { + if (ACEGVAR(medical,fractures) in [2, 3]) then { // Ignore if the splint has no effect + _entries pushBack [localize LSTRING(Status_SplintWrapped), [0.2, 0.2, 1, 1]]; + }; + }; }; [QACEGVAR(medical_gui,updateInjuryListPart), [_ctrl, _target, _selectionN, _entries, _bodyPartName]] call CBA_fnc_localEvent; @@ -242,10 +430,10 @@ private _fnc_processWounds = { if (_amountOf > 0) then { private _classIndex = _woundClassID / 10; private _category = _woundClassID % 10; - private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_className in ["InternalBleeding", "Evisceration"]) exitWith {}; private _suffix = ["Minor", "Medium", "Large"] select _category; - private _woundName = localize format [ACELSTRING(medical_damage,%1_%2), _className, _suffix]; + private _woundName = localize format [LSTRING(%1_%2), _className, _suffix]; private _woundDescription = if (_amountOf >= 1) then { format ["%1x %2", ceil _amountOf, _woundName] @@ -258,7 +446,47 @@ private _fnc_processWounds = { } forEach (_wounds getOrDefault [ALL_BODY_PARTS select _selectionN, []]); }; +private _fnc_processCoagWounds = { + params ["_wounds", "_format", "_color"]; + + private _aggregatedWounds = createHashMap; + + { + _x params ["_woundClassID", "_amountOf"]; + + if (_amountOf > 0) then { + private _existing = _aggregatedWounds getOrDefault [_woundClassID, 0]; + _aggregatedWounds set [_woundClassID, _existing + _amountOf]; + }; + } forEach (_wounds getOrDefault [ALL_BODY_PARTS select _selectionN, []]); + + { + private _woundClassID = _x; + private _amountOf = _y; + + private _classIndex = _woundClassID / 10; + private _category = _woundClassID % 10; + + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_className in ["InternalBleeding", "Evisceration"]) then { continue }; + + private _suffix = ["Minor", "Medium", "Large"] select _category; + private _woundName = localize format [LSTRING(%1_%2), _className, _suffix]; + + private _woundDescription = if (_amountOf >= 1) then { + format ["%1x %2", ceil _amountOf, _woundName] + } else { + format [localize ACELSTRING(medical_gui,PartialX), _woundName] + }; + + _woundEntries pushBack [format [_format, _woundDescription], _color]; + + } forEach _aggregatedWounds; +}; + [GET_OPEN_WOUNDS(_target), "%1", [1, 1, 1, 1]] call _fnc_processWounds; +[GET_COAGED_WOUNDS(_target), "[C] %1", [0.88, 0.7, 0.65, 1]] call _fnc_processCoagWounds; +[GET_WRAPPED_WOUNDS(_target), "[W] %1", [0.88, 0.7, 0.65, 1]] call _fnc_processWounds; [GET_BANDAGED_WOUNDS(_target), "[B] %1", [0.88, 0.7, 0.65, 1]] call _fnc_processWounds; [GET_STITCHED_WOUNDS(_target), "[S] %1", [0.7, 0.7, 0.7, 1]] call _fnc_processWounds; diff --git a/addons/gui/functions/fnc_updateMedications.sqf b/addons/gui/functions/fnc_updateMedications.sqf new file mode 100644 index 000000000..5858cc5c4 --- /dev/null +++ b/addons/gui/functions/fnc_updateMedications.sqf @@ -0,0 +1,115 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks the medications in the players inventory and then populates the listbox with the medications, + * + * Arguments: + * none + * + * Return Value: + * None + * + * Example: + * [] call kat_medical_gui_fnc_updateMedication; + * + * Public: No + */ + +disableSerialization; + +private _syringeListBox = findDisplay 38580 displayCtrl 71303; +_syringeListBox ctrlRemoveAllEventHandlers "LBSelChanged"; +_syringeListBox ctrlAddEventHandler ["LBSelChanged", { + params ["_control", "_selectedIndex"]; + + private _medications = [ + "kat_amiodarone", "kat_atropineIV", "kat_EACA", "kat_epinephrineIV", + "kat_etomidate", "kat_fentanyl", "kat_flumazenil", "kat_ketamine", + "kat_lidocaine", "kat_lorazepam", "kat_nalbuphine", "kat_nitroglycerin", + "kat_norepinephrine", "kat_phenylephrine", "kat_TXA", "kat_morphineIV", + "kat_adenosineIV", "kat_alteplase", "kat_doxapram", "ACE_salineIV_250", "kat_ondansetron", + "kat_rocuronium", "kat_succinylcholine", "kat_sugammadex", "kat_salineIV100", "kat_metoprolol", "kat_diazepam", + "kat_bicarbonate", "kat_calciumChloride", "kat_calciumGluconate" + ]; + + private _inventory = (items player) + (magazines player); + private _found = []; + + { + private _item = _x; + if (_item in _medications) then { + private _existingIndex = -1; + { + if ((_x select 0) == _item) exitWith { _existingIndex = _forEachIndex }; + } forEach _found; + + if (_existingIndex == -1) then { + _found pushBack [_item, 1]; + } else { + _found set [_existingIndex, [_item, (_found select _existingIndex select 1) + 1]]; + }; + }; + } forEach _inventory; + + private _listBox = findDisplay 38580 displayCtrl 71305; + lbClear _listBox; + + private _selectedSyringe = _control lbData _selectedIndex; + if (_selectedSyringe == "") exitWith {}; + + private _salineIVWhitelist = [ + "kat_epinephrineIV", "kat_morphineIV", "kat_etomidate", "kat_doxapram", "kat_norepinephrine", "kat_nitroglycerin" + ]; + private _salineIV100Whitelist = [ + "kat_epinephrineIV", "kat_morphineIV", "kat_etomidate", "kat_doxapram", "kat_norepinephrine", "kat_nitroglycerin" + ]; + private _5mlWhitelist = [ + "kat_amiodarone", "kat_atropine", "kat_EACA", "kat_epinephrineIV", + "kat_etomidate", "kat_fentanyl", "kat_flumazenil", "kat_ketamine", + "kat_lidocaine", "kat_lorazepam", "kat_nalbuphine", "kat_phenylephrine", "kat_TXA", "kat_morphineIV", + "kat_adenosineIV", "kat_atropineIV", "kat_alteplase", "kat_doxapram", "ACE_salineIV_250", "kat_ondansetron", + "kat_rocuronium", "kat_succinylcholine", "kat_sugammadex", "kat_metoprolol", "kat_diazepam", "kat_bicarbonate", "kat_calciumChloride", "kat_calciumGluconate" + ]; + private _10mlWhitelist = [ + "kat_fentanyl", "kat_ketamine", + "kat_lidocaine", "kat_nalbuphine","kat_TXA", "kat_morphineIV" + ]; + + private _entries = []; + + { + private _medItem = _x select 0; + private _medCount = _x select 1; + + if (_medItem == "") exitWith {}; + + private _valid = switch (_selectedSyringe) do { + case "salineiv": { _medItem in _salineIVWhitelist }; + case "salineiv100": { _medItem in _salineIV100Whitelist }; + case "5ml": { _medItem in _5mlWhitelist }; + case "10ml": { _medItem in _10mlWhitelist }; + default { false }; + }; + + if (_valid) then { + private _config = configFile >> "CfgWeapons" >> _medItem; + private _displayName = getText (_config >> "displayName"); + _entries pushBack [_displayName, _medItem, _medCount]; + }; + } forEach _found; + + _entries sort true; + + { + private _displayName = _x select 0; + private _medItem = _x select 1; + private _medCount = _x select 2; + private _medName = (toLower _medItem) splitString "_" select 1; + private _picture = getText (configFile >> "CfgWeapons" >> _medItem >> "picture"); + private _entryText = format ["%1 (x%2)", _displayName, _medCount]; + private _index = _listBox lbAdd _entryText; + _listBox lbSetPicture [_index, _picture]; + _listBox lbSetData [_index, toLower _medName]; + } forEach _entries; +}]; + diff --git a/addons/gui/functions/fnc_updateSyringes.sqf b/addons/gui/functions/fnc_updateSyringes.sqf new file mode 100644 index 000000000..a1cc1aa20 --- /dev/null +++ b/addons/gui/functions/fnc_updateSyringes.sqf @@ -0,0 +1,77 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks the syringes in the players inventory and then populates the listbox with the syringes, + * + * Arguments: + * none + * + * Return Value: + * None + * + * Example: + * [] call kat_medical_gui_fnc_updateSyringes; + * + * Public: No + */ + private _requiredMedicalLevel = missionNamespace getVariable [QEGVAR(pharma,medLvl_PrepSyringe), 2]; +private _isMedic = [ACE_player, _requiredMedicalLevel] call ACEFUNC(common,isMedic); +if !(_isMedic) exitWith {}; +disableSerialization; + +[{private _syringes = [ + "kat_10ml_syringe", + "kat_5ml_syringe", + "ACE_salineIV_250", + "kat_salineIV100" +]; + +private _syringesFound = { + params ["_syringes"]; + + private _inventory = (items player) + (magazines player); + private _found = []; + + { + private _item = _x; + if (_item in _syringes) then { + private _existingIndex = -1; + { + if ((_x select 0) == _item) exitWith {_existingIndex = _forEachIndex}; + } forEach _found; + + if (_existingIndex == -1) then { + _found pushBack [_item, 1]; + } else { + _found set [_existingIndex, [_item, (_found select _existingIndex select 1) + 1]]; + }; + }; + } forEach _inventory; + + _found +}; + +private _listBox = findDisplay 38580 displayCtrl 71303; +private _foundSyringes = [_syringes] call _syringesFound; + +private _populateListBox = { + params ["_foundSyringes", "_listBox"]; + + lbClear _listBox; + { + private _syringeItem = _x select 0; + private _syringeCount = _x select 1; + if (_syringeItem != "") then { + private _config = configFile >> "CfgWeapons" >> _syringeItem; + private _displayName = getText (_config >> "displayName"); + private _picture = getText (_config >> "picture"); + private _data = toLower ((_syringeItem splitString "_") select 1); + private _entryText = format ["%1 (x%2)", _displayName, _syringeCount]; + private _index = _listBox lbAdd _entryText; + _listBox lbSetPicture [_index, _picture]; + _listBox lbSetData [_index, _data]; + }; + } forEach _foundSyringes; +}; + +[_foundSyringes, _listBox] call _populateListBox; }, [], 0.01] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/gui/gui.hpp b/addons/gui/gui.hpp index 4a10981b0..013e5bcdc 100644 --- a/addons/gui/gui.hpp +++ b/addons/gui/gui.hpp @@ -1,12 +1,11 @@ class RscText; class RscStructuredText; class RscButton; -class RscPicture; class RscListBox; class RscActivePicture; -class RscButtonMenu; class RscControlsGroup; class RscControlsGroupNoScrollbars; +class RscCombo; class ace_medical_gui_TriageToggle: RscButton { x = QUOTE(POS_X(14.33)); @@ -33,7 +32,7 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { show = 0; }; class Torso_ChestSeal: Background { - idc = IDC_BODY_TORSO_CHESTSEAL; + idc = IDC_BODY_TORSO_LEFTCHESTSEAL; text = QPATHTOF(data\body_image\torso_chestseal.paa); colorText[] = {1, 0.95, 0, 1}; show = 0; @@ -47,6 +46,14 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { idc = IDC_BODY_HEAD_KINGLT; text = QPATHTOF(data\body_image\head_kinglt.paa); }; + class Head_NPA: Head_GuedelTube { + idc = IDC_BODY_HEAD_NPA; + text = QPATHTOF(data\body_image\NPA.paa); + }; + class Neck_CRIKE: Head_GuedelTube { + idc = IDC_BODY_NECK_CRIKE; + text = QPATHTOF(data\body_image\Crike.paa); + }; class Head_NasalCannula: Torso_ChestSeal { idc = IDC_BODY_HEAD_NASAL; text = QPATHTOF(data\body_image\head_nasalcannula.paa); @@ -82,10 +89,52 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { colorText[] = {0.3, 0.6, 0.3, 1}; }; class Torso_Pneumothorax: Torso_ChestSeal { - idc = IDC_BODY_TORSO_PNEUMOTHORAX; + idc = IDC_BODY_TORSO_LEFTPNEUMOTHORAX; text = QPATHTOF(data\body_image\torso_pneumothorax.paa); colorText[] = {1, 1, 1, 1}; }; + class Torso_RightPneumothorax: Torso_ChestSeal { + idc = IDC_BODY_TORSO_RIGHTPNEUMOTHORAX; + text = QPATHTOF(data\body_image\torso_rightpneumothorax.paa); + colorText[] = {1, 1, 1, 1}; + }; + class Torso_RightChestSeal: Torso_ChestSeal { + idc = IDC_BODY_TORSO_RIGHTCHESTSEAL; + text = QPATHTOF(data\body_image\torso_rightchestseal.paa); + colorText[] = {1, 0.95, 0, 1}; + show = 0; + }; + class Torso_Evisceration: Torso_ChestSeal { + idc = IDC_BODY_TORSO_EVISCERATION; + text = QPATHTOF(data\body_image\torso_evisceration.paa); + colorText[] = {1, 1, 1, 1}; + }; + class Torso_WoundPack: Torso_ChestSeal { + idc = IDC_BODY_TORSO_WOUNDPACK; + text = QPATHTOF(data\body_image\torso_woundPack.paa); + colorText[] = {1, 1, 1, 1}; + }; + class Torso_WoundPack_Vacuum: Torso_ChestSeal { + idc = IDC_BODY_TORSO_WOUNDPACK_VACUUM; + text = QPATHTOF(data\body_image\torso_woundPack_vacuum.paa); + colorText[] = {1, 1, 1, 1}; + }; + class RightArm_IO: Torso_IO { + idc = IDC_BODY_RIGHTARM_IO; + text = QPATHTOF(data\body_image\EZIOURA.paa); + }; + class LeftArm_IO: RightArm_IO { + idc = IDC_BODY_LEFTARM_IO; + text = QPATHTOF(data\body_image\EZIOULA.paa); + }; + class RightLeg_IO: RightArm_IO { + idc = IDC_BODY_RIGHTLEG_IO; + text = QPATHTOF(data\body_image\EZIOLRL.paa); + }; + class LeftLeg_IO: RightArm_IO { + idc = IDC_BODY_LEFTLEG_IO; + text = QPATHTOF(data\body_image\EZIOLLL.paa); + }; class RightArm_IV: Torso_IO { idc = IDC_BODY_RIGHTARM_IV; text = QPATHTOF(data\body_image\rightarm_iv.paa); @@ -102,9 +151,182 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { idc = IDC_BODY_LEFTLEG_IV; text = QPATHTOF(data\body_image\leftleg_iv.paa); }; + class Neck_EJV: RightArm_IV { + idc = IDC_BODY_NECK_EJV; + text = QPATHTOF(data\body_image\EJV.paa); + }; + class Head: Background { + idc = IDC_BODY_HEAD; + text = QPATHTOF(data\body_image\head.paa); + }; + class Neck: Background { + idc = IDC_BODY_NECK; + text = QPATHTOF(data\body_image\neck.paa); + }; + class Chest: Background { + idc = IDC_BODY_CHEST; + text = QPATHTOF(data\body_image\chest.paa); + }; + class Torso: Background { + idc = IDC_BODY_TORSO; + text = QPATHTOF(data\body_image\torso.paa); + }; + class ArmLeft: Background { + idc = IDC_BODY_ARMLEFT; + text = QPATHTOF(data\body_image\arm_left.paa); + }; + class ArmUpperLeft: Background { + idc = IDC_BODY_ARMUPPERLEFT; + text = QPATHTOF(data\body_image\arm_upper_left.paa); + }; + class ArmRight: Background { + idc = IDC_BODY_ARMRIGHT; + text = QPATHTOF(data\body_image\arm_right.paa); + }; + class ArmUpperRight: Background { + idc = IDC_BODY_ARMUPPERRIGHT; + text = QPATHTOF(data\body_image\arm_upper_right.paa); + }; + class LegLeft: Background { + idc = IDC_BODY_LEGLEFT; + text = QPATHTOF(data\body_image\leg_left.paa); + }; + class LegUpperLeft: Background { + idc = IDC_BODY_LEGUPPERLEFT; + text = QPATHTOF(data\body_image\leg_upper_left.paa); + }; + class LegRight: Background { + idc = IDC_BODY_LEGRIGHT; + text = QPATHTOF(data\body_image\leg_right.paa); + }; + class LegUpperRight: Background { + idc = IDC_BODY_LEGUPPERRIGHT; + text = QPATHTOF(data\body_image\leg_upper_right.paa); + }; + class ArmLeftB: Background { + idc = IDC_BODY_ARMLEFT_B; + text = QPATHTOF(data\body_image\arm_left_b.paa); + colorText[] = {0, 0, 0.8, 1}; + show = 0; + }; + class ArmUpperLeftB: ArmLeftB { + idc = IDC_BODY_ARMUPPERLEFT_B; + text = QPATHTOF(data\body_image\arm_upper_left_b.paa); + }; + class ArmRightB: ArmLeftB { + idc = IDC_BODY_ARMRIGHT_B; + text = QPATHTOF(data\body_image\arm_right_b.paa); + }; + class ArmUpperRightB: ArmLeftB { + idc = IDC_BODY_ARMUPPERRIGHT_B; + text = QPATHTOF(data\body_image\arm_upper_right_b.paa); + }; + class LegLeftB: ArmLeftB { + idc = IDC_BODY_LEGLEFT_B; + text = QPATHTOF(data\body_image\leg_left_b.paa); + }; + class LegUpperLeftB: ArmLeftB { + idc = IDC_BODY_LEGUPPERLEFT_B; + text = QPATHTOF(data\body_image\leg_upper_left_b.paa); + }; + class LegRightB: ArmLeftB { + idc = IDC_BODY_LEGRIGHT_B; + text = QPATHTOF(data\body_image\leg_right_b.paa); + }; + class LegUpperRightB: ArmLeftB { + idc = IDC_BODY_LEGUPPERRIGHT_B; + text = QPATHTOF(data\body_image\leg_upper_right_b.paa); + }; + class ArmLeftT: Background { + idc = IDC_BODY_ARMLEFT_T; + text = QPATHTOF(data\body_image\arm_lower_left_t.paa); + colorText[] = {0, 0, 0.8, 1}; + show = 0; + }; + class ArmRightT: ArmLeftT { + idc = IDC_BODY_ARMRIGHT_T; + text = QPATHTOF(data\body_image\arm_lower_right_t.paa); + }; + class LegLeftT: ArmLeftT { + idc = IDC_BODY_LEGLEFT_T; + text = QPATHTOF(data\body_image\leg_lower_left_t.paa); + }; + class LegRightT: ArmLeftT { + idc = IDC_BODY_LEGRIGHT_T; + text = QPATHTOF(data\body_image\leg_lower_right_t.paa); + }; + class ArmUpperLeftT: ArmLeftT { + idc = IDC_BODY_ARMUPPERLEFT_T; + text = QPATHTOF(data\body_image\arm_left_t.paa); + }; + class ArmUpperRightT: ArmLeftT { + idc = IDC_BODY_ARMUPPERRIGHT_T; + text = QPATHTOF(data\body_image\arm_right_t.paa); + }; + class LegUpperLeftT: ArmLeftT { + idc = IDC_BODY_LEGUPPERLEFT_T; + text = QPATHTOF(data\body_image\leg_left_t.paa); + }; + class LegUpperRightT: ArmLeftT { + idc = IDC_BODY_LEGUPPERRIGHT_T; + text = QPATHTOF(data\body_image\leg_right_t.paa); + }; + class HeadS: Background { + idc = IDC_BODY_HEAD_S; + text = QPATHTOF(data\body_image\head_s.paa); + colorText[] = {1.0, 1.0, 1.0, 1.0}; + show = 0; + }; + class NeckS: Background { + idc = IDC_BODY_NECK_S; + text = QPATHTOF(data\body_image\neck_s.paa); + colorText[] = {1.0, 1.0, 1.0, 1.0}; + show = 0; + }; + class ChestS: HeadS { + idc = IDC_BODY_CHEST_S; + text = QPATHTOF(data\body_image\chest_s.paa); + }; + class TorsoS: HeadS { + idc = IDC_BODY_TORSO_S; + text = QPATHTOF(data\body_image\torso_s.paa); + }; + class ArmLeftS: HeadS { + idc = IDC_BODY_ARMLEFT_S; + text = QPATHTOF(data\body_image\arm_left_s.paa); + }; + class ArmRightS: HeadS { + idc = IDC_BODY_ARMRIGHT_S; + text = QPATHTOF(data\body_image\arm_right_s.paa); + }; + class LegLeftS: HeadS { + idc = IDC_BODY_LEGLEFT_S; + text = QPATHTOF(data\body_image\leg_left_s.paa); + }; + class LegRightS: HeadS { + idc = IDC_BODY_LEGRIGHT_S; + text = QPATHTOF(data\body_image\leg_right_s.paa); + }; + class ArmUpperLeftS: HeadS { + idc = IDC_BODY_ARMUPPERLEFT_S; + text = QPATHTOF(data\body_image\arm_upper_left_s.paa); + }; + class ArmUpperRightS: HeadS { + idc = IDC_BODY_ARMUPPERRIGHT_S; + text = QPATHTOF(data\body_image\arm_upper_right_s.paa); + }; + class LegUpperLeftS: HeadS { + idc = IDC_BODY_LEGUPPERLEFT_S; + text = QPATHTOF(data\body_image\leg_upper_left_s.paa); + }; + class LegUpperRightS: HeadS { + idc = IDC_BODY_LEGUPPERRIGHT_S; + text = QPATHTOF(data\body_image\leg_upper_right_s.paa); + }; }; }; + class ACE_Medical_Menu { class controlsBackground { class IVFlowBackground: RscText { @@ -167,7 +389,28 @@ class ACE_Medical_Menu { shadow = "true"; }; }; - }; + class SYRINGEBackground: IVFlowBackground { + idc = IDC_SYRINGE_BACKGROUND; // LOOK HERE + x = QUOTE(POS_X(39.6)); + y = QUOTE(POS_Y(4.9)); + w = QUOTE(POS_W(9)); + h = QUOTE(POS_H(16.5)); + }; + class SYRINGETitle: IVFlowTitle { + idc = IDC_SYRINGE_TITLE; // LOOK HERE + text = CSTRING(SYRINGETitle); + x = QUOTE(POS_X(39.6)); + y = QUOTE(POS_Y(4.9)); + w = QUOTE(POS_W(9)); + h = QUOTE(POS_H(1)); + show = 1; + class Attributes { + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "true"; + }; + }; + }; class controls { class IVbutton: RscButton { idc = IDC_IV_FLOW_SHOWBUTTON; // LOOK HERE @@ -240,7 +483,7 @@ class ACE_Medical_Menu { }; class HeadSubtractFull: RscButton { idc = IDC_IV_FLOW_HEADSUBTRACTFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),0,-0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,-0.5)] call FUNC(handleIVAdjust)); text = "<<"; x = QUOTE(POS_X(-7.5)); y = QUOTE(POS_Y(2.5)); @@ -259,7 +502,7 @@ class ACE_Medical_Menu { }; class HeadSubtract: RscButton { idc = IDC_IV_FLOW_HEADSUBTRACT; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),0,-0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,-0.1)] call FUNC(handleIVAdjust)); text = "<"; x = QUOTE(POS_X(-6)); y = QUOTE(POS_Y(2.5)); @@ -293,9 +536,26 @@ class ACE_Medical_Menu { size = 1; }; }; + class HeadIVRate: RscStructuredText { + idc = IDC_IV_FLOW_HEADIVRATE; // LOOK HERE + text = CSTRING(IVRate); + x = QUOTE(POS_X(-5)); + y = QUOTE(POS_Y(1.5)); + w = QUOTE(POS_W(2)); + h = QUOTE(POS_H(1)); + colorBackground[] = {0, 0, 0, 0.2}; + show = 0; + class Attributes { + align = "center"; + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "false"; + size = 1; + }; + }; class HeadAdd: RscButton { idc = IDC_IV_FLOW_HEADADD; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),0,0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,0.1)] call FUNC(handleIVAdjust)); text = ">"; x = QUOTE(POS_X(-3)); y = QUOTE(POS_Y(2.5)); @@ -314,7 +574,7 @@ class ACE_Medical_Menu { }; class HeadAddFull: RscButton { idc = IDC_IV_FLOW_HEADADDFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),0,0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,0.5)] call FUNC(handleIVAdjust)); text = ">>"; x = QUOTE(POS_X(-1.5)); y = QUOTE(POS_Y(2.5)); @@ -348,26 +608,30 @@ class ACE_Medical_Menu { }; class ChestSubtractFull: HeadSubtractFull { idc = IDC_IV_FLOW_CHESTSUBTRACTFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,-0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,-0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(5)); }; class ChestSubtract: HeadSubtract { idc = IDC_IV_FLOW_CHESTSUBTRACT; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,-0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,-0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(5)); }; class ChestIVValue: HeadIVValue { idc = IDC_IV_FLOW_CHESTTEST; // LOOK HERE y = QUOTE(POS_Y(5)); }; + class ChestIVRate: HeadIVRate { + idc = IDC_IV_FLOW_CHESTIVRATE; // LOOK HERE + y = QUOTE(POS_Y(4.1)); + }; class ChestAdd: HeadAdd { idc = IDC_IV_FLOW_CHESTADD; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(5)); }; class ChestAddFull: HeadAddFull { idc = IDC_IV_FLOW_CHESTADDFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),1,0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(5)); }; @@ -387,26 +651,30 @@ class ACE_Medical_Menu { }; class LArmSubtractFull: HeadSubtractFull { idc = IDC_IV_FLOW_LARMSUBTRACTFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,-0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,-0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(7.6)); }; class LArmSubtract: HeadSubtract { idc = IDC_IV_FLOW_LARMSUBTRACT; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,-0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,-0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(7.6)); }; class LArmIVValue: HeadIVValue { idc = IDC_IV_FLOW_LARMIVVALUE; // LOOK HERE y = QUOTE(POS_Y(7.6)); }; + class LArmIVRate: HeadIVRate { + idc = IDC_IV_FLOW_LARMIVRATE; // LOOK HERE + y = QUOTE(POS_Y(6.6)); + }; class LArmAdd: HeadAdd { idc = IDC_IV_FLOW_LARMADD; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(7.6)); }; class LArmAddFull: HeadAddFull { idc = IDC_IV_FLOW_LARMADDFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),2,0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(7.6)); }; @@ -426,26 +694,30 @@ class ACE_Medical_Menu { }; class RArmSubtractFull: HeadSubtractFull { idc = IDC_IV_FLOW_RARMSUBTRACTFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),3,-0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),6,-0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(10.3)); }; class RArmSubtract: HeadSubtract { idc = IDC_IV_FLOW_RARMSUBTRACT; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),3,-0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),6,-0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(10.3)); }; class RArmIVValue: HeadIVValue { idc = IDC_IV_FLOW_RARMIVVALUE; // LOOK HERE y = QUOTE(POS_Y(10.3)); }; + class RArmIVRate: HeadIVRate { + idc = IDC_IV_FLOW_RARMIVRATE; // LOOK HERE + y = QUOTE(POS_Y(9.3)); + }; class RArmAdd: HeadAdd { idc = IDC_IV_FLOW_RARMADD; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),3,0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),6,0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(10.3)); }; class RArmAddFull: HeadAddFull { idc = IDC_IV_FLOW_RARMADDFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),3,0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),6,0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(10.3)); }; @@ -465,26 +737,30 @@ class ACE_Medical_Menu { }; class LLegSubtractFull: HeadSubtractFull { idc = IDC_IV_FLOW_LLEGSUBTRACTFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,-0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),9,-0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(12.9)); }; class LLegSubtract: HeadSubtract { idc = IDC_IV_FLOW_LLEGSUBTRACT; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,-0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),9,-0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(12.9)); }; class LLegIVValue: HeadIVValue { idc = IDC_IV_FLOW_LLEGIVVALUE; // LOOK HERE y = QUOTE(POS_Y(12.9)); }; + class LLegIVRate: HeadIVRate { + idc = IDC_IV_FLOW_LLEGIVRATE; // LOOK HERE + y = QUOTE(POS_Y(12)); + }; class LLegAdd: HeadAdd { idc = IDC_IV_FLOW_LLEGADD; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),9,0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(12.9)); }; class LLegAddFull: HeadAddFull { idc = IDC_IV_FLOW_LLEGADDFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),4,0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),9,0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(12.9)); }; @@ -504,26 +780,30 @@ class ACE_Medical_Menu { }; class RLegSubtractFull: HeadSubtractFull { idc = IDC_IV_FLOW_RLEGSUBTRACTFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),5,-0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),11,-0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(15.5)); }; class RLegSubtract: HeadSubtract { idc = IDC_IV_FLOW_RLEGSUBTRACT; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),5,-0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),11,-0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(15.5)); }; class RLegIVValue: HeadIVValue { idc = IDC_IV_FLOW_RLEGIVVALUE; // LOOK HERE y = QUOTE(POS_Y(15.5)); }; + class RLegIVRate: HeadIVRate { + idc = IDC_IV_FLOW_RLEGIVRATE; // LOOK HERE + y = QUOTE(POS_Y(14.6)); + }; class RLegAdd: HeadAdd { idc = IDC_IV_FLOW_RLEGADD; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),5,0.1)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),11,0.1)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(15.5)); }; class RLegAddFull: HeadAddFull { idc = IDC_IV_FLOW_RLEGADDFULL; // LOOK HERE - onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),5,0.5)] call FUNC(handleIVAdjust)); + onButtonClick = QUOTE([ARR_3(ACEGVAR(medical_gui,target),11,0.5)] call FUNC(handleIVAdjust)); y = QUOTE(POS_Y(15.5)); }; @@ -593,28 +873,10 @@ class ACE_Medical_Menu { idc = IDC_TEST_PH; // LOOK HERE x = QUOTE(POS_X(43)); }; - class Test_Reset: RscButton { - idc = IDC_TEST_RESET; // LOOK HERE - onButtonClick = QUOTE([ACEGVAR(medical_gui,target)] call FUNC(dumpBloodGas)); - text = CSTRING(TestReset); + class Test_Reset: HCO3_Output { + idc = IDC_TEST_CA; // LOOK HERE x = QUOTE(POS_X(46)); - y = QUOTE(POS_Y(3)); - w = QUOTE(POS_W(2.1)); - h = QUOTE(POS_H(1)); - colorText[] = {1, 1, 1, 0.9}; - colorActive[] = {0, 0, 0, 0.7}; - colorBackground[] = {0, 0, 0, 0.7}; - colorBackgroundActive[] = {1, 1, 1, 1}; - colorBorder[] = {0,0,0,0}; - show = 0; - class Attributes { - align = "center"; - font = "RobotoCondensed"; - shadow = "false"; - }; }; - - class Triage: RscActivePicture {}; class Surgery: Triage { idc = IDC_SURGERY; @@ -640,5 +902,434 @@ class ACE_Medical_Menu { class BodyLabelRight: BodyLabelLeft { idc = IDC_SIDE_LABEL_RIGHT; }; + class SyringeOpenButton: RscButton { + idc = IDC_SYRINGE_OPEN; + text = CSTRING(OpenSyringeMenu); + x = QUOTE(POS_X(23.6)); + y = QUOTE(POS_Y(0)); + w = QUOTE(POS_W(4.4)); + h = QUOTE(POS_H(1)); + show = 0; + colorBackground[] = {0, 0, 0, 0}; + colorBackgroundActive[] = {1, 1, 1, 0.4}; + colorBackgroundDisabled[] = {0, 0, 0, 0}; + colorBorder[] = {0,0,0,0}; + onButtonClick = QUOTE([false] call FUNC(openSyringeMenu)); + class Attributes { + align = "Right"; + valign = "bottom"; + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "false"; + }; + }; + class SyringeControlGroup: RscControlsGroup { + idc = IDC_SYRINGE_GROUP; + x = QUOTE(POS_X(39.6)); + y = QUOTE(POS_Y(4.9)); + w = QUOTE(POS_W(9.2)); + h = QUOTE(POS_H(16.5)); + class controls { + class SyringeCloseButton: RscButton { + idc = IDC_SYRINGE_CLOSE; + text = CSTRING(CloseMenu); + x = QUOTE(POS_X(10.3)); + y = QUOTE(POS_Y(0)); + w = QUOTE(POS_W(2)); + h = QUOTE(POS_H(1)); + onButtonClick = QUOTE([] call FUNC(closeSyringeMenu)); + class Attributes { + align = "Right"; + valign = "bottom"; + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "false"; + }; + }; + class SyringeTypeTitle: RscStructuredText { + idc = IDC_SYRINGE_TYPE_TITLE; // LOOK HERE + text = CSTRING(SyringeTitleList); + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(1.3)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(1)); + colorBackground[] = {0, 0, 0, 0.5}; + show = 1; + class Attributes { + align = "center"; + valign = "bottom"; + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "false"; + }; + }; + class SyringeList: RscListBox { + idc = IDC_SYRINGE_TYPE_LIST; // LOOK HERE + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(2.3)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(2)); + show = 1; + }; + class MedicationTypeTitle: RscStructuredText { + idc = IDC_MEDICATION_TYPE_TITLE; // LOOK HERE + text = CSTRING(MedicationTitleList); + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(4.6)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(1)); + colorBackground[] = {0, 0, 0, 0.5}; + show = 1; + class Attributes { + align = "center"; + valign = "bottom"; + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "false"; + }; + }; + class MedicationList: RscListBox { + idc = IDC_MEDICATION_TYPE_LIST; // LOOK HERE + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(5.6)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(6)); + show = 1; + }; + class DoseTitle: RscStructuredText { + idc = IDC_MEDICATION_DOSE_TITLE; // LOOK HERE + text = CSTRING(DoseTitle); + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(12)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(1)); + colorBackground[] = {0, 0, 0, 0.5}; + show = 1; + class Attributes { + align = "center"; + valign = "bottom"; + color = "#E5E5E5"; + font = "RobotoCondensed"; + shadow = "false"; + }; + }; + class DoseList: RscCombo { + idc = IDC_MEDICATION_DOSE_COMBO; // LOOK HERE + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(13)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(1)); + show = 1; + }; + class PrepSyringe: RscButton { + idc = IDC_MEDICATION_PREP_SYRINGE; // LOOK HERE + text = CSTRING(PrepSyringe); + x = QUOTE(POS_X(3.8)); + y = QUOTE(POS_Y(14.5)); + w = QUOTE(POS_W(8)); + h = QUOTE(POS_H(1.5)); + onButtonClick = QUOTE([] call FUNC(prepSyringe)); + colorText[] = {1, 1, 1, 0.9}; + colorActive[] = {0, 0, 0, 0.7}; + colorBackground[] = {0, 0, 0, 0.7}; + colorBackgroundActive[] = {1, 1, 1, 1}; + colorBorder[] = {0,0,0,0}; + show = 1; + class Attributes { + align = "center"; + font = "RobotoCondensed"; + shadow = "false"; + }; + }; + }; + }; + class SelectHead: RscButton { + idc = -1; + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 0); + tooltip = CSTRING(SelectHead); + x = QUOTE(POS_X(19.3)); + y = QUOTE(POS_Y(3.2)); + w = QUOTE(POS_W(1.4)); + h = QUOTE(POS_H(1.2)); + colorFocused[] = {0, 0, 0, 0}; + colorBackground[] = {0, 0, 0, 0}; + colorBackgroundActive[] = {0, 0, 0, 0}; + }; + class SelectNeck: RscButton { + idc = -1; + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 1); + tooltip = CSTRING(SelectNeck); + x = QUOTE(POS_X(19.3)); + y = QUOTE(POS_Y(4.4)); + w = QUOTE(POS_W(1.4)); + h = QUOTE(POS_H(0.6)); + colorFocused[] = {0, 0, 0, 0}; + colorBackground[] = {0, 0, 0, 0}; + colorBackgroundActive[] = {0, 0, 0, 0}; + }; + class SelectChest: SelectHead { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 2); + tooltip = CSTRING(SelectChest); + x = QUOTE(POS_X(18.9)); + y = QUOTE(POS_Y(5)); + w = QUOTE(POS_W(2.2)); + h = QUOTE(POS_H(1.9)); + }; + class SelectTorso: SelectHead { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 3); + tooltip = CSTRING(SelectTorso); + x = QUOTE(POS_X(18.9)); + y = QUOTE(POS_Y(6.9)); + w = QUOTE(POS_W(2.2)); + h = QUOTE(POS_H(1.9)); + }; + class SelectUpperArmLeft: SelectHead { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 4); + tooltip = CSTRING(SelectLeftArm); + x = QUOTE(POS_X(21.1)); + y = QUOTE(POS_Y(7.4)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(2.3)); + }; + class SelectArmLeft: SelectUpperArmLeft { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 5); + tooltip = CSTRING(SelectUpperLeftArm); + x = QUOTE(POS_X(21.1)); + y = QUOTE(POS_Y(5.1)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(2.3)); + }; + class SelectUpperArmRight: SelectUpperArmLeft { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 6); + tooltip = CSTRING(SelectRightArm); + x = QUOTE(POS_X(17.8)); + y = QUOTE(POS_Y(7.4)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(2.3)); + }; + class SelectArmRight: SelectUpperArmRight { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 7); + tooltip = CSTRING(SelectUpperRightArm); + x = QUOTE(POS_X(17.8)); + y = QUOTE(POS_Y(5.1)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(2.3)); + }; + class SelectUpperLegLeft: SelectHead { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 8); + tooltip = CSTRING(SelectLeftLeg); + x = QUOTE(POS_X(20.0)); + y = QUOTE(POS_Y(11.7)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(2.1)); + }; + class SelectLegLeft: SelectUpperLegLeft { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 9); + tooltip = CSTRING(SelectUpperLeftLeg); + x = QUOTE(POS_X(20.0)); + y = QUOTE(POS_Y(8.1)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(3.6)); + }; + class SelectUpperLegRight: SelectHead { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 10); + tooltip = CSTRING(SelectRightLeg); + x = QUOTE(POS_X(18.9)); + y = QUOTE(POS_Y(11.7)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(2.1)); + }; + class SelectLegRight: SelectUpperLegRight { + onButtonClick = QUOTE(ACEGVAR(medical_gui,selectedBodyPart) = 11); + tooltip = CSTRING(SelectUpperRightLeg); + x = QUOTE(POS_X(18.9)); + y = QUOTE(POS_Y(8.1)); + w = QUOTE(POS_W(1.1)); + h = QUOTE(POS_H(3.6)); + }; }; }; + +class RscTitles { + class ACEGVAR(medical_gui,RscPatientInfo) { + class controls { + class PatientInfoContainer: RscControlsGroupNoScrollbars { + class controls { + class BodyImage: ACEGVAR(medical_gui,BodyImage) { + x = QUOTE(POS_W(2.25)); + y = QUOTE(POS_H(1.5)); + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + class controls: controls { + class Background: Background { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class Head: Head { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class Neck: Neck { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class Torso: Torso { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class Chest: Chest { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmLeft: ArmLeft { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperLeft: ArmUpperLeft { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmRight: ArmRight { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperRight: ArmUpperRight { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegLeft: LegLeft { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegRight: LegRight { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperLeft: LegUpperLeft { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperRight: LegUpperRight { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmLeftB: ArmLeftB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmRightB: ArmRightB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegLeftB: LegLeftB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegRightB: LegRightB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperLeftB: ArmUpperLeftB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperRightB: ArmUpperRightB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperLeftB: LegUpperLeftB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperRightB: LegUpperRightB { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmLeftT: ArmLeftT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmRightT: ArmRightT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegLeftT: LegLeftT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegRightT: LegRightT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperLeftT: ArmUpperLeftT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperRightT: ArmUpperRightT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperLeftT: LegUpperLeftT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperRightT: LegUpperRightT { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class HeadS: HeadS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class NeckS: NeckS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ChestS: ChestS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class TorsoS: TorsoS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmLeftS: ArmLeftS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmRightS: ArmRightS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegLeftS: LegLeftS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegRightS: LegRightS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperLeftS: ArmUpperLeftS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class ArmUpperRightS: ArmUpperRightS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperLeftS: LegUpperLeftS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + class LegUpperRightS: LegUpperRightS { + w = QUOTE(POS_W(8.5)); + h = QUOTE(POS_H(8.5)); + }; + }; + }; + }; + }; + }; + }; +}; + diff --git a/addons/gui/gui_defines.hpp b/addons/gui/gui_defines.hpp index 470885a1d..c12f862e4 100644 --- a/addons/gui/gui_defines.hpp +++ b/addons/gui/gui_defines.hpp @@ -22,27 +22,89 @@ #define IDC_ACTION_BUTTON_GROUP 1599 #define IDC_BODY_GROUP 6000 +/*#undef IDC_BODY_HEAD +#undef IDC_BODY_NECK +#undef IDC_BODY_TORSO +#undef IDC_BODY_CHEST +#undef IDC_BODY_ARMLEFT +#undef IDC_BODY_ARMUPPERLEFT +#undef IDC_BODY_ARMRIGHT +#undef IDC_BODY_ARMUPPERRIGHT +#undef IDC_BODY_LEGLEFT +#undef IDC_BODY_LEGUPPERLEFT +#undef IDC_BODY_LEGRIGHT +#undef IDC_BODY_LEGUPPERRIGHT +#undef IDC_BODY_ARMLEFT_T +#undef IDC_BODY_ARMUPPERLEFT_T +#undef IDC_BODY_ARMRIGHT_T +#undef IDC_BODY_ARMUPPERRIGHT_T +#undef IDC_BODY_LEGLEFT_T +#undef IDC_BODY_LEGUPPERLEFT_T +#undef IDC_BODY_LEGRIGHT_T +#undef IDC_BODY_LEGUPPERRIGHT_T +#undef IDC_BODY_ARMLEFT_B +#undef IDC_BODY_ARMUPPERLEFT_B +#undef IDC_BODY_ARMRIGHT_B +#undef IDC_BODY_ARMUPPERRIGHT_B +#undef IDC_BODY_LEGLEFT_B +#undef IDC_BODY_LEGUPPERLEFT_B +#undef IDC_BODY_LEGRIGHT_B +#undef IDC_BODY_LEGUPPERRIGHT_B +#undef IDC_BODY_GROUP_S +#undef IDC_BODY_HEAD_S +#undef IDC_BODY_NECK_S +#undef IDC_BODY_TORSO_S +#undef IDC_BODY_CHEST_S +#undef IDC_BODY_ARMLEFT_S +#undef IDC_BODY_ARMUPPERLEFT_S +#undef IDC_BODY_ARMRIGHT_S +#undef IDC_BODY_ARMUPPERRIGHT_S +#undef IDC_BODY_LEGLEFT_S +#undef IDC_BODY_LEGUPPERLEFT_S +#undef IDC_BODY_LEGRIGHT_S +#undef IDC_BODY_LEGUPPERRIGHT_S */ + #define IDC_BODY_HEAD 6005 +#define IDC_BODY_NECK 6006 #define IDC_BODY_TORSO 6010 +#define IDC_BODY_CHEST 6011 #define IDC_BODY_ARMLEFT 6015 +#define IDC_BODY_ARMUPPERLEFT 6016 #define IDC_BODY_ARMRIGHT 6020 +#define IDC_BODY_ARMUPPERRIGHT 6021 #define IDC_BODY_LEGLEFT 6025 +#define IDC_BODY_LEGUPPERLEFT 6026 #define IDC_BODY_LEGRIGHT 6030 +#define IDC_BODY_LEGUPPERRIGHT 6031 #define IDC_BODY_ARMLEFT_T 6035 +#define IDC_BODY_ARMUPPERLEFT_T 6036 #define IDC_BODY_ARMRIGHT_T 6040 +#define IDC_BODY_ARMUPPERRIGHT_T 6041 #define IDC_BODY_LEGLEFT_T 6045 +#define IDC_BODY_LEGUPPERLEFT_T 6046 #define IDC_BODY_LEGRIGHT_T 6050 +#define IDC_BODY_LEGUPPERRIGHT_T 6051 #define IDC_BODY_ARMLEFT_B 6055 +#define IDC_BODY_ARMUPPERLEFT_B 6056 #define IDC_BODY_ARMRIGHT_B 6060 +#define IDC_BODY_ARMUPPERRIGHT_B 6061 #define IDC_BODY_LEGLEFT_B 6065 +#define IDC_BODY_LEGUPPERLEFT_B 6066 #define IDC_BODY_LEGRIGHT_B 6070 +#define IDC_BODY_LEGUPPERRIGHT_B 6071 #define IDC_BODY_GROUP_S 6075 #define IDC_BODY_HEAD_S 6080 +#define IDC_BODY_NECK_S 6081 #define IDC_BODY_TORSO_S 6085 +#define IDC_BODY_CHEST_S 6086 #define IDC_BODY_ARMLEFT_S 6090 +#define IDC_BODY_ARMUPPERLEFT_S 6091 #define IDC_BODY_ARMRIGHT_S 6095 +#define IDC_BODY_ARMUPPERRIGHT_S 6096 #define IDC_BODY_LEGLEFT_S 6100 +#define IDC_BODY_LEGUPPERLEFT_S 6101 #define IDC_BODY_LEGRIGHT_S 6105 +#define IDC_BODY_LEGUPPERRIGHT_S 6106 #define IDC_SIDE_LABEL_RIGHT 7001 #define IDC_SIDE_LABEL_LEFT 7002 @@ -56,11 +118,19 @@ #define IDC_BODY_HEAD_GUEDELTUBE 70110 #define IDC_BODY_HEAD_KINGLT 70111 #define IDC_BODY_HEAD_NASAL 70112 +#define IDC_BODY_HEAD_NPA 70113 +#define IDC_BODY_NECK_CRIKE 70118 +#define IDC_BODY_NECK_EJV 70119 #define IDC_BODY_TORSO_AED_PADS 70120 -#define IDC_BODY_TORSO_CHESTSEAL 70121 -#define IDC_BODY_TORSO_PNEUMOTHORAX 70122 +#define IDC_BODY_TORSO_LEFTCHESTSEAL 70121 +#define IDC_BODY_TORSO_LEFTPNEUMOTHORAX 70122 #define IDC_BODY_TORSO_IO 70123 +#define IDC_BODY_TORSO_RIGHTCHESTSEAL 70124 +#define IDC_BODY_TORSO_RIGHTPNEUMOTHORAX 70125 +#define IDC_BODY_TORSO_EVISCERATION 70126 +#define IDC_BODY_TORSO_WOUNDPACK 70127 +#define IDC_BODY_TORSO_WOUNDPACK_VACUUM 70128 #define IDC_BODY_RIGHTARM_AED_VITALS 70130 #define IDC_BODY_LEFTARM_AED_VITALS 70131 @@ -68,9 +138,13 @@ #define IDC_BODY_LEFTARM_PULSEOX 70133 #define IDC_BODY_RIGHTARM_IV 70134 #define IDC_BODY_LEFTARM_IV 70135 +#define IDC_BODY_RIGHTARM_IO 70136 +#define IDC_BODY_LEFTARM_IO 70137 #define IDC_BODY_RIGHTLEG_IV 70141 #define IDC_BODY_LEFTLEG_IV 70142 +#define IDC_BODY_RIGHTLEG_IO 70143 +#define IDC_BODY_LEFTLEG_IO 70144 #define IDC_ADD_MENUS 71099 @@ -83,6 +157,7 @@ #define IDC_IV_FLOW_HEADADD 71107 #define IDC_IV_FLOW_HEADSUBTRACTFULL 71108 #define IDC_IV_FLOW_HEADADDFULL 71109 +#define IDC_IV_FLOW_HEADIVRATE 71150 #define IDC_IV_FLOW_CHESTCOVER 71110 #define IDC_IV_FLOW_CHESTTITLE 71111 @@ -92,6 +167,7 @@ #define IDC_IV_FLOW_CHESTADD 71115 #define IDC_IV_FLOW_CHESTSUBTRACTFULL 71116 #define IDC_IV_FLOW_CHESTADDFULL 71117 +#define IDC_IV_FLOW_CHESTIVRATE 71151 #define IDC_IV_FLOW_LARMCOVER 71118 #define IDC_IV_FLOW_LARMTITLE 71119 @@ -101,6 +177,7 @@ #define IDC_IV_FLOW_LARMADD 71123 #define IDC_IV_FLOW_LARMSUBTRACTFULL 71124 #define IDC_IV_FLOW_LARMADDFULL 71125 +#define IDC_IV_FLOW_LARMIVRATE 71152 #define IDC_IV_FLOW_LLEGCOVER 71126 #define IDC_IV_FLOW_LLEGTITLE 71127 @@ -110,6 +187,7 @@ #define IDC_IV_FLOW_LLEGADD 71131 #define IDC_IV_FLOW_LLEGSUBTRACTFULL 71132 #define IDC_IV_FLOW_LLEGADDFULL 71133 +#define IDC_IV_FLOW_LLEGIVRATE 71153 #define IDC_IV_FLOW_RLEGCOVER 71134 #define IDC_IV_FLOW_RLEGTITLE 71135 @@ -119,6 +197,7 @@ #define IDC_IV_FLOW_RLEGADD 71139 #define IDC_IV_FLOW_RLEGSUBTRACTFULL 71140 #define IDC_IV_FLOW_RLEGADDFULL 71141 +#define IDC_IV_FLOW_RLEGIVRATE 71154 #define IDC_IV_FLOW_RARMCOVER 71142 #define IDC_IV_FLOW_RARMTITLE 71143 @@ -128,8 +207,9 @@ #define IDC_IV_FLOW_RARMADD 71147 #define IDC_IV_FLOW_RARMSUBTRACTFULL 71148 #define IDC_IV_FLOW_RARMADDFULL 71149 +#define IDC_IV_FLOW_RARMIVRATE 71155 -#define IDC_IV_FLOW_SHOWBUTTON 71150 +#define IDC_IV_FLOW_SHOWBUTTON 71160 #define IDC_IV_FLOW_BACKGROUND 71199 @@ -139,8 +219,20 @@ #define IDC_TEST_SPO2 71204 #define IDC_TEST_HCO3 71205 #define IDC_TEST_PH 71206 -#define IDC_TEST_RESET 71207 - -#define IDC_TEST_SHOWBUTTON 71208 - -#define IDC_ABG_BACKGROUND 71299 +#define IDC_TEST_CA 71207 +#define IDC_TEST_SHOWBUTTON 71208 +#define IDC_TEST_TIME 71209 +#define IDC_TEST_ETCO2 71210 +#define IDC_ABG_BACKGROUND 71299 +#define IDC_SYRINGE_TITLE 71300 +#define IDC_SYRINGE_BACKGROUND 71301 +#define IDC_SYRINGE_TYPE_TITLE 71302 +#define IDC_SYRINGE_TYPE_LIST 71303 +#define IDC_MEDICATION_TYPE_TITLE 71304 +#define IDC_MEDICATION_TYPE_LIST 71305 +#define IDC_MEDICATION_DOSE_TITLE 71306 +#define IDC_MEDICATION_DOSE_COMBO 71307 +#define IDC_MEDICATION_PREP_SYRINGE 71308 +#define IDC_SYRINGE_CLOSE 71309 +#define IDC_SYRINGE_OPEN 71310 +#define IDC_SYRINGE_GROUP 71311 diff --git a/addons/gui/initSettings.inc.sqf b/addons/gui/initSettings.inc.sqf index 1381520df..3db512924 100644 --- a/addons/gui/initSettings.inc.sqf +++ b/addons/gui/initSettings.inc.sqf @@ -10,6 +10,15 @@ ] call CBA_fnc_addSetting; // Label left and right in medical menu +//[ +// QGVAR(localPain), +// "CHECKBOX", +// [LSTRING(localPain_DisplayName), LSTRING(localPain_Description)], +// [CBA_SETTINGS_CAT, LSTRING(SubCategory_Basic)], +// [false], +// true +//] call CBA_fnc_addSetting; + [ QGVAR(showPatientSideLabels), "CHECKBOX", @@ -17,4 +26,13 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Basic)], [false], false -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting; + +[ + QGVAR(showBleeding), + "LIST", + [LSTRING(showBleeding_DisplayName), LSTRING(showBleeding_Description)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Basic)], + [[0, 1, 2, 3], [ACELSTRING(common,Disabled), ACELSTRING(common,Enabled), LSTRING(ShowBleeding_Rate), LSTRING(ShowBleeding_Rate_Limb)], 2], + true // isGlobal +] call CBA_fnc_addSetting; diff --git a/addons/gui/script_component.hpp b/addons/gui/script_component.hpp index a0922f1fb..54be553f2 100644 --- a/addons/gui/script_component.hpp +++ b/addons/gui/script_component.hpp @@ -16,18 +16,6 @@ #include "\x\kat\addons\main\script_macros.hpp" -#define POS_X(N) ((N) * GUI_GRID_W + GUI_GRID_CENTER_X) -#define POS_Y(N) ((N) * GUI_GRID_H + GUI_GRID_CENTER_Y) -#define POS_W(N) ((N) * GUI_GRID_W) -#define POS_H(N) ((N) * GUI_GRID_H) - -#define PATIENT_INFO_IGUI_BASE_X (safeZoneX + POS_W(2)) -#define PATIENT_INFO_IGUI_BASE_Y (safeZoneY + POS_H(1)) -#define PATIENT_INFO_IGUI_X (profilenamespace getVariable ['TRIPLES(IGUI,GVAR(patientInfo),X)', 0]) -#define PATIENT_INFO_IGUI_Y (profilenamespace getVariable ['TRIPLES(IGUI,GVAR(patientInfo),Y)', 0]) -#define PATIENT_INFO_IGUI_OFFSET_X (PATIENT_INFO_IGUI_X - PATIENT_INFO_IGUI_BASE_X) -#define PATIENT_INFO_IGUI_OFFSET_Y (PATIENT_INFO_IGUI_Y - PATIENT_INFO_IGUI_BASE_Y) - #undef MED_LOG_VARNAME #define MED_LOG_VARNAME(type) (format ["ace_medical_log_%1", type]) diff --git a/addons/gui/stringtable.xml b/addons/gui/stringtable.xml index 3d48feed5..5677b1c3e 100644 --- a/addons/gui/stringtable.xml +++ b/addons/gui/stringtable.xml @@ -95,6 +95,17 @@ 0 0.0 + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0 + 0.0 + LEFT ARM - NO LINE LEVÁ RUKA - BEZ LINIE @@ -279,5 +290,760 @@ KAT - ADV Medical: GUI KAM - GUI + + Syringe Preparation + + + Syringe Type + + + Medication Type + + + Dose Size + + + Infusion + + + Prepare Meds + + + Close + + + Meds Prep + + + Please make a selection in All Categories + + + That is not a valid Meds Combo %1 %2 %3 + + + Preparing %1 + + + Prepared %1 + + + Prepared %1 + + + Torso + + + Chest + + + Neck + + + Head + + + Left Arm + + + Upper Left Arm + + + Right Arm + + + Upper Right Arm + + + Left Leg + + + Upper Left Leg + + + Right Leg + + + Upper Right Leg + + + Select Head + + + Select Neck + + + Select Chest + + + Select Torso + + + Select Lower Left Arm + + + Select Upper Left Arm + + + Select Lower Right Arm + + + Select Upper Right Arm + + + Select Lower Left Leg + + + Select Upper Left Leg + + + Select Lower Right Leg + + + Select Upper Right Leg + + + [Wrapped] Splinted + + + Scrape + Odřenina + Écorchure + Arañazo + Scorticatura + Draśnięcie + Raspão + Ссадина + Kratzer + 긁힘 + 擦り傷 + 擦傷 + 擦伤 + Sıyrık + Horzsolás + + + Large Scrape + Velká odřenina + Grande écorchure + Arañazo severo + Ampia Scorticatura + Duże draśnięcie + Raspão grave + Большая ссадина + Großer Kratzer + 심하게 긁힘 + 大きな擦り傷 + 嚴重擦傷 + 重度擦伤 + Büyük Sıyrık + Nagy horzsolás + + + Medium Scrape + Středně velká odřenina + Moyenne écorchure + Arañazo medio + Media Scorticatura + Średnie draśnięcie + Raspão médio + Средняя ссадина + Mittlerer Kratzer + 꽤 긁힘 + 中くらいの擦り傷 + 中度擦傷 + 中度擦伤 + Orta Sıyrık + Közepes horzsolás + + + Minor Scrape + Malá odřenina + Petite écorchure + Arañazo menor + Minima Scorticatura + Pomniejsze draśnięcie + Raspão leve + Малая ссадина + Kleiner Kratzer + 조금 긁힘 + 小さな擦り傷 + 小擦傷 + 轻度擦伤 + Küçük Sıyrık + Kis horzsolás + + + Avulsion + Avulze + Avulsion + Avulsión + Avulsione + Rana płatowa + Avulsão + Авульсия + Avulsion + 찢김 + 剥離傷 + 撕除傷 + 撕脱伤 + Kopma + Leszakadás + + + Large Avulsion + Velká avulze + Grande avulsion + Avulsión severa + Grande Avulsione + Duża rana płatowa + Avulsão grave + Большая Авульсия + Große Avulsion + 크게 찢김 + 大きな剥離傷 + 嚴重撕除傷 + 重度撕脱伤 + Büyük Kopuk + Nagy leszakadás + + + Medium Avulsion + Střední avulze + Moyenne avulsion + Avulsión media + Media Avulsione + Średnia rana płatowa + Avulsão média + Средняя Авульсия + Mittlere Avulsion + 꽤 찢김 + 中くらいの剥離傷 + 中度撕除傷 + 中度撕脱伤 + Orta Kopuk + Közepes leszakadás + + + Minor Avulsion + Malá avulze + Petite avulsion + Avulsión menor + Piccola Avulsione + Pomniejsza rana płatowa + Avulsão leve + Малая Авульсия + Kleine Avulsion + 조금 찢김 + 小さな剥離傷 + 小撕除傷 + 轻度撕脱伤 + Küçük Kopuk + Kis leszakadás + + + Bruise + Modřina + Hématome + Contusión + Contusione + Stłuczenie + Contusão + Ушиб + Prellung + + 打撲傷 + 挫傷 + 挫伤 + Yara + Zúzódás + + + Large Bruise + Velká modřina + Grand hématome + Contusión severa + Grande Contusione + Duże stłuczenie + Contusão grave + Сильный ушиб + Große Prellung + 심하게 멍듬 + 大きな打撲傷 + 嚴重挫傷 + 重度挫伤 + Büyük Yara + Nagy zúzódás + + + Medium Bruise + Středně velká modřina + Moyen hématome + Contusión media + Media Contusione + Średnie stłuczenie + Contusão média + Средний ушиб + Mittlere Prellung + 꽤 멍듬 + 中くらいの打撲傷 + 中度挫傷 + 中度挫伤 + Orta Yara + Közepes zúzódás + + + Minor Bruise + Malá modřina + Petit hématome + Contusión menor + Piccola Contusione + Pomniejsze stłuczenie + Contusão leve + Слабый ушиб + Kleine Prellung + 조금 멍듬 + 小さな打撲傷 + 小挫傷 + 轻度挫伤 + Küçük Yara + Kis zúzódás + + + Crushed Tissue + Zhmoždění měkkých tkání + Tissu écrasé + Tejido triturado + Tessuto Schiacciato + Zgniecienie tkanek miękkich + Tecido esmagado + Компрессионная травма + Quetschverletzung + 뭉개짐 + 圧挫傷 + 壓迫傷 + 挤压伤 + Ezilmiş Doku + Zúzott szövet + + + Large Crushed Tissue + Velké zhmoždění měkkých tkání + Tissu fortement écrasé + Tejido triturado severo + Molto Tessuto Schiacciato + Duże zgniecienie tkanek miękkich + Tecido esmagado grave + Сильная компрессионная травма + Große Quetschverletzung + 심하게 뭉개짐 + 大きな圧挫傷 + 嚴重壓迫傷 + 重度挤压伤 + Büyük Ezilmiş Doku + Nagy zúzött szövet + + + Medium Crushed Tissue + Střední zhmoždění měkkých tkání + Tissu moyennement écrasé + Tejido triturado medio + Medio Tessuto Schiacciato + Średnie zgniecienie tkanek miękkich + Tecido esmagado médio + Умеренная компрессионная травма + Mittlere Quetschverletzung + 꽤 뭉개짐 + 中くらいの圧挫傷 + 中度壓迫傷 + 中度挤压伤 + Orta Ezilmiş Doku + Közepes zúzott szövet + + + Minor Crushed Tissue + Malé zhmoždění měkkých tkání + Tissu légèrement écrasé + Tejido triturado menor + Poco Tessuto Schiacciato + Pomniejsze zgniecienie tkanek miękkich + Tecido esmagado leve + Слабая компрессионная травма + Kleine Quetschverletzung + 조금 뭉개짐 + 小さな圧挫傷 + 小壓迫傷 + 轻度挤压伤 + Küçük Ezilmiş Doku + Kis zúzott szövet + + + Cut + Řezná rána + Coupure + Corte + Taglio + Rana cięta + Corte + Порез + Schnittwunde + 베임 + 切り傷 + 割傷 + 割伤 + Kesik + Vágás + + + Large Cut + Velká řezná rána + Large coupure + Corte severo + Grande Taglio + Duża rana cięta + Corte grave + Сильный порез + Große Schnittwunde + 심하게 베임 + 大きな切り傷 + 嚴重割傷 + 重度割伤 + Büyük Kesik + Nagy vágás + + + Medium Cut + Střední řezná rána + Coupure moyenne + Corte mediano + Medio Taglio + Średnia rana cięta + Corte médio + Средний порез + Mittlere Schnittwunde + 꽤 베임 + 中くらいの切り傷 + 中度割傷 + 中度割伤 + Orta Kesik + Közepes vágás + + + Small Cut + Malá řezná rána + Petite coupure + Corte menor + Piccolo Taglio + Pomniejsza rana cięta + Corte leve + Мелкий порез + Kleine Schnittwunde + 조금 베임 + 小さな切り傷 + 小割傷 + 轻度割伤 + Küçük Kesik + Kis vágás + + + Tear + Tržná rána + Lacération + Desgarro + Strappo + Rozerwanie skóry + Ruptura + Рваная рана + Riss + 열상 + 裂傷 + 撕裂傷 + 撕裂伤 + Yırtık + Szakadás + + + Large Tear + Velká tržná rána + Grande lacération + Desgarro severo + Grande Strappo + Duże rozerwanie skóry + Ruptura grave + Большая рваная рана + Großer Riss + 심한 열상 + 大きな裂傷 + 嚴重撕裂傷 + 重度撕裂伤 + Büyük Yırtık + Nagy szakadás + + + Medium Tear + Střední tržná rána + Moyenne lacération + Desgarro medio + Medio Strappo + Średnie rozerwanie skóry + Ruptura média + Средняя рваная рана + Mittlerer Riss + 꽤 큰 열상 + 中くらいの裂傷 + 中度撕裂傷 + 中度撕裂伤 + Orta Yırtık + Közepes szakadás + + + Small Tear + Malá tržná rána + Petite lacération + Desgarro menor + Piccolo Strappo + Pomniejsze rozerwanie skóry + Ruptura leve + Малая рваная рана + Kleiner Riss + 조그마한 열상 + 小さな裂傷 + 小撕裂傷 + 轻度撕裂伤 + Küçük Yırtık + Kis szakadás + + + Puncture Wound + Bodná rána + Blessure par perforation + Herida punzante + Ferita Perforante + Rana kłuta + Ferimento por perfuração + Колотая рана + Stichwunde + 관통상 + 刺し傷 + 刺傷 + 刺伤 + Delinme Yarası + Szúrt seb + + + Large Puncture Wound + Velká bodná rána + Grande perforation + Herida punzante severa + Grande Ferita Perforante + Duża rana kłuta + Ferimento grave por perfuração + Большая колотая рана + Große Stichwunde + 대형 관통상 + 大きな刺し傷 + 嚴重刺傷 + 重度刺伤 + Büyük Delinme Yarası + Nagy szúrt seb + + + Medium Puncture Wound + Střední bodná rána + Moyenne perforation + Herida punzante media + Media Ferita Perforante + Średnia rana kłuta + Ferimento médio por perfuração + Средняя колотая рана + Mittlere Stichwunde + 중형 관통상 + 中くらいの刺し傷 + 中度刺傷 + 中度刺伤 + Orta Delinme Yarası + Közepes szúrt seb + + + Minor Puncture Wound + Malá bodná rána + Petite perforation + Herida punzante menor + Piccola Ferita Perforante + Pomniejsza rana kłuta + Ferimento leve por perfuração + Малая колотая рана + Kleine Stichwunde + 소형 관통상 + 小さな刺し傷 + 小刺傷 + 轻度刺伤 + Küçük Delinme Yarası + Kis szúrt seb + + + Thermal Burn + Brûlure thermique + Quemadura térmica + Ustione Termica + Oparzenie + Queimadura Térmica + Термический ожог + Thermische Verbrennung + 화상 + 熱傷 + 热灼伤 + + + Major Thermal Burn + Sévère brûlure thermique + Quemadura térmica severa + Severa Ustione Termica + Duże oparzenie + Queimadura Térmica Grave + Сильный термический ожог + Schwere thermische Verbrennung + 심각한 화상 + 重度の熱傷 + 重度热灼伤 + + + Medium Thermal Burn + Brûlure thermique modérée + Quemadura térmica media + Media Ustione Termica + Średnie oparzenie + Queimadura Térmica Média + Средний термический ожог + Mittlere thermische Verbrennung + 꽤 큰 화상 + 中度の熱傷 + 中度热灼伤 + + + Minor Thermal Burn + Légère brûlure thermique + Quemadura térmica menor + Leggera Ustione Termica + Pomniejsze oparzenie + Queimadura Térmica Leve + Незначительный термический ожог + Leichte thermische Verbrennung + 작은 화상 + 軽度の熱傷 + 轻微热灼伤 + + + Velocity Wound + Střelné poranění + Plaie pénétrante + Herida de bala + Ferita Balistica + Rana postrzałowa + Ferimento por projétil de arma de fogo + Огнестрельная рана + Ballistisches Trauma + 총상 + 銃創 + 槍傷 + 穿透伤 + Hız Yarası + Lőtt seb + + + Large Velocity Wound + Velké střelné poranění + Grande plaie pénétrante + Herida de bala severa + Grande Ferita Balistica + Duża rana postrzałowa + Ferimento grave por projétil de arma de fogo + Большая огнестрельная рана + Großes Ballistisches Trauma + 대형 총상 + 大きな銃創 + 嚴重槍傷 + 重度穿透伤 + Büyük Hız Yarası + Nagy lőtt seb + + + Medium Velocity Wound + Střední střelné poranění + Plaie moyenne pénétrante + Herida de bala media + Media Ferita Balistica + Średnia rana postrzałowa + Ferimento médio por projétil de arma de fogo + Средняя огнестрельная рана + Mittleres Ballistisches Trauma + 중형 총상 + 中くらいの銃創 + 中度槍傷 + 中度穿透伤 + Orta Hız Yarası + Közepes lőtt seb + + + Small Velocity Wound + Malé střelné poranění + Petite plaie pénétrante + Herida de bala menor + Piccola Ferita Balistica + Pomniejsza rana postrzałowa + Ferimento leve por projétil de arma de fogo + Малая огнестрельная рана + Kleines Ballistisches Trauma + 소형 총상 + 小さな銃創 + 小槍傷 + 轻度穿透伤 + Küçük Hız Yarası + Kis lőtt seb + + + Severe Internal Bleeding + + + Moderate Internal Bleeding + + + Light Internal Bleeding + + + Show Bleeding Rate + Afficher le taux de saignement + Mostrar tasa de sangrado + Mostra rateo di sanguinamento + Mostrar taxa de sangramento + Показать частоту кровотечения + Blutungsrate anzeigen + 출혈 속도 표시 + 出血速度の表示 + 显示流血速度 + + + Show Bleeding Rate Per Limb + + + Display if the patient is bleeding, optionally with rate or with rate on a part by part basis + + + Show Bleeding State + Afficher l'état des saignements + Mostrar estado de sangrado + Mostra stato di sanguinamento + Mostrar estado de sangramento + Показать состояние кровотечения + Blutungsstatus anzeigen + 출혈 상태 표시 + 出血状態の表示 + 显示流血速度 + + + Display if the patient has pain, if enabled pain will only be shown to the player experiencing it + + + Local Pain Display + diff --git a/addons/hitpoints/$PBOPREFIX$ b/addons/hitpoints/$PBOPREFIX$ new file mode 100644 index 000000000..059495bb9 --- /dev/null +++ b/addons/hitpoints/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\hitpoints \ No newline at end of file diff --git a/addons/hitpoints/ACE_Medical_Injuries.hpp b/addons/hitpoints/ACE_Medical_Injuries.hpp new file mode 100644 index 000000000..49ba87d54 --- /dev/null +++ b/addons/hitpoints/ACE_Medical_Injuries.hpp @@ -0,0 +1,396 @@ +// bleeding - maximum possible percentage of cardiac output bled for a given wound type (0 .. 1) +// pain - maximum possible pain level for a given wound type (0 .. 1) + +class ACE_Medical_Injuries { + // Defines all the possible injury types + class wounds { + // Source: Scarle + // Also called scrapes, they occur when the skin is rubbed away by friction against another rough surface (e.g. rope burns and skinned knees). + class Abrasion { + bleeding = 0.001; + pain = 0.4; + }; + // Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions. + class Avulsion { + bleeding = 0.07; + pain = 1.0; + causeLimping = 1; + }; + // Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions. + class Contusion { + bleeding = 0; + pain = 0.3; + causeFracture = 1; + }; + // Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures. + class Crush { + bleeding = 0.04; + pain = 0.8; + causeLimping = 1; + causeFracture = 1; + }; + // Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision. + class Cut { + bleeding = 0.01; + pain = 0.2; + }; + // Also called tears, these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source as in childbirth, or from an external source like a punch. + class Laceration { + bleeding = 0.03; + pain = 0.3; + }; + // Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel. + class VelocityWound { + bleeding = 0.12; + pain = 0.9; + causeLimping = 1; + causeFracture = 1; + }; + // Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass. + class PunctureWound { + bleeding = 0.03; + pain = 0.5; + causeLimping = 1; + }; + // Pain wound that is caused by making or being in contact with heat + class ThermalBurn { + bleeding = 0; + pain = 0.7; + minDamage = 0; + }; + // wound that is caused by Non-Penetrative Blasts, cannot be bandaged externally. + class InternalBleeding { + bleeding = 0.01; + pain = 0.1; + }; + class Incision { + bleeding = 0.2; + pain = 0.8; + }; + }; + + class damageTypes { + // thresholds[] {{, }, {...}} + // if damage is between two points, number is interpolated and then rounded by chance based on the decimal part + // e.g. a value of 2.7 has 70% chance to give 3 and 30% to give 2 + // put damage values in descending order; uses the first value found that is below the wound damage, and the point immediately before that + thresholds[] = {{0.1, 1}}; + + // if 1, wounds are only applied to the hitpoint that took the most damage. othewrise, wounds are applied to all damaged hitpoints + selectionSpecific = 1; + + // list of damage handlers, which will be called in reverse order + // each entry should be a SQF expression that returns a function + // this can also be overridden for each damage type + class woundHandlers { + ACEGVAR(medical_damage,woundsHandlerBase) = QACEFUNC(medical_damage,woundsHandlerBase); + }; + + class bullet { + // bullets only create multiple wounds when the damage is very high + thresholds[] = {{20, 8}, {18, 6}, {15, 5}, {12, 4}, {10, 3}, {8, 2}, {5, 1}, {0, 1}}; + selectionSpecific = 1; + class woundHandlers: woundHandlers { + GVAR(eviscerationHit) = QFUNC(woundsHandlerEviscerationHit); + EGVAR(breathing,pulmoHit) = QEFUNC(breathing,woundsHandlerPulmoHit); + GVAR(pelvicHit) = QFUNC(woundsHandlerPelvicHit); + EGVAR(airway,airwayHit) = QEFUNC(airway,handleAirwayHit); + EGVAR(brain,concussion) = QEFUNC(brain,concussionWH); + GVAR(armorPenetration) = QFUNC(woundsHandlerArmorPenetration); + }; + + class Avulsion { + // at damage, weight. between points, weight is interpolated then wound is chosen by weighted random. + // as with thresholds, but result is not rounded (decimal values used as-is) + weighting[] = {{1, 1}, {0.35, 0}}; + /* + damageMultiplier = 1; + sizeMultiplier = 1; + bleedingMultiplier = 1; + painMultiplier = 1; + fractureMultiplier = 1; + */ + }; + class Contusion { + weighting[] = {{0.35, 0}, {0.35, 1}}; + // bruises caused by bullets hitting the plate are big + sizeMultiplier = 3.2; + // increase the pain to allow for bruises to actually knock out on repeated hits + painMultiplier = 2.2; + }; + class VelocityWound { + // velocity wounds are only in the 0.35-1.5 range + weighting[] = {{1, 1}, {0.35, 0}}; + // velocity wounds will tend to be medium or large + sizeMultiplier = 0.9; + }; + }; + class grenade { + // at low damage numbers, chance to create no wounds - makes it a bit more random instead of consistently covering people in bruises + thresholds[] = {{20, 10}, {10, 5}, {4, 3}, {1.5, 2}, {0.8, 2}, {0.3, 1}, {0, 0}}; + selectionSpecific = 0; + class woundHandlers: woundHandlers { + GVAR(eviscerationHit) = QFUNC(woundsHandlerEviscerationHit); + EGVAR(airway,airwayHit) = QEFUNC(airway,handleAirwayHit); + }; + class Avulsion { + weighting[] = {{1.5, 1}, {1.1, 0}}; + }; + class VelocityWound { + weighting[] = {{1.5, 1}, {1.1, 1}, {0.7, 0}}; + }; + class PunctureWound { + weighting[] = {{0.9, 2}, {0.7, 1}, {0.35, 0}}; + }; + class Cut { + weighting[] = {{0.7, 2}, {0.35, 1}, {0.35, 0}}; + }; + class Contusion { + weighting[] = {{0.5, 1}, {0.35, 1}}; + sizeMultiplier = 2; + painMultiplier = 0.9; + }; + }; + class explosive { + // explosives create more and smaller wounds than grenades + thresholds[] = {{20, 15}, {8, 7}, {2, 3}, {1.2, 2}, {0.4, 1}, {0,0}}; + selectionSpecific = 0; + class woundHandlers: woundHandlers { + GVAR(eviscerationHit) = QFUNC(woundsHandlerEviscerationHit); + EGVAR(breathing,pulmoHit) = QEFUNC(breathing,woundsHandlerPulmoHit); + GVAR(jointHit) = QFUNC(woundsHandlerJoints); + GVAR(pelvicHit) = QFUNC(woundsHandlerPelvicHit); + EGVAR(airway,airwayHit) = QEFUNC(airway,handleAirwayHit); + }; + class Avulsion { + weighting[] = {{1, 1}, {0.8, 0}}; + }; + class Cut { + weighting[] = {{1.5, 1}, {0.35, 1}, {0, 0}}; + }; + class Laceration { + weighting[] = {{1.5, 1}, {0.35, 1}, {0, 0}}; + }; + class Contusion { + weighting[] = {{1, 2}, {0.35, 1}}; + sizeMultiplier = 2; + painMultiplier = 0.9; + }; + }; + class shell { + // shells tend to involve big pieces of shrapnel, so create fewer and larger wounds + thresholds[] = {{20, 10}, {10, 5}, {4.5, 2}, {2, 2}, {0.8, 1}, {0.2, 1}, {0, 0}}; + selectionSpecific = 0; + class woundHandlers: woundHandlers { + GVAR(eviscerationHit) = QFUNC(woundsHandlerEviscerationHit); + EGVAR(breathing,pulmoHit) = QEFUNC(breathing,woundsHandlerPulmoHit); + GVAR(jointHit) = QFUNC(woundsHandlerJoints); + GVAR(pelvicHit) = QFUNC(woundsHandlerPelvicHit); + EGVAR(airway,airwayHit) = QEFUNC(airway,handleAirwayHit); + }; + class Avulsion { + weighting[] = {{1.5, 1}, {1.1, 0}}; + }; + class VelocityWound { + weighting[] = {{1.5, 1}, {1.1, 1}, {0.7, 0}}; + }; + class PunctureWound { + weighting[] = {{0.9, 1}, {0.7, 1}, {0.35, 0}}; + }; + class Cut { + weighting[] = {{0.7, 1}, {0.35, 1}, {0.35, 0}}; + }; + class Contusion { + weighting[] = {{0.5, 1}, {0.35, 1}}; + sizeMultiplier = 2; + painMultiplier = 0.9; + }; + }; + class vehiclehit { + // vehicle explosions are usually caused by explosive damage and should behave similarly + thresholds[] = {{6, 4}, {4.5, 3}, {2, 2}, {0.8, 1}, {0.2, 1}, {0, 0}}; + selectionSpecific = 0; + class woundHandlers: woundHandlers { + ACEGVAR(medical_damage,woundsHandlerVehiclehit) = QFUNC(woundsHandlerVehiclehit); + GVAR(eviscerationHit) = QFUNC(woundsHandlerEviscerationHit); + EGVAR(breathing,pulmoHit) = QEFUNC(breathing,woundsHandlerPulmoHit); + GVAR(jointHit) = QFUNC(woundsHandlerJoints); + GVAR(pelvicHit) = QFUNC(woundsHandlerPelvicHit); + EGVAR(airway,airwayHit) = QEFUNC(airway,handleAirwayHit); + }; + class Avulsion { + weighting[] = {{1, 1}, {0.8, 0}}; + }; + class Cut { + weighting[] = {{1.5, 1}, {0.35, 1}, {0, 0}}; + }; + class VelocityWound { + weighting[] = {{1.5, 1}, {0.35, 1}, {0, 0}}; + }; + class PunctureWound { + weighting[] = {{1.5, 1}, {0.35, 1}, {0, 0}}; + }; + class Laceration { + weighting[] = {{1.5, 1}, {0.35, 1}, {0, 0}}; + }; + class Contusion { + weighting[] = {{1, 2}, {0.35, 1}}; + sizeMultiplier = 2; + painMultiplier = 0.9; + }; + }; + class vehiclecrash { + thresholds[] = {{1.5, 3}, {1.5, 2}, {1, 2}, {1, 1}, {0.05, 1}}; // prevent subdividing wounds past FRACTURE_DAMAGE_THRESHOLD to ensure limp/fractue is triggered + selectionSpecific = 0; + class woundHandlers: woundHandlers { + ACEGVAR(medical_damage,woundsHandlerVehiclecrash) = QACEFUNC(medical_damage,woundsHandlerVehiclecrash); + EGVAR(breathing,pulmoHit) = QEFUNC(breathing,woundsHandlerPulmoHit); + GVAR(jointHit) = QFUNC(woundsHandlerJoints); + GVAR(pelvicHit) = QFUNC(woundsHandlerPelvicHit); + }; + class Abrasion { + weighting[] = {{0.30, 0}, {0.30, 1}}; + }; + class Avulsion { + weighting[] = {{0.01, 1}, {0.01, 0}}; + }; + class Contusion { + weighting[] = {{0.35, 0}, {0.35, 1}}; + }; + class Crush { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + class Cut { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + class Laceration { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + }; + class collision { + thresholds[] = {{8, 4}, {1, 1}, {0.3, 1}, {0.15, 0.5}, {0, 0.3}}; // prevent subdividing wounds past FRACTURE_DAMAGE_THRESHOLD to ensure limp/fractue is triggered + selectionSpecific = 0; + class woundHandlers: woundHandlers { + GVAR(jointHit) = QFUNC(woundsHandlerJoints); + }; + class Avulsion { + weighting[] = {{1, 2}, {0.5, 0.5}, {0.5, 0}}; + }; + class Abrasion { + weighting[] = {{0.4, 1}, {0.2, 1}, {0, 0}}; + }; + class Contusion { + weighting[] = {{0.4, 1}, {0.2, 1}}; + }; + class Crush { + weighting[] = {{0.4, 1}, {0.2, 0}}; + }; + class Cut { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + class InternalBleeding { + weighting[] = {{0.4, 1}, {0.2, 1}}; + }; + class Laceration { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + }; + class falling { + thresholds[] = {{8, 4}, {1, 1}, {0.2, 1}, {0.1, 0.7}, {0, 0.5}}; // prevent subdividing wounds past FRACTURE_DAMAGE_THRESHOLD to ensure limp/fractue is triggered + selectionSpecific = 0; + class woundHandlers: woundHandlers { + GVAR(jointHit) = QFUNC(woundsHandlerJoints); + }; + class Abrasion { + weighting[] = {{0.4, 0}, {0.2, 1}, {0, 0}}; + sizeMultiplier = 3; + }; + class Contusion { + weighting[] = {{0.4, 0}, {0.2, 1}}; + sizeMultiplier = 3; + }; + class Crush { + weighting[] = {{0.4, 1}, {0.2, 0}}; + sizeMultiplier = 1.5; + }; + }; + class backblast { + thresholds[] = {{1, 6}, {1, 5}, {0.55, 5}, {0.55, 2}, {0, 2}}; + selectionSpecific = 0; + class Avulsion { + weighting[] = {{0.30, 0}, {0.30, 1}}; + }; + class Contusion { + weighting[] = {{0.35, 0}, {0.35, 1}}; + }; + class Cut { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + }; + class stab { + thresholds[] = {{0.1, 1}, {0.1, 0}}; + selectionSpecific = 1; + class woundHandlers: woundHandlers { + GVAR(eviscerationHit) = QFUNC(woundsHandlerEviscerationHit); + }; + class Cut { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + class PunctureWound { + weighting[] = {{0.02, 1}, {0.02, 0}}; + }; + }; + class punch { + thresholds[] = {{0.1, 1}, {0.1, 0}}; + selectionSpecific = 1; + class Contusion { + weighting[] = {{0.35, 0}, {0.35, 1}}; + }; + class Crush { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + }; + class ropeburn { + thresholds[] = {{0.1, 1}, {0.1, 0}}; + selectionSpecific = 1; + noBlood = 1; + class Abrasion { + weighting[] = {{0.30, 1}}; + }; + }; + class drowning { + //No related wounds as drowning should not cause wounds/bleeding. Can be extended for internal injuries if they are added. + thresholds[] = {{0, 0}}; + noBlood = 1; + class woundHandlers {}; + }; + class fire { + noBlood = 1; + // custom handling for environmental fire sources + // passes damage to "burn" so doesn't need its own wound stats + class woundHandlers { + ACEGVAR(medical_damage,woundsHandlerBurning) = QACEFUNC(medical_damage,woundsHandlerBurning); + }; + }; + class burn { + thresholds[] = {{0, 1}}; + selectionSpecific = 0; + noBlood = 1; + class ThermalBurn { + weighting[] = {{0, 1}}; + }; + }; + class unknown { + thresholds[] = {{0.1, 1}, {0.1, 0}}; + class Abrasion { + weighting[] = {{0.30, 0}, {0.30, 1}}; + }; + class Cut { + weighting[] = {{0.1, 1}, {0.1, 0}}; + }; + class VelocityWound { + weighting[] = {{0.35, 1}, {0.35, 0}}; + }; + }; + }; +}; diff --git a/addons/hitpoints/ACE_Medical_Treatment.hpp b/addons/hitpoints/ACE_Medical_Treatment.hpp new file mode 100644 index 000000000..ba040b308 --- /dev/null +++ b/addons/hitpoints/ACE_Medical_Treatment.hpp @@ -0,0 +1,3868 @@ +class ACE_Medical_Treatment { + class Bandaging { + class FieldDressing { + // How effect is the bandage for treating one wounds type injury + effectiveness = 1; + // What is the chance and delays (in seconds) of the treated default injury reopening + reopeningChance = 0; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + + class Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 200; + reopeningMaxDelay = 1000; + }; + class AbrasionMinor: Abrasion { + effectiveness = 3; + }; + class AbrasionMedium: Abrasion { + effectiveness = 2.5; + reopeningChance = 0.7; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + reopeningChance = 0.9; + }; + + class Avulsion: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.9; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.75; + }; + + class Contusion: Abrasion { + effectiveness = 0; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class Crush: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 200; + reopeningMaxDelay = 1000; + }; + class CrushMinor: Crush { + effectiveness = 1; + reopeningChance = 0.2; + }; + class CrushMedium: Crush { + effectiveness = 0.7; + reopeningChance = 0.3; + }; + class CrushLarge: Crush { + effectiveness = 0.6; + reopeningChance = 0.4; + }; + + class Cut: Abrasion { + effectiveness = 4; + reopeningChance = 0.1; + reopeningMinDelay = 300; + reopeningMaxDelay = 1000; + }; + class CutMinor: Cut { + effectiveness = 4; + reopeningChance = 0.1; + }; + class CutMedium: Cut { + effectiveness = 3; + reopeningChance = 0.3; + }; + class CutLarge: Cut { + effectiveness = 1; + reopeningChance = 0.5; + }; + + class Laceration: Abrasion { + effectiveness = 0.95; + reopeningChance = 0.3; + reopeningMinDelay = 100; + reopeningMaxDelay = 800; + }; + class LacerationMinor: Laceration { + effectiveness = 0.95; + reopeningChance = 0.3; + }; + class LacerationMedium: Laceration { + effectiveness = 0.7; + reopeningChance = 0.5; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + reopeningChance = 0.6; + }; + + class VelocityWound: Abrasion { + effectiveness = 2; + reopeningChance = 0.7; + reopeningMinDelay = 100; + reopeningMaxDelay = 500; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 2; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 1.5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 1; + }; + + class PunctureWound: Abrasion { + effectiveness = 2; + reopeningChance = 0.5; + reopeningMinDelay = 200; + reopeningMaxDelay = 850; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 2; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1.3; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.9; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + + class PackingBandage: FieldDressing { + class Abrasion { + effectiveness = 3; + reopeningChance = 0.6; + reopeningMinDelay = 800; + reopeningMaxDelay = 1500; + }; + class AbrasionMinor: Abrasion { + effectiveness = 3; + }; + class AbrasionMedium: Abrasion { + effectiveness = 2.5; + reopeningChance = 0.9; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + reopeningChance = 1; + }; + + class Avulsion: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.9; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.75; + }; + + class Contusion: Abrasion { + effectiveness = 0; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class Crush: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 600; + reopeningMaxDelay = 1000; + }; + class CrushMinor: Crush { + effectiveness = 1; + reopeningChance = 0.6; + }; + class CrushMedium: Crush { + effectiveness = 0.7; + reopeningChance = 0.7; + }; + class CrushLarge: Crush { + effectiveness = 0.6; + reopeningChance = 0.8; + }; + + class Cut: Abrasion { + effectiveness = 4; + reopeningChance = 0.4; + reopeningMinDelay = 700; + reopeningMaxDelay = 1000; + }; + class CutMinor: Cut { + effectiveness = 4; + reopeningChance = 0.6; + }; + class CutMedium: Cut { + effectiveness = 3; + reopeningChance = 0.7; + }; + class CutLarge: Cut { + effectiveness = 1; + reopeningChance = 0.8; + }; + + class Laceration: Abrasion { + effectiveness = 0.95; + reopeningChance = 0.65; + reopeningMinDelay = 500; + reopeningMaxDelay = 2000; + }; + class LacerationMinor: Laceration { + effectiveness = 0.95; + reopeningChance = 0.65; + }; + class LacerationMedium: Laceration { + effectiveness = 0.7; + reopeningChance = 0.8; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + reopeningChance = 0.9; + }; + + class VelocityWound: Abrasion { + effectiveness = 2; + reopeningChance = 1; + reopeningMinDelay = 800; + reopeningMaxDelay = 2000; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 2; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 1.5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 1; + }; + + class PunctureWound: Abrasion { + effectiveness = 2; + reopeningChance = 1; + reopeningMinDelay = 1000; + reopeningMaxDelay = 3000; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 2; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1.3; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.9; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + + class ElasticBandage: FieldDressing { + class Abrasion { + effectiveness = 4; + reopeningChance = 0.6; + reopeningMinDelay = 80; + reopeningMaxDelay = 150; + }; + class AbrasionMinor: Abrasion { + effectiveness = 4; + }; + class AbrasionMedium: Abrasion { + effectiveness = 3; + reopeningChance = 0.9; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2.5; + reopeningChance = 1; + }; + + class Avulsion: Abrasion { + effectiveness = 2; + reopeningChance = 0.7; + reopeningMinDelay = 100; + reopeningMaxDelay = 160; + }; + class AvulsionMinor: Avulsion { + effectiveness = 2; + }; + class AvulsionMedium: Avulsion { + effectiveness = 1.4; + }; + class AvulsionLarge: Avulsion { + effectiveness = 1; + }; + + class Contusion: Abrasion { + effectiveness = 0; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class Crush: Abrasion { + effectiveness = 2; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 100; + }; + class CrushMinor: Crush { + effectiveness = 2; + reopeningChance = 0.6; + }; + class CrushMedium: Crush { + effectiveness = 1.7; + reopeningChance = 0.7; + }; + class CrushLarge: Crush { + effectiveness = 1.6; + reopeningChance = 0.8; + }; + + class Cut: Abrasion { + effectiveness = 5; + reopeningChance = 0.4; + reopeningMinDelay = 70; + reopeningMaxDelay = 100; + }; + class CutMinor: Cut { + effectiveness = 5; + reopeningChance = 0.6; + }; + class CutMedium: Cut { + effectiveness = 3.5; + reopeningChance = 0.7; + }; + class CutLarge: Cut { + effectiveness = 2; + reopeningChance = 0.8; + }; + + class Laceration: Abrasion { + effectiveness = 2; + reopeningChance = 0.65; + reopeningMinDelay = 50; + reopeningMaxDelay = 200; + }; + class LacerationMinor: Laceration { + effectiveness = 2; + reopeningChance = 0.65; + }; + class LacerationMedium: Laceration { + effectiveness = 1.5; + reopeningChance = 0.8; + }; + class LacerationLarge: Laceration { + effectiveness = 1; + reopeningChance = 0.9; + }; + + class VelocityWound: Abrasion { + effectiveness = 2.2; + reopeningChance = 1; + reopeningMinDelay = 80; + reopeningMaxDelay = 200; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 2.2; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 1.75; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 1.5; + }; + + class PunctureWound: Abrasion { + effectiveness = 2.5; + reopeningChance = 1; + reopeningMinDelay = 100; + reopeningMaxDelay = 300; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 2.5; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 2; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 1.5; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + + class QuikClot: FieldDressing { + class Abrasion { + effectiveness = 2; + reopeningChance = 0.3; + reopeningMinDelay = 800; + reopeningMaxDelay = 1500; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + }; + class AbrasionMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.7; + reopeningChance = 0.5; + }; + + class Avulsion: Abrasion { + effectiveness = 0.7; + reopeningChance = 0.2; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class AvulsionMinor: Avulsion { + effectiveness = 0.7; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.65; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.5; + }; + + class Contusion: Abrasion { + effectiveness = 0; + reopeningChance = 0; + reopeningMinDelay = 0; + reopeningMaxDelay = 0; + }; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class Crush: Abrasion { + effectiveness = 0.6; + reopeningChance = 0.5; + reopeningMinDelay = 600; + reopeningMaxDelay = 1000; + }; + class CrushMinor: Crush { + effectiveness = 0.6; + reopeningChance = 0.3; + }; + class CrushMedium: Crush { + effectiveness = 0.5; + }; + class CrushLarge: Crush { + effectiveness = 0.4; + }; + + class Cut: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + reopeningMinDelay = 700; + reopeningMaxDelay = 1000; + }; + class CutMinor: Cut { + effectiveness = 2; + }; + class CutMedium: Cut { + effectiveness = 1; + }; + class CutLarge: Cut { + effectiveness = 0.6; + }; + + class Laceration: Abrasion { + effectiveness = 0.7; + reopeningChance = 0.4; + reopeningMinDelay = 500; + reopeningMaxDelay = 2000; + }; + class LacerationMinor: Laceration { + effectiveness = 0.7; + reopeningChance = 0.4; + }; + class LacerationMedium: Laceration { + effectiveness = 0.7; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 800; + reopeningMaxDelay = 2000; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0.75; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.5; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 1000; + reopeningMaxDelay = 3000; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 0.7; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.4; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class Hemostat: FieldDressing { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1; + reopeningMaxDelay = 2; + }; + class AbrasionMinor: Abrasion {}; + class AbrasionMedium: Abrasion {}; + class AbrasionLarge: Abrasion {}; + + class Avulsion: Abrasion {}; + class AvulsionMinor: Avulsion {}; + class AvulsionMedium: Avulsion {}; + class AvulsionLarge: Avulsion {}; + + class Contusion: Abrasion {}; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class Crush: Abrasion {}; + class CrushMinor: Crush {}; + class CrushMedium: Crush {}; + class CrushLarge: Crush {}; + + class Cut: Abrasion {}; + class CutMinor: Cut {}; + class CutMedium: Cut {}; + class CutLarge: Cut {}; + + class Laceration: Abrasion {}; + class LacerationMinor: Laceration {}; + class LacerationMedium: Laceration {}; + class LacerationLarge: Laceration {}; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 1; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 1; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class fourByfour_Gauze: FieldDressing { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + + class Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AbrasionMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + + class Avulsion: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.5; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.25; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 2; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class CrushMinor: Crush { + effectiveness = 2; + }; + class CrushMedium: Crush { + effectiveness = 1; + }; + class CrushLarge: Crush { + effectiveness = 1; + }; + + class Cut: Abrasion { + effectiveness = 2; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class CutMinor: Cut { + effectiveness = 2; + }; + class CutMedium: Cut { + effectiveness = 1; + }; + class CutLarge: Cut { + effectiveness = 0.5; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class LacerationMinor: Laceration { + effectiveness = 2; + }; + class LacerationMedium: Laceration { + effectiveness = 1; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0.5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.25; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 0.5; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.25; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class fourByfour_Gauze_wrapped: FieldDressing { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + + class Abrasion { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + }; + class AbrasionMedium: Abrasion { + effectiveness = 1; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.5; + }; + + class Avulsion: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.5; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.25; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class CrushMinor: Crush { + effectiveness = 2; + }; + class CrushMedium: Crush { + effectiveness = 1; + }; + class CrushLarge: Crush { + effectiveness = 1; + }; + + class Cut: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class CutMinor: Cut { + effectiveness = 2; + }; + class CutMedium: Cut { + effectiveness = 1; + }; + class CutLarge: Cut { + effectiveness = 0.5; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class LacerationMinor: Laceration { + effectiveness = 2; + }; + class LacerationMedium: Laceration { + effectiveness = 1; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0.5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.25; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 0.5; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.25; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 1000; + reopeningMaxDelay = 1600; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class Compressed_Gauze: FieldDressing { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + + class Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0.25; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.25; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + + class Avulsion: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 1; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.5; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class CrushMinor: Crush { + effectiveness = 0.5; + }; + class CrushMedium: Crush { + effectiveness = 0.5; + }; + class CrushLarge: Crush { + effectiveness = 0.25; + }; + + class Cut: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class CutMinor: Cut { + effectiveness = 0.5; + }; + class CutMedium: Cut { + effectiveness = 0.5; + }; + class CutLarge: Cut { + effectiveness = 0.25; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class LacerationMinor: Laceration { + effectiveness = 1; + }; + class LacerationMedium: Laceration { + effectiveness = 0.5; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.5; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 30; + reopeningMaxDelay = 90; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0.25; + reopeningChance = 0.8; + reopeningMinDelay = 120; + reopeningMaxDelay = 180; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0.25; + }; + }; + class Compressed_Gauze_wrapped: FieldDressing { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + + class Abrasion { + effectiveness = 0.5; + reopeningChance = 0.2; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0.5; + + }; + class AbrasionMedium: Abrasion { + effectiveness = 0.25; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.25; + }; + + class Avulsion: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 1; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.5; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CrushMinor: Crush { + effectiveness = 0.5; + }; + class CrushMedium: Crush { + effectiveness = 0.5; + }; + class CrushLarge: Crush { + effectiveness = 0.25; + }; + + class Cut: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CutMinor: Cut { + effectiveness = 0.5; + }; + class CutMedium: Cut { + effectiveness = 0.5; + }; + class CutLarge: Cut { + effectiveness = 0.25; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class LacerationMinor: Laceration { + effectiveness = 1; + }; + class LacerationMedium: Laceration { + effectiveness = 0.5; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.5; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + }; + class Hemostatic_Gauze: FieldDressing { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + + class Abrasion { + effectiveness = 0.5; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0.5; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0.25; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.25; + }; + + class Avulsion: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.5; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.5; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class CrushMinor: Crush { + effectiveness = 0.5; + }; + class CrushMedium: Crush { + effectiveness = 0.5; + }; + class CrushLarge: Crush { + effectiveness = 0.25; + }; + + class Cut: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class CutMinor: Cut { + effectiveness = 0.5; + }; + class CutMedium: Cut { + effectiveness = 0.5; + }; + class CutLarge: Cut { + effectiveness = 0.25; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class LacerationMinor: Laceration { + effectiveness = 1; + }; + class LacerationMedium: Laceration { + effectiveness = 0.5; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0.5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.5; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + }; + class Hemostatic_Gauze_wrapped: FieldDressing { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + + class Abrasion { + effectiveness = 0.5; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0.5; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0.25; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.25; + }; + + class Avulsion: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class AvulsionMinor: Avulsion { + effectiveness = 1; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0.5; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0.5; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class CrushMinor: Crush { + effectiveness = 0.5; + }; + class CrushMedium: Crush { + effectiveness = 0.5; + }; + class CrushLarge: Crush { + effectiveness = 0.25; + }; + + class Cut: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class CutMinor: Cut { + effectiveness = 0.5; + }; + class CutMedium: Cut { + effectiveness = 0.5; + }; + class CutLarge: Cut { + effectiveness = 0.25; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class LacerationMinor: Laceration { + effectiveness = 1; + }; + class LacerationMedium: Laceration { + effectiveness = 0.5; + }; + class LacerationLarge: Laceration { + effectiveness = 0.5; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 1; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0.5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0.5; + }; + + class PunctureWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0.5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + }; + class ETD: FieldDressing { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + + class Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 7; + + }; + class AbrasionMedium: Abrasion { + effectiveness = 6; + }; + class AbrasionLarge: Abrasion { + effectiveness = 6; + }; + + class Avulsion: Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class AvulsionMinor: Avulsion { + effectiveness = 5; + }; + class AvulsionMedium: Avulsion { + effectiveness = 5; + }; + class AvulsionLarge: Avulsion { + effectiveness = 5; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CrushMinor: Crush { + effectiveness = 6; + }; + class CrushMedium: Crush { + effectiveness = 5; + }; + class CrushLarge: Crush { + effectiveness = 5; + }; + + class Cut: Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CutMinor: Cut { + effectiveness = 5; + }; + class CutMedium: Cut { + effectiveness = 4; + }; + class CutLarge: Cut { + effectiveness = 4; + }; + + class Laceration: Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class LacerationMinor: Laceration { + effectiveness = 5; + }; + class LacerationMedium: Laceration { + effectiveness = 4; + }; + class LacerationLarge: Laceration { + effectiveness = 4; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 6; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 5; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 5; + }; + + class PunctureWound: Abrasion { + effectiveness = 6; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 8; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 6; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + }; + class Israeli_Bandage: FieldDressing { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + + class Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 4; + + }; + class AbrasionMedium: Abrasion { + effectiveness = 3; + }; + class AbrasionLarge: Abrasion { + effectiveness = 3; + }; + + class Avulsion: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class AvulsionMinor: Avulsion { + effectiveness = 3; + }; + class AvulsionMedium: Avulsion { + effectiveness = 2; + }; + class AvulsionLarge: Avulsion { + effectiveness = 1; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CrushMinor: Crush { + effectiveness = 3; + }; + class CrushMedium: Crush { + effectiveness = 2; + }; + class CrushLarge: Crush { + effectiveness = 2; + }; + + class Cut: Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CutMinor: Cut { + effectiveness = 3; + }; + class CutMedium: Cut { + effectiveness = 2; + }; + class CutLarge: Cut { + effectiveness = 2; + }; + + class Laceration: Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class LacerationMinor: Laceration { + effectiveness = 3; + }; + class LacerationMedium: Laceration { + effectiveness = 2; + }; + class LacerationLarge: Laceration { + effectiveness = 2; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 3; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 2; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 2; + }; + + class PunctureWound: Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 3; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 3; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 2; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.8; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class EviscerationMinor: Evisceration { + }; + class EviscerationMedium: Evisceration { + }; + class EviscerationLarge: Evisceration { + }; + }; + class Abdominal_Pad: FieldDressing { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + + class Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 3; + }; + class AbrasionMedium: Abrasion { + effectiveness = 3; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + }; + + class Avulsion: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class AvulsionMinor: Avulsion { + effectiveness = 3; + }; + class AvulsionMedium: Avulsion { + effectiveness = 2; + }; + class AvulsionLarge: Avulsion { + effectiveness = 2; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CrushMinor: Crush { + effectiveness = 3; + }; + class CrushMedium: Crush { + effectiveness = 3; + }; + class CrushLarge: Crush { + effectiveness = 2; + }; + + class Cut: Abrasion { + effectiveness = 3; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class CutMinor: Cut { + effectiveness = 3; + }; + class CutMedium: Cut { + effectiveness = 3; + }; + class CutLarge: Cut { + effectiveness = 2; + }; + + class Laceration: Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class LacerationMinor: Laceration { + effectiveness = 3; + }; + class LacerationMedium: Laceration { + effectiveness = 3; + }; + class LacerationLarge: Laceration { + effectiveness = 2; + }; + + class VelocityWound: Abrasion { + effectiveness = 1; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 3; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 2; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 2; + }; + + class PunctureWound: Abrasion { + effectiveness = 3; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1800; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 3; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 3; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 2; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + }; + class Adhesive_Bandage: FieldDressing { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + + class Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AbrasionMinor: Abrasion { + effectiveness = 1; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0.5; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0.5; + }; + + class Avulsion: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AvulsionMinor: Avulsion { + effectiveness = 0; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class CrushMinor: Crush { + effectiveness = 0; + }; + class CrushMedium: Crush { + effectiveness = 0; + }; + class CrushLarge: Crush { + effectiveness = 0; + }; + + class Cut: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class CutMinor: Cut { + effectiveness = 1; + }; + class CutMedium: Cut { + effectiveness = 1; + }; + class CutLarge: Cut { + effectiveness = 0; + }; + + class Laceration: Abrasion { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class LacerationMinor: Laceration { + effectiveness = 1; + }; + class LacerationMedium: Laceration { + effectiveness = 0; + }; + class LacerationLarge: Laceration { + effectiveness = 0; + }; + + class VelocityWound: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 0; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0; + }; + + class PunctureWound: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 1; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 0; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.8; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class Burn_Dressing: FieldDressing { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + + class Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0; + }; + + class Avulsion: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AvulsionMinor: Avulsion { + effectiveness = 0; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class CrushMinor: Crush { + effectiveness = 0; + }; + class CrushMedium: Crush { + effectiveness = 0; + }; + class CrushLarge: Crush { + effectiveness = 0; + }; + + class Cut: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class CutMinor: Cut { + effectiveness = 0; + }; + class CutMedium: Cut { + effectiveness = 0; + }; + class CutLarge: Cut { + effectiveness = 0; + }; + + class Laceration: Abrasion { + effectiveness = 0; + }; + class LacerationMinor: Laceration { + effectiveness = 0; + }; + class LacerationMedium: Laceration { + effectiveness = 0; + }; + class LacerationLarge: Laceration { + effectiveness = 0; + }; + + class VelocityWound: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 0; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0; + }; + + class PunctureWound: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 0; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 0; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0; + }; + + class ThermalBurn: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 120; + reopeningMaxDelay = 240; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 1; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 1; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0.5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.8; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class Burn_Dressing_wrapped: FieldDressing { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + + class Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AbrasionMinor: Abrasion { + effectiveness = 0; + }; + class AbrasionMedium: Abrasion { + effectiveness = 0; + }; + class AbrasionLarge: Abrasion { + effectiveness = 0; + }; + + class Avulsion: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class AvulsionMinor: Avulsion { + effectiveness = 0; + }; + class AvulsionMedium: Avulsion { + effectiveness = 0; + }; + class AvulsionLarge: Avulsion { + effectiveness = 0; + }; + + class Contusion: Abrasion { + effectiveness = 0; + }; + class ContusionMinor: Contusion { + }; + class ContusionMedium: Contusion { + }; + class ContusionLarge: Contusion { + }; + + class Crush: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class CrushMinor: Crush { + effectiveness = 0; + }; + class CrushMedium: Crush { + effectiveness = 0; + }; + class CrushLarge: Crush { + effectiveness = 0; + }; + + class Cut: Abrasion { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + class CutMinor: Cut { + effectiveness = 0; + }; + class CutMedium: Cut { + effectiveness = 0; + }; + class CutLarge: Cut { + effectiveness = 0; + }; + + class Laceration: Abrasion { + effectiveness = 0; + }; + class LacerationMinor: Laceration { + effectiveness = 0; + }; + class LacerationMedium: Laceration { + effectiveness = 0; + }; + class LacerationLarge: Laceration { + effectiveness = 0; + }; + + class VelocityWound: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class VelocityWoundMinor: VelocityWound { + effectiveness = 0; + }; + class VelocityWoundMedium: VelocityWound { + effectiveness = 0; + }; + class VelocityWoundLarge: VelocityWound { + effectiveness = 0; + }; + + class PunctureWound: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 60; + reopeningMaxDelay = 120; + }; + class PunctureWoundMinor: PunctureWound { + effectiveness = 0; + }; + class PunctureWoundMedium: PunctureWound { + effectiveness = 0; + }; + class PunctureWoundLarge: PunctureWound { + effectiveness = 0; + }; + class ThermalBurn: Abrasion { + effectiveness = 1; + reopeningChance = 0.1; + reopeningMinDelay = 1200; + reopeningMaxDelay = 1800; + }; + class ThermalBurnMinor: ThermalBurn { + effectiveness = 1; + }; + class ThermalBurnMedium: ThermalBurn { + effectiveness = 1; + }; + class ThermalBurnLarge: ThermalBurn { + effectiveness = 0.5; + }; + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class InternalBleedingMinor: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingMedium: InternalBleeding { + effectiveness = 0; + }; + class InternalBleedingLarge: InternalBleeding { + effectiveness = 0; + }; + class Evisceration: Abrasion { + effectiveness = 0; + reopeningChance = 0.8; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class EviscerationMinor: Evisceration { + effectiveness = 0; + }; + class EviscerationMedium: Evisceration { + effectiveness = 0; + }; + class EviscerationLarge: Evisceration { + effectiveness = 0; + }; + }; + class Dressing: FieldDressing { + class Abrasion { + effectiveness = 50; + reopeningChance = 0.1; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class AbrasionMinor: Abrasion {}; + class AbrasionMedium: Abrasion {}; + class AbrasionLarge: Abrasion {}; + + class Avulsion: Abrasion {}; + class AvulsionMinor: Avulsion {}; + class AvulsionMedium: Avulsion {}; + class AvulsionLarge: Avulsion {}; + + class Contusion: Abrasion {}; + class ContusionMinor: Contusion {}; + class ContusionMedium: Contusion {}; + class ContusionLarge: Contusion {}; + + class Crush: Abrasion {}; + class CrushMinor: Crush {}; + class CrushMedium: Crush {}; + class CrushLarge: Crush {}; + + class Cut: Abrasion {}; + class CutMinor: Cut {}; + class CutMedium: Cut {}; + class CutLarge: Cut {}; + + class Laceration: Abrasion {}; + class LacerationMinor: Laceration {}; + class LacerationMedium: Laceration {}; + class LacerationLarge: Laceration {}; + + class VelocityWound: Abrasion {}; + class VelocityWoundMinor: VelocityWound {}; + class VelocityWoundMedium: VelocityWound {}; + class VelocityWoundLarge: VelocityWound {}; + + class PunctureWound: Abrasion {}; + class PunctureWoundMinor: PunctureWound {}; + class PunctureWoundMedium: PunctureWound {}; + class PunctureWoundLarge: PunctureWound {}; + + class ThermalBurn: Abrasion {}; + class ThermalBurnMinor: ThermalBurn {}; + class ThermalBurnMedium: ThermalBurn {}; + class ThermalBurnLarge: ThermalBurn {}; + + class InternalBleeding: Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 120; + reopeningMaxDelay = 200; + }; + class InternalBleedingMinor: InternalBleeding {}; + class InternalBleedingMedium: InternalBleeding {}; + class InternalBleedingLarge: InternalBleeding {}; + + class Evisceration: Abrasion {}; + class EviscerationMinor: Evisceration {}; + class EviscerationMedium: Evisceration {}; + class EviscerationLarge: Evisceration {}; + }; + + class BloodClotMinor: FieldDressing { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.4; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.4; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class AvulsionMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class ContusionMinor: Abrasion { + effectiveness = 0; + }; + class CrushMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class CutMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class LacerationMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class VelocityWoundMinor: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.6; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class PunctureWoundMinor: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.6; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class ThermalBurnMinor: Abrasion { + effectiveness = 0; + }; + class InternalBleedingMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + }; + + class BloodClotMedium: FieldDressing { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.5; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class AbrasionMedium: Abrasion { + effectiveness = 1.5; + reopeningChance = 0.5; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class AvulsionMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.8; + reopeningMinDelay = 120; + reopeningMaxDelay = 900; + }; + class ContusionMedium: Abrasion { + effectiveness = 0; + }; + class CrushMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + class CutMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 120; + reopeningMaxDelay = 600; + }; + class LacerationMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 120; + reopeningMaxDelay = 600; + }; + class VelocityWoundMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 120; + reopeningMaxDelay = 600; + }; + class PunctureWoundMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 120; + reopeningMaxDelay = 600; + }; + class ThermalBurnMedium: Abrasion { + effectiveness = 0; + }; + class InternalBleedingMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.7; + reopeningMinDelay = 120; + reopeningMaxDelay = 600; + }; + class EviscerationMedium: Abrasion { + }; + }; + + class BloodClotLarge: FieldDressing { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.7; + reopeningMinDelay = 90; + reopeningMaxDelay = 600; + }; + class AbrasionLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.6; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class AvulsionLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.9; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class ContusionLarge: Abrasion { + effectiveness = 1; + }; + class CrushLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.7; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class CutLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.8; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class LacerationLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.8; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class VelocityWoundLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.8; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class PunctureWoundLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.8; + reopeningMinDelay = 90; + reopeningMaxDelay = 300; + }; + class ThermalBurnLarge: Abrasion { + effectiveness = 0; + }; + class InternalBleedingLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.8; + reopeningMinDelay = 120; + reopeningMaxDelay = 600; + }; + class EviscerationLarge: Abrasion { + }; + }; + + class BloodClotMinorTXA: BloodClotMinor { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + }; + class AvulsionMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.5; + }; + class ContusionMinor: AbrasionMinor { + effectiveness = 2; + }; + class CrushMinor: AbrasionMinor { + effectiveness = 1; + }; + class CutMinor: AbrasionMinor { + effectiveness = 1; + }; + class LacerationMinor: AbrasionMinor { + effectiveness = 1; + }; + class VelocityWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.4; + }; + class PunctureWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.4; + }; + class ThermalBurnMinor: AbrasionMinor { + effectiveness = 0; + }; + class InternalBleedingMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + }; + + class BloodClotMediumTXA: BloodClotMedium { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class AbrasionMedium: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + }; + class AvulsionMedium: AbrasionMedium { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class ContusionMedium: AbrasionMedium { + effectiveness = 1; + }; + class CrushMedium: AbrasionMedium { + effectiveness = 1; + }; + class CutMedium: AbrasionMedium { + effectiveness = 0.5; + }; + class LacerationMedium: AbrasionMedium { + effectiveness = 0.5; + }; + class VelocityWoundMedium: AbrasionMedium { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class PunctureWoundMedium: AbrasionMedium { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class ThermalBurnMedium: AbrasionMedium { + effectiveness = 0; + }; + class InternalBleedingMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + }; + + class BloodClotLargeTXA: BloodClotLarge { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 300; + reopeningMaxDelay = 900; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + }; + class AvulsionLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.5; + }; + class ContusionLarge: AbrasionLarge { + effectiveness = 1; + }; + class CrushLarge: AbrasionLarge { + effectiveness = 1; + }; + class CutLarge: AbrasionLarge { + effectiveness = 0.5; + }; + class LacerationLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.5; + }; + class VelocityWoundLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.5; + }; + class PunctureWoundLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class ThermalBurnLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.1; + }; + class InternalBleedingLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + }; + + class BloodClotMinorEACA: BloodClotMinor { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + }; + class AvulsionMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.2; + }; + class ContusionMinor: AbrasionMinor { + effectiveness = 0; + reopeningChance = 0.1; + }; + class CrushMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class CutMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class LacerationMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class VelocityWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class PunctureWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class ThermalBurnMinor: AbrasionMinor { + effectiveness = 0; + }; + class InternalBleedingMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0; + }; + }; + + class BloodClotMediumEACA: BloodClotMedium { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class AbrasionMedium: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + }; + class AvulsionMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.2; + }; + class ContusionMedium: AbrasionMedium { + effectiveness = 0; + reopeningChance = 0.1; + }; + class CrushMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class CutMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class LacerationMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class VelocityWoundMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class PunctureWoundMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class ThermalBurnMedium: AbrasionMedium { + }; + class InternalBleedingMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0; + }; + }; + + class BloodClotLargeEACA: BloodClotLarge { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + }; + class AvulsionLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.2; + }; + class ContusionLarge: AbrasionLarge { + effectiveness = 0; + }; + class CrushLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class CutLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class LacerationLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class VelocityWoundLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class PunctureWoundLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class ThermalBurnLarge: AbrasionLarge { + effectiveness = 0; + }; + class InternalBleedingLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.1; + }; + }; + class BloodClotMinor_wrapped: FieldDressing { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class AvulsionMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.5; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class ContusionMinor: Abrasion { + effectiveness = 0; + }; + class CrushMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class CutMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class LacerationMinor: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class VelocityWoundMinor: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class PunctureWoundMinor: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class ThermalBurnMinor: Abrasion { + effectiveness = 0; + }; + class InternalBleedingMinor: Abrasion { + effectiveness = 0; + reopeningChance = 0.4; + reopeningMinDelay = 150; + reopeningMaxDelay = 900; + }; + }; + + class BloodClotMedium_wrapped: FieldDressing { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class AbrasionMedium: Abrasion { + effectiveness = 1.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class AvulsionMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class ContusionMedium: Abrasion { + effectiveness = 0; + }; + class CrushMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class CutMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class LacerationMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class VelocityWoundMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class PunctureWoundMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class ThermalBurnMedium: Abrasion { + effectiveness = 0; + }; + class InternalBleedingMedium: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class EviscerationMedium: Abrasion { + }; + }; + + class BloodClotLarge_wrapped: FieldDressing { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class AbrasionLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class AvulsionLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class ContusionLarge: Abrasion { + effectiveness = 1; + }; + class CrushLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class CutLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class LacerationLarge: Abrasion { + effectiveness = 0.5; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class VelocityWoundLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class PunctureWoundLarge: Abrasion { + effectiveness = 1; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class ThermalBurnLarge: Abrasion { + effectiveness = 0; + }; + class InternalBleedingLarge: Abrasion { + effectiveness = 0; + reopeningChance = 0.4; + reopeningMinDelay = 600; + reopeningMaxDelay = 900; + }; + class EviscerationLarge: Abrasion { + }; + }; + + class BloodClotMinorTXA_wrapped: BloodClotMinor { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + }; + class AvulsionMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.5; + }; + class ContusionMinor: AbrasionMinor { + effectiveness = 2; + }; + class CrushMinor: AbrasionMinor { + effectiveness = 1; + }; + class CutMinor: AbrasionMinor { + effectiveness = 1; + }; + class LacerationMinor: AbrasionMinor { + effectiveness = 1; + }; + class VelocityWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.4; + }; + class PunctureWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.4; + }; + class ThermalBurnMinor: AbrasionMinor { + effectiveness = 0; + }; + class InternalBleedingMinor: AbrasionMinor { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + }; + + class BloodClotMediumTXA_wrapped: BloodClotMedium { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class AbrasionMedium: Abrasion { + effectiveness = 2; + reopeningChance = 0.2; + }; + class AvulsionMedium: AbrasionMedium { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class ContusionMedium: AbrasionMedium { + effectiveness = 1; + }; + class CrushMedium: AbrasionMedium { + effectiveness = 1; + }; + class CutMedium: AbrasionMedium { + effectiveness = 0.5; + }; + class LacerationMedium: AbrasionMedium { + effectiveness = 0.5; + }; + class VelocityWoundMedium: AbrasionMedium { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class PunctureWoundMedium: AbrasionMedium { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class ThermalBurnMedium: AbrasionMedium { + effectiveness = 0; + }; + class InternalBleedingMedium: AbrasionMedium { + effectiveness = 0; + reopeningChance = 0.2; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + }; + + class BloodClotLargeTXA_wrapped: BloodClotLarge { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 900; + reopeningMaxDelay = 1800; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + }; + class AvulsionLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.5; + }; + class ContusionLarge: AbrasionLarge { + effectiveness = 1; + }; + class CrushLarge: AbrasionLarge { + effectiveness = 1; + }; + class CutLarge: AbrasionLarge { + effectiveness = 0.5; + }; + class LacerationLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.5; + }; + class VelocityWoundLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.5; + }; + class PunctureWoundLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.4; + }; + class ThermalBurnLarge: AbrasionLarge { + effectiveness = 0.5; + reopeningChance = 0.1; + }; + class InternalBleedingLarge: AbrasionLarge { + effectiveness = 0; + reopeningChance = 0.3; + reopeningMinDelay = 600; + reopeningMaxDelay = 1200; + }; + }; + + class BloodClotMinorEACA_wrapped: BloodClotMinor { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1500; + reopeningMaxDelay = 2400; + }; + class AbrasionMinor: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + }; + class AvulsionMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.2; + }; + class ContusionMinor: AbrasionMinor { + effectiveness = 0; + reopeningChance = 0.1; + }; + class CrushMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class CutMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class LacerationMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class VelocityWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class PunctureWoundMinor: AbrasionMinor { + effectiveness = 1; + reopeningChance = 0.1; + }; + class ThermalBurnMinor: AbrasionMinor { + effectiveness = 0; + }; + class InternalBleedingMinor: AbrasionMinor { + effectiveness = 0; + reopeningChance = 0; + }; + }; + + class BloodClotMediumEACA_wrapped: BloodClotMedium { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1500; + reopeningMaxDelay = 2400; + }; + class AbrasionMedium: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + }; + class AvulsionMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.2; + }; + class ContusionMedium: AbrasionMedium { + effectiveness = 0; + reopeningChance = 0.1; + }; + class CrushMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class CutMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class LacerationMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class VelocityWoundMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class PunctureWoundMedium: AbrasionMedium { + effectiveness = 1; + reopeningChance = 0.1; + }; + class ThermalBurnMedium: AbrasionMedium { + }; + class InternalBleedingMedium: AbrasionMedium { + effectiveness = 0; + reopeningChance = 0; + }; + }; + + class BloodClotLargeEACA_wrapped: BloodClotLarge { + class Abrasion { + effectiveness = 0; + reopeningChance = 0.1; + reopeningMinDelay = 1500; + reopeningMaxDelay = 2400; + }; + class AbrasionLarge: Abrasion { + effectiveness = 2; + reopeningChance = 0.1; + }; + class AvulsionLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.2; + }; + class ContusionLarge: AbrasionLarge { + effectiveness = 0; + }; + class CrushLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class CutLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class LacerationLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class VelocityWoundLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class PunctureWoundLarge: AbrasionLarge { + effectiveness = 1; + reopeningChance = 0.1; + }; + class ThermalBurnLarge: AbrasionLarge { + effectiveness = 0; + }; + class InternalBleedingLarge: AbrasionLarge { + effectiveness = 0; + reopeningChance = 0.1; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/hitpoints/ACE_Medical_Treatment_Actions.hpp b/addons/hitpoints/ACE_Medical_Treatment_Actions.hpp new file mode 100644 index 000000000..34e3f6240 --- /dev/null +++ b/addons/hitpoints/ACE_Medical_Treatment_Actions.hpp @@ -0,0 +1,268 @@ +class ACE_Medical_Treatment_Actions { + class CheckPulse; + class BasicBandage; + class CPR; + class Hemostat: BasicBandage { + displayName = CSTRING(Hemostat); + displayNameProgress = CSTRING(Hemostat_Progress); + icon = QPATHTOF(ui\Hemostat.paa); + items[] = {"kat_Hemostatic_Injector"}; + allowSelfTreatment = 1; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + treatmentTime = 6; + }; + class fourByfour_Gauze: BasicBandage { + displayName = CSTRING(4X4_Gauze); + displayNameProgress = CSTRING(4X4_Gauze_Progress); + icon = QPATHTOF(ui\4X4_Gauze.paa); + items[] = {"kat_4X4_Gauze"}; + }; + class Compressed_Gauze: BasicBandage { + displayName = CSTRING(Compressed_Gauze); + displayNameProgress = CSTRING(Compressed_Gauze_Progress); + icon = QPATHTOF(ui\Compressed_Gauze.paa); + allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + items[] = {"kat_Compressed_Gauze"}; + }; + class Hemostatic_Gauze: BasicBandage { + displayName = CSTRING(Hemostatic_Gauze); + displayNameProgress = CSTRING(Hemostatic_Gauze_Progress); + icon = QPATHTOF(ui\Hemostatic_Gauze.paa); + items[] = {"kat_Hemostatic_Gauze"}; + }; + class Adhesive_Bandage: BasicBandage { + displayName = CSTRING(Adhesive_Bandage); + displayNameProgress = CSTRING(Adhesive_Bandage_Progress); + icon = QPATHTOF(ui\Adhesive_Bandage.paa); + items[] = {"kat_Adhesive_Bandage"}; + treatmentTime = 3; + }; + class Burn_Dressing: BasicBandage { + displayName = CSTRING(Burn_Dressing); + displayNameProgress = CSTRING(Burn_Dressing_Progress); + icon = QPATHTOF(ui\Burn_Dressing.paa); + condition = QFUNC(canBurnBandage); + callbackSuccess = QFUNC(burnDressing); + items[] = {"kat_Burn_Dressing"}; + }; + class Abdominal_Pad: BasicBandage { + displayName = CSTRING(Abdominal_Pad); + displayNameProgress = CSTRING(Abdominal_Pad_Progress); + icon = QPATHTOF(ui\Abdominal_Pad.paa); + items[] = {"kat_Abdominal_Pad"}; + allowedSelections[] = {"Body"}; + condition = "true"; + callbackSuccess = QFUNC(ABDPad); + treatmentTime = 8; + }; + class ETD: BasicBandage { + displayName = CSTRING(ETD); + displayNameProgress = CSTRING(ETD_Progress); + icon = QPATHTOF(ui\ETD.paa); + callbackSuccess = QACEFUNC(medical_treatment,bandage); + items[] = {"kat_ETD"}; + }; + class Israeli_Bandage: BasicBandage { + displayName = CSTRING(Israeli_Bandage); + displayNameProgress = CSTRING(Israeli_Bandage_Progress); + icon = QPATHTOF(ui\Israeli_Bandage.paa); + callbackSuccess = QACEFUNC(medical_treatment,bandage); + items[] = {"kat_Israeli_Bandage"}; + }; + class Elastic_Wrap: BasicBandage { + displayName = CSTRING(Elastic_Wrap); + displayNameProgress = CSTRING(Elastic_Wrap_Progress); + icon = QPATHTOF(ui\Elastic_Wrap.paa); + condition = QFUNC(canWrapWound); + treatmentTime = QFUNC(getWrapTime); + callbackSuccess = QFUNC(wrapWound); + items[] = {"kat_Elastic_Wrap"}; + }; + class Elastic_Wrap_Splint: BasicBandage { + displayName = CSTRING(Elastic_Wrap_Splint); + displayNameProgress = CSTRING(Elastic_Wrap_Splint_Progress); + icon = QPATHTOF(ui\Elastic_Wrap.paa); + callbackSuccess = QFUNC(wrapSplint); + condition = QFUNC(canWrapSplint); + treatmentTime = 12; + items[] = {"kat_Elastic_Wrap"}; + }; + class Roller_Gauze: BasicBandage { + displayName = CSTRING(Roller_Gauze); + displayNameProgress = CSTRING(Roller_Gauze_Progress); + icon = QPATHTOF(ui\Roller_Gauze.paa); + condition = QFUNC(canWrapWound); + treatmentTime = QFUNC(getWrapTime); + callbackSuccess = QFUNC(wrapWound); + items[] = {"kat_Roller_Gauze"}; + }; + class Roller_GauzeCoag: BasicBandage { + displayName = CSTRING(Roller_GauzeCoag); + displayNameProgress = CSTRING(Roller_GauzeCoag_Progress); + icon = QPATHTOF(ui\Roller_Gauze.paa); + condition = QFUNC(canWrapWoundCoag); + treatmentTime = QFUNC(getWrapTimeCoag); + callbackSuccess = QFUNC(wrapWoundCoag); + items[] = {"kat_Roller_Gauze"}; + }; + class Ice_Pack: BasicBandage { + displayName = CSTRING(Ice_Pack); + displayNameProgress = CSTRING(Ice_Pack_Progress); + icon = QPATHTOF(ui\Ice_Pack.paa); + condition = QFUNC(canIceJoint); + category = "surgery"; + medicRequired = 0; + treatmentTime = QGVAR(iceTime); + callbackSuccess = QFUNC(IceJoint); + items[] = {"kat_Ice_Pack"}; + }; + class Elastic_Wrap_Joint: BasicBandage { + displayName = CSTRING(Elastic_Wrap_Joint); + displayNameProgress = CSTRING(Elastic_Wrap_Joint_Progress); + icon = QPATHTOF(ui\Elastic_Wrap.paa); + category = "surgery"; + callbackSuccess = QFUNC(wrapJoint); + condition = QFUNC(canWrapJoint); + medicRequired = QGVAR(JointCareLevel); + treatmentTime = QGVAR(wrapTime); + items[] = {"kat_Elastic_Wrap"}; + }; + class Stabilize_Joint: BasicBandage { + displayName = CSTRING(Stabilize_Joint); + displayNameProgress = CSTRING(Stabilize_Joint_Progress); + icon = QPATHTOF(ui\Elastic_Wrap.paa); + category = "surgery"; + callbackSuccess = QFUNC(stabilizeJoint); + condition = QFUNC(canStabilizeJoint); + medicRequired = QGVAR(JointCareLevel); + treatmentTime = QGVAR(stabilizeTime); + items[] = {"kat_Elastic_Wrap"}; + }; + class Reduce_Joint: BasicBandage { + displayName = CSTRING(Reduce_Joint); + displayNameProgress = CSTRING(Reduce_Joint_Progress); + icon = QPATHTOF(ui\Elastic_Wrap.paa); + category = "surgery"; + callbackSuccess = QFUNC(reduceJoint); + condition = QFUNC(canReduceJoint); + allowSelfTreatment = 0; + medicRequired = QGVAR(JointCareLevel); + treatmentTime = QGVAR(reduceTime); + items[] = {}; + }; + class Bind_Pelvis: BasicBandage { + displayName = CSTRING(Bind_Pelvis); + displayNameProgress = CSTRING(Bind_Pelvis_Progress); + icon = QPATHTOF(ui\Pelvic_Binder.paa); + category = "surgery"; + callbackSuccess = QFUNC(bindPelvis); + condition = QFUNC(canBindPelvis); + allowSelfTreatment = 0; + medicRequired = QGVAR(JointCareLevel); + treatmentTime = QGVAR(bindTime); + items[] = {"kat_Pelvic_Binder"}; + }; + class Splint: BasicBandage { + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + }; + + // - Syringes ------------------------------------------------------------- + class FieldDressing; + class Morphine: FieldDressing { + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + }; + // - Diagnose ------------------------------------------------------------- + class Diagnose: BasicBandage { + allowedSelections[] = {"Head", "Chest"}; + }; + class CheckJoints: CheckPulse { + displayName = CSTRING(Check_Joints); + displayNameProgress = CSTRING(Check_Joints_Progress); + category = "examine"; + condition = "true"; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "Body"}; + allowSelfTreatment = 1; + medicRequired = 0; + treatmentTime = 8; + items[] = {}; + callbackSuccess = QFUNC(checkJoints); + }; + class ApplyPressure: CPR { + displayName = CSTRING(ApplyPressure); + displayNameProgress = ""; + icon = ""; + category = "bandage"; + treatmentTime = 0.01; + allowSelfTreatment = 1; + medicRequired = 0; + treatmentLocations = TREATMENT_LOCATIONS_ALL; + allowedSelections[] = {"All"}; + callbackStart = ""; + callbackProgress = ""; + callbackFailure = ""; + callbackSuccess = QFUNC(pressureStart); + condition = QUOTE([ARR_3(_medic,_patient,_bodyPart)] call FUNC(canSoftcorePressure)); + animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; + animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; + }; + class ApplySoftcorePressure: ApplyPressure { + displayName = CSTRING(ApplyPressure); + displayNameProgress = CSTRING(ApplyPressure); + treatmentTime = 3; + callbackSuccess = QFUNC(manualPressure); + condition = QUOTE(!([ARR_3(_medic,_patient,_bodyPart)] call FUNC(canSoftcorePressure))); + }; + class StopPressure: ApplyPressure { + displayName = CSTRING(StopPressure); + displayNameProgress = CSTRING(StopPressure); + treatmentTime = 1; + callbackSuccess = QFUNC(manualPressureStop); + condition = QFUNC(manualPressureStopCondition); + }; + class RemoveETD: BasicBandage { + displayName = CSTRING(Remove_ETD); + displayNameProgress = CSTRING(Removing_ETD); + items[] = {}; + treatmentTime = QGVAR(removalTimeETD); + condition = QUOTE([ARR_3(_patient,_bodyPart,'ETD')] call FUNC(hasRemovableBandage)); + callbackSuccess = QUOTE([ARR_3(_patient,_bodyPart,'ETD')] call FUNC(removeBandage)); + }; + class RemoveIsraeli: BasicBandage { + displayName = CSTRING(Remove_Israeli); + displayNameProgress = CSTRING(Removing_Israeli); + items[] = {}; + treatmentTime = QGVAR(removalTimeIsraeli); + condition = QUOTE([ARR_3(_patient,_bodyPart,'Israeli_Bandage')] call FUNC(hasRemovableBandage)); + callbackSuccess = QUOTE([ARR_3(_patient,_bodyPart,'Israeli_Bandage')] call FUNC(removeBandage)); + }; + class ApplyTourniquet: BasicBandage { + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + condition = "false"; + }; + class ApplyHastyTourniquet: ApplyTourniquet { + displayName = CSTRING(Apply_HastyTourniquet); + displayNameProgress = CSTRING(Applying_HastyTourniquet); + treatmentTime = QGVAR(treatmentTimeHastyTourniquet); + treatmentTimeTrained = QGVAR(treatmentTimeTrainedHastyTourniquet); + condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) && ([ARR_2(_patient,_bodyPart)] call EFUNC(surgery,hasAdditionalTourniquetAppliedTo))); + callbackSuccess = QUOTE([ARR_8(_medic,_patient,_bodyPart,_classname,_itemUser,_usedItem,_createLitter,1)] call FUNC(tourniquet)); + }; + class ConvertHastyTourniquet: ApplyTourniquet { + displayName = CSTRING(Convert_HastyTourniquet); + displayNameProgress = CSTRING(Converting_HastyTourniquet); + treatmentTime = QUOTE(0 call FUNC(convertTourniquetTime)); + treatmentTimeTrained = QUOTE(1 call FUNC(convertTourniquetTime)); + items[] = {}; + condition = QUOTE([ARR_2(_patient,_bodyPart)] call FUNC(convertTourniquetCheck)); + callbackSuccess = QUOTE([ARR_8(_medic,_patient,_bodyPart,_classname,_itemUser,_usedItem,_createLitter,2)] call FUNC(convertTourniquet)); + }; + class ApplyDelibrateTourniquet: ApplyTourniquet { + displayName = CSTRING(Apply_DelibrateTourniquet); + displayNameProgress = CSTRING(Applying_DelibrateTourniquet); + treatmentTime = QGVAR(treatmentTimeTrainedDelibrateTourniquet); + treatmentTimeTrained = QGVAR(treatmentTimeTrainedDelibrateTourniquet); + condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) && ([ARR_2(_patient,_bodyPart)] call EFUNC(surgery,hasAdditionalTourniquetAppliedTo))); + callbackSuccess = QUOTE([ARR_8(_medic,_patient,_bodyPart,_classname,_itemUser,_usedItem,_createLitter,2)] call FUNC(tourniquet)); + allowedUnderwater = 0; + }; +}; \ No newline at end of file diff --git a/addons/hitpoints/CfgEventHandlers.hpp b/addons/hitpoints/CfgEventHandlers.hpp new file mode 100644 index 000000000..4551ce282 --- /dev/null +++ b/addons/hitpoints/CfgEventHandlers.hpp @@ -0,0 +1,20 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + disableModuload = "true"; + }; +}; + +class Extended_Init_EventHandlers { + class CAManBase { + class ADDON { + init = QUOTE([ARR_2((_this select 0),false)] call FUNC(init)); + }; + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/hitpoints/CfgFunctions.hpp b/addons/hitpoints/CfgFunctions.hpp new file mode 100644 index 000000000..1ad9e34e7 --- /dev/null +++ b/addons/hitpoints/CfgFunctions.hpp @@ -0,0 +1,89 @@ +class CfgFunctions { + class overwrite_ace_medical_damage { + tag = "ace_medical_damage"; + class ace_medical_damage { + class determineIfFatal { + file = QPATHTOF(functions\fnc_determineIfFatal.sqf); + }; + class handleIncapacitation { + file = QPATHTOF(functions\fnc_handleIncapacitation.sqf); + }; + class woundsHandlerBase { + file = QPATHTOF(functions\fnc_woundsHandlerBase.sqf); + }; + class woundsHandlerVehiclehit { + file = QPATHTOF(functions\fnc_woundsHandlerVehiclehit.sqf); + }; + class woundsHandlerBurning { + file = QPATHTOF(functions\fnc_woundsHandlerBurning.sqf); + }; + }; + }; + class overwrite_ace_medical_engine { + tag = "ace_medical_engine"; + class ace_medical_engine { + class handleDamage { + file = QPATHTOF(functions\fnc_handleDamage.sqf); + }; + class updateBodyPartVisuals { + file = QPATHTOF(functions\fnc_updateBodyPartVisuals.sqf); + }; + }; + }; + class overwrite_ace_medical_gui { + tag = "ace_medical_gui"; + class ace_medical_gui { + class addTreatmentActions { + file = QPATHTOF(functions\fnc_addTreatmentActions.sqf); + }; + class onKeyDown { + file = QPATHTOF(functions\fnc_onKeyDown.sqf); + }; + }; + }; + class overwrite_ace_medical { + tag = "ace_medical"; + class ace_medical { + class addDamageToUnit { + file = QPATHTOF(functions\fnc_addDamageToUnit.sqf); + }; + }; + }; + class overwrite_ace_medical_status { + tag = "ace_medical_status"; + class ace_medical_status { + class initUnit { + file = QPATHTOF(functions\fnc_initUnit.sqf); + }; + }; + }; + class overwrite_ace_medical_treatment { + tag = "ace_medical_treatment"; + class ace_medical_treatment { + class tourniquetLocal { + file = QPATHTOF(functions\fnc_tourniquetLocal.sqf); + }; + class tourniquet { + file = QPATHTOF(functions\fnc_tourniquet.sqf); + }; + class hasTourniquetAppliedTo { + file = QPATHTOF(functions\fnc_hasTourniquetAppliedTo.sqf); + }; + class canSplint { + file = QPATHTOF(functions\fnc_canSplint.sqf); + }; + class splintLocal { + file = QPATHTOF(functions\fnc_splintLocal.sqf); + }; + class fullHealLocal { + file = QPATHTOF(functions\fnc_fullHealLocal.sqf); + }; + class canBandage { + file = QPATHTOF(functions\fnc_canBandage.sqf); + }; + class ivBagLocal { + file = QPATHTOF(functions\fnc_ivBagLocal.sqf); + }; + }; + }; +}; diff --git a/addons/hitpoints/CfgVehicles.hpp b/addons/hitpoints/CfgVehicles.hpp new file mode 100644 index 000000000..ae4a490c9 --- /dev/null +++ b/addons/hitpoints/CfgVehicles.hpp @@ -0,0 +1,24 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ACE_Medical { + #define ACTION_CONDITION condition = "true"; + #include "InteractionBodyParts.hpp" + #undef ACTION_CONDITION + }; + }; + class ACE_Actions { + #define ACTION_CONDITION condition = QUOTE(ACEGVAR(medical_gui,enableActions) == 0); + #include "InteractionBodyParts.hpp" + #undef ACTION_CONDITION + class ACE_MainActions { + class ACE_Medical_Radial { + #define ACTION_CONDITION condition = "true"; + #include "InteractionBodyParts.hpp" + #undef ACTION_CONDITION + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/addons/hitpoints/CfgWeapons.hpp b/addons/hitpoints/CfgWeapons.hpp new file mode 100644 index 000000000..6e69afbaa --- /dev/null +++ b/addons/hitpoints/CfgWeapons.hpp @@ -0,0 +1,173 @@ +class CfgWeapons { + class ACE_ItemCore; + class CBA_MiscItem_ItemInfo; + class kat_Hemostatic_Injector: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hemostat_Display); + picture = QPATHTOF(ui\hemostat.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Hemostat_Desc_Short); + descriptionUse = CSTRING(Hemostat_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.4; + }; + }; + class kat_Elastic_Wrap: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Elastic_Wrap_Display); + picture = QPATHTOF(ui\Elastic_Wrap.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Elastic_Wrap_Desc_Short); + descriptionUse = CSTRING(Elastic_Wrap_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_4X4_Gauze: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(4X4_Gauze_Display); + picture = QPATHTOF(ui\4X4_Gauze.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(4X4_Gauze_Desc_Short); + descriptionUse = CSTRING(4X4_Gauze_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.2; + }; + }; + class kat_Compressed_Gauze: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Compressed_Gauze_Display); + picture = QPATHTOF(ui\Compressed_Gauze.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Compressed_Gauze_Desc_Short); + descriptionUse = CSTRING(Compressed_Gauze_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.3; + }; + }; + class kat_Roller_Gauze: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Roller_Gauze_Display); + picture = QPATHTOF(ui\Roller_Gauze.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Roller_Gauze_Desc_Short); + descriptionUse = CSTRING(Roller_Gauze_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_Abdominal_Pad: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Abdominal_Pad_Display); + picture = QPATHTOF(ui\Abdominal_Pad.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Abdominal_Pad_Desc_Short); + descriptionUse = CSTRING(Abdominal_Pad_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1.5; + }; + }; + class kat_ETD: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(ETD_Display); + picture = QPATHTOF(ui\ETD.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(ETD_Desc_Short); + descriptionUse = CSTRING(ETD_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 3; + }; + }; + class kat_Israeli_Bandage: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Israeli_Bandage_Display); + picture = QPATHTOF(ui\Israeli_Bandage.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Israeli_Bandage_Desc_Short); + descriptionUse = CSTRING(Israeli_Bandage_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_Hemostatic_Gauze: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Hemostatic_Gauze_Display); + picture = QPATHTOF(ui\Hemostatic_Gauze.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Hemostatic_Gauze_Desc_Short); + descriptionUse = CSTRING(Hemostatic_Gauze_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.3; + }; + }; + class kat_Adhesive_Bandage: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Adhesive_Bandage_Display); + picture = QPATHTOF(ui\Adhesive_Bandage.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Adhesive_Bandage_Desc_Short); + descriptionUse = CSTRING(Adhesive_Bandage_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.05; + }; + }; + class kat_Burn_Dressing: ACE_ItemCore { + scope = 0; + author = "Cplhardcore"; + displayName = CSTRING(Burn_Dressing_Display); + picture = QPATHTOF(ui\Burn_Dressing.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Burn_Dressing_Desc_Short); + descriptionUse = CSTRING(Burn_Dressing_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.3; + }; + }; + class kat_Ice_Pack: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Ice_Pack_Display); + picture = QPATHTOF(ui\Ice_Pack.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Ice_Pack_Desc_Short); + descriptionUse = CSTRING(Ice_Pack_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2; + }; + }; + class kat_Pelvic_Binder: ACE_ItemCore { + scope = 2; + author = "Cplhardcore"; + displayName = CSTRING(Pelvic_Binder_Display); + picture = QPATHTOF(ui\Pelvic_Binder.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; + descriptionShort = CSTRING(Pelvic_Binder_Desc_Short); + descriptionUse = CSTRING(Pelvic_Binder_Desc_Use); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + }; +}; diff --git a/addons/hitpoints/InteractionBodyParts.hpp b/addons/hitpoints/InteractionBodyParts.hpp new file mode 100644 index 000000000..f82fcf6d1 --- /dev/null +++ b/addons/hitpoints/InteractionBodyParts.hpp @@ -0,0 +1,134 @@ +class ACE_Head { + displayName = CSTRING(Head); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,0)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""head"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_Neck { + displayName = CSTRING(Neck); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,1)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""neck"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_Chest { + displayName = CSTRING(Chest); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,2)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""chest"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; + class TriageCard { + displayName = CSTRING(Actions_TriageCard); + exceptions[] = {"isNotInside", "isNotSitting"}; + condition = "true"; + statement = QUOTE(_target call ACEFUNC(medical_gui,displayTriageCard)); + icon = QPATHTOF(ui\triage_card.paa); + }; +}; +class ACE_Torso { + displayName = CSTRING(Torso); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,3)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""body"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; + class TriageCard { + displayName = CSTRING(Actions_TriageCard); + exceptions[] = {"isNotInside", "isNotSitting"}; + condition = "true"; + statement = QUOTE(_target call ACEFUNC(medical_gui,displayTriageCard)); + icon = QPATHTOF(ui\triage_card.paa); + }; +}; +class ACE_ArmUpperLeft { + displayName = CSTRING(UpperLeftArm); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,5)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""upperleftarm"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_ArmLeft { + displayName = CSTRING(LeftArm); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,4)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""leftarm"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_ArmUpperRight { + displayName = CSTRING(UpperRightArm); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,7)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""upperrightarm"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_ArmRight { + displayName = CSTRING(RightArm); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,6)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""rightarm"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_LegUpperLeft { + displayName = CSTRING(UpperLeftLeg); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,9)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""upperleftleg"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_LegLeft { + displayName = CSTRING(LeftLeg); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,8)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""leftleg"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_LegUpperRight { + displayName = CSTRING(UpperRightLeg); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,11)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""upperrightleg"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; +class ACE_LegRight { + displayName = CSTRING(RightLeg); + distance = MEDICAL_ACTION_DISTANCE; + icon = QPATHTOF(ui\cross.paa); + exceptions[] = {"isNotInside", "isNotSitting"}; + ACTION_CONDITION + statement = QUOTE([ARR_2(_target,10)] call EFUNC(gui,displayPatientInformation)); + modifierFunction = QUOTE([ARR_3(_target,""rightleg"",_this select 3)] call EFUNC(gui,modifyAction)); + runOnHover = 1; +}; diff --git a/addons/hitpoints/XEH_PREP.hpp b/addons/hitpoints/XEH_PREP.hpp new file mode 100644 index 000000000..92eff0605 --- /dev/null +++ b/addons/hitpoints/XEH_PREP.hpp @@ -0,0 +1,78 @@ +PREP(ABDPad); +PREP(ABDPadLocal); +PREP(addDamageToUnit); +PREP(addTreatmentActions); +PREP(bindPelvis); +PREP(bindPelvisLocal); +PREP(burnDressing); +PREP(burnDressingLocal); +PREP(canBandage); +PREP(canBindPelvis); +PREP(canBurnBandage); +PREP(canIceJoint); +PREP(canReduceJoint); +PREP(canSoftcorePressure); +PREP(canSplint); +PREP(canStabilizeJoint); +PREP(canWrapJoint); +PREP(canWrapSplint); +PREP(canWrapWound); +PREP(canWrapWoundCoag); +PREP(checkJoints); +PREP(convertTourniquet); +PREP(convertTourniquetCheck); +PREP(convertTourniquetTime); +PREP(damageAmount); +PREP(damageCheck); +PREP(determineIfFatal); +PREP(fullHealLocal); +PREP(fullHealMod); +PREP(getAmmoData); +PREP(getHitpointArmor); +PREP(getItemArmor); +PREP(getWrapTime); +PREP(getWrapTimeCoag); +PREP(gui_updateBodyImage); +PREP(gui_updateInjuryListPart); +PREP(gui_updateInjuryListWounds); +PREP(handleDamage); +PREP(handleIncapacitation); +PREP(handleRespawn); +PREP(hasRemovableBandage); +PREP(hasTourniquetAppliedTo); +PREP(iceJoint); +PREP(iceJointLocal); +PREP(init); +PREP(initUnit); +PREP(internalBleedingRate); +PREP(ivBagLocal); +PREP(manualPressure); +PREP(manualPressureStop); +PREP(manualPressureStopCondition); +PREP(onKeyDown); +PREP(partBleedingRate); +PREP(pressureStart); +PREP(reduceJoint); +PREP(reduceJointLocal); +PREP(removeBandage); +PREP(removeBandageLocal); +PREP(splintLocal); +PREP(stabilizeJoint); +PREP(stabilizeJointLocal); +PREP(tourniquet); +PREP(tourniquetLocal); +PREP(updateBodyPartVisuals); +PREP(woundsHandlerArmorPenetration); +PREP(woundsHandlerBase); +PREP(woundsHandlerBurning); +PREP(woundsHandlerEviscerationHit); +PREP(woundsHandlerJoints); +PREP(woundsHandlerPelvicHit); +PREP(woundsHandlerVehiclehit); +PREP(wrapJoint); +PREP(wrapJointLocal); +PREP(wrapSplint); +PREP(wrapWound); +PREP(wrapWoundCoag); +PREP(wrapWoundCoagLocal); +PREP(wrapWoundLocal); \ No newline at end of file diff --git a/addons/hitpoints/XEH_postInit.sqf b/addons/hitpoints/XEH_postInit.sqf new file mode 100644 index 000000000..b7bc62c91 --- /dev/null +++ b/addons/hitpoints/XEH_postInit.sqf @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealMod)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_gui,updateInjuryListWounds), LINKFUNC(gui_updateInjuryListWounds)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_gui,updateBodyImage), LINKFUNC(gui_updateBodyImage)] call CBA_fnc_addEventHandler; +[QGVAR(reduceJoint), LINKFUNC(reduceJointLocal)] call CBA_fnc_addEventHandler; +[QGVAR(iceJoint), LINKFUNC(iceJointLocal)] call CBA_fnc_addEventHandler; +[QGVAR(wrapJoint), LINKFUNC(wrapJointLocal)] call CBA_fnc_addEventHandler; +[QGVAR(stabilizeJoint), LINKFUNC(stabilizeJointLocal)] call CBA_fnc_addEventHandler; +[QGVAR(bindPelvis), LINKFUNC(bindPelvisLocal)] call CBA_fnc_addEventHandler; +[QGVAR(removeBandage), LINKFUNC(removeBandageLocal)] call CBA_fnc_addEventHandler; +[QGVAR(wrapWound), LINKFUNC(wrapWoundLocal)] call CBA_fnc_addEventHandler; +[QGVAR(wrapWoundCoag), LINKFUNC(wrapWoundCoagLocal)] call CBA_fnc_addEventHandler; +[QGVAR(burnDressing), LINKFUNC(burnDressingLocal)] call CBA_fnc_addEventHandler; +[QGVAR(tourniquetLocal), LINKFUNC(tourniquetLocal)] call CBA_fnc_addEventHandler; + diff --git a/addons/hitpoints/XEH_preInit.sqf b/addons/hitpoints/XEH_preInit.sqf new file mode 100644 index 000000000..cda88b18e --- /dev/null +++ b/addons/hitpoints/XEH_preInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +ADDON = false; +ACEGVAR(medical_engine,customHitpoints) = ["hitleftarm", "hitrightarm", "hitupperleftarm", "hitupperrightarm", "hitupperrollleftarm", "hitupperrollrightarm", "hitleftleg", "hitrightleg", "hitupperleftleg", "hitupperrightleg", "hitleftlegroll", "hitrightlegroll", "hitleftfoot", "hitrightfoot"]; +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#define CBA_SETTINGS_CAT LSTRING(cba_name) +#include "initSettings.inc.sqf" + +GVAR(ammoCache) = createHashMap; +GVAR(armorCache) = createHashMap; + +ADDON = true; diff --git a/addons/hitpoints/config.cpp b/addons/hitpoints/config.cpp new file mode 100644 index 000000000..3e58acbbc --- /dev/null +++ b/addons/hitpoints/config.cpp @@ -0,0 +1,54 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; + units[] = {}; + weapons[] = { + "kat_Hemostatic_Injector", + "kat_Elastic_Wrap", + "kat_4X4_Gauze", + "kat_Compressed_Gauze", + "kat_Roller_Gauze", + "kat_Abdominal_Pad", + "kat_ETD", + "kat_Hemostatic_Gauze", + "kat_Adhesive_Bandage", + "kat_Burn_Dressing", + "kat_Israeli_Bandage", + "kat_Ice_Pack", + "kat_Pelvic_Binder" + + }; + magazines[] = { }; + requiredAddons[] = { + "kat_main", + "ace_medical", + "ace_medical_ai", + "ace_medical_blood", + "ace_medical_damage", + "ace_medical_engine", + "ace_medical_feedback", + "ace_medical_gui", + "ace_medical_statemachine", + "ace_medical_status", + "ace_medical_treatment", + "ace_medical_vitals", + "ace_dogtags", + "cba_settings" + }; + author = "Katalam"; + authors[] = {"Katalam"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; +#include "CfgVehicles.hpp" +#include "ACE_Medical_Injuries.hpp" +#include "ACE_Medical_Treatment_Actions.hpp" +#include "ACE_Medical_Treatment.hpp" +#include "CfgFunctions.hpp" +#include "CfgWeapons.hpp" +#include "CfgEventHandlers.hpp" + diff --git a/addons/hitpoints/functions/fnc_ABDPad.sqf b/addons/hitpoints/functions/fnc_ABDPad.sqf new file mode 100644 index 000000000..1e502ce66 --- /dev/null +++ b/addons/hitpoints/functions/fnc_ABDPad.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * splitter function for ABD pad treatment + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Head", "FieldDressing"] call kat_hitpoints_ABDPad + * + * Public: No + */ + +[QACEGVAR(medical_treatment,bandaged), _this] call CBA_fnc_localEvent; + +params ["_medic", "_patient", "_bodyPart", "_classname"]; + +[_patient, "activity", ACELSTRING(medical_treatment,Activity_bandagedPatient), [[_medic, false, true] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); +[_patient, _bodyPart, _classname] call EFUNC(misc,bandageLocal); + +[_patient, _bodyPart] call FUNC(ABDPadLocal); \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_ABDPadLocal.sqf b/addons/hitpoints/functions/fnc_ABDPadLocal.sqf new file mode 100644 index 000000000..70767f2ac --- /dev/null +++ b/addons/hitpoints/functions/fnc_ABDPadLocal.sqf @@ -0,0 +1,79 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_hitpoints_ABDPad + * + * Public: No + */ +params ["_patient", "_bodyPart"]; + +private _eviscerationLevel = _patient getVariable [QGVAR(evisceration), 0]; +private _newEviscerationLevel = (_eviscerationLevel - 2) max 0; +_patient setVariable [QGVAR(evisceration), _newEviscerationLevel, true]; +_patient setVariable [QGVAR(activeWoundPack), 1, true]; +if (_newEviscerationLevel == 0) then { + [_patient] call EFUNC(misc,updateDamageEffects); +}; + + +[{ + params ["_patient","_bodyPart"]; +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); +private _bandagedWoundsOnPart = _bandagedWounds get _bodyPart; +TRACE_1("WrapAllWounds1",_bandagedWoundsOnPart); + +private _includedTypes = ["Compressed_Gauze", "Abdominal_Pad", "fourByfour_Gauze"]; + +private _wrappedAny = false; + +{ + private _bandageType = _x param [4, ""]; + if (_bandageType in _includedTypes) then { + private _classID = (_x select 0) + 0.1; + private _amount = _x select 1; + private _bleeding = _x select 2; + private _damage = _x select 3; + private _oldBandage = _bandageType; + + private _newClassID = _classID + 0.01; + private _newEntry = [ + _newClassID, + _amount, + _bleeding, + _damage, + _oldBandage + "_wrapped" + ]; + + TRACE_2("Wound Before/After Wrap",_x,_newEntry); + + _bandagedWoundsOnPart set [_forEachIndex, _newEntry]; + _bandagedWounds set [_bodyPart, _bandagedWoundsOnPart]; + + private _impact = 1; + private _woundIndex = _forEachIndex; + private _wound = _newEntry; + private _bandage = _oldBandage + "_wrapped"; + private _patient = GVAR(ABDpatient); + private _bodyPart = GVAR(ABDbodyPart); + + TRACE_6("WrapWound",patient,_impact,bodyPart,_woundIndex,_wound,_bandage); + [patient, _impact, bodyPart, _woundIndex, _wound, _bandage, false] call ACEFUNC(medical_treatment,handleBandageOpening); + + _wrappedAny = true; + }; +} forEach _bandagedWoundsOnPart; + +_patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; + +_wrappedAny + +}, [_patient,_bodyPart], 0.5] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_addDamageToUnit.sqf b/addons/hitpoints/functions/fnc_addDamageToUnit.sqf new file mode 100644 index 000000000..9cc39a8e0 --- /dev/null +++ b/addons/hitpoints/functions/fnc_addDamageToUnit.sqf @@ -0,0 +1,78 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Manually Apply Damage to a unit (can cause lethal damage) + * + * Arguments: + * 0: The Unit + * 1: Damage to Add + * 2: Body part ("Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg") + * 3: Projectile Type + * 4: Source + * 5: Unused parameter maintained for backwards compatibility (default: []) + * 6: Override Invulnerability (default: true) + * + * Return Value: + * Successful + * + * Example: + * [player, 0.8, "rightleg", "bullet"] call ace_medical_fnc_addDamageToUnit + * [cursorTarget, 1, "body", "stab", player] call ace_medical_fnc_addDamageToUnit + * + * Public: Yes + */ +// #define DEBUG_TESTRESULTS + +params [ + ["_unit", objNull, [objNull]], + ["_damageToAdd", -1, [0]], + ["_bodyPart", "", [""]], + ["_typeOfDamage", "", [""]], + ["_instigator", objNull, [objNull]], + "", + ["_overrideInvuln", true, [true]] +]; +TRACE_7("addDamageToUnit",_unit,_damageToAdd,_bodyPart,_typeOfDamage,_instigator,nil,_overrideInvuln); + +_bodyPart = toLowerANSI _bodyPart; +private _bodyPartIndex = ALL_BODY_PARTS find _bodyPart; +if (_bodyPartIndex < 0) then { _bodyPartIndex = ALL_SELECTIONS find _bodyPart; }; // 2nd attempt with selection names ("hand_l", "hand_r", "leg_l", "leg_r") +if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1",_this); false}; +if (isNull _unit || {!local _unit} || {!alive _unit}) exitWith {ERROR_2("addDamageToUnit - badUnit %1 [local %2]",_this,local _unit); false}; +if (_damageToAdd < 0) exitWith {ERROR_1("addDamageToUnit - bad damage %1",_this); false}; + +if (!_overrideInvuln && {!((isDamageAllowed _unit) && {_unit getVariable [QACEGVAR(medical,allowDamage), true]})}) exitWith { + ERROR_1("addDamageToUnit - unit invulnerable %1",_this); false +}; + +// Extension is case sensitive and expects this format (different from ALL_BODY_PARTS) +_bodyPart = ["Head", "Neck", "Chest", "Body", "LeftArm", "UpperLeftArm", "RightArm", "UpperRightArm", "LeftLeg", "UpperLeftLeg", "RightLeg", "UpperRightLeg"] select _bodyPartIndex; + +if (!isNull _instigator) then { + _unit setVariable [QACEGVAR(medical,lastDamageSource), _instigator]; + _unit setVariable [QACEGVAR(medical,lastInstigator), _instigator]; +}; + +#ifdef DEBUG_TESTRESULTS +private _startDmg = +GET_BODYPART_DAMAGE(_unit); +private _startPain = GET_PAIN(_unit); +#endif + +[QACEGVAR(medical,woundReceived), [_unit, [[_damageToAdd, _bodyPart, _damageToAdd]], _instigator, _typeOfDamage]] call CBA_fnc_localEvent; + +#ifdef DEBUG_TESTRESULTS +private _endDmg = GET_BODYPART_DAMAGE(_unit); +private _endPain = GET_PAIN(_unit); +private _typeOfDamageAdj = _typeOfDamage call ACEFUNC(medical_damage,getTypeOfDamage); +private _config = configFile >> "ACE_Medical_Injuries" >> "damageTypes" >> _typeOfDamageAdj; +private _selectionSpecific = true; +if (isClass _config) then { + _selectionSpecific = (getNumber (_config >> "selectionSpecific")) == 1; +} else { + WARNING_2("Damage type not in config [%1:%2]",_typeOfDamage,_config); +}; +INFO_4("Debug AddDamageToUnit: Type [%1] - Selection Specific [%2] - HitPoint [%3 -> %4]",_typeOfDamage,_selectionSpecific,_startDmg select _bodyPartIndex,_endDmg select _bodyPartIndex); +INFO_4("Pain Change [%1 -> %2] - BodyPartDamage Change [%3 -> %4]",_startPain,_endPain,_startDmg,_endDmg); +#endif + +true diff --git a/addons/hitpoints/functions/fnc_addTreatmentActions.sqf b/addons/hitpoints/functions/fnc_addTreatmentActions.sqf new file mode 100644 index 000000000..4604e094c --- /dev/null +++ b/addons/hitpoints/functions/fnc_addTreatmentActions.sqf @@ -0,0 +1,65 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, mharis001 + * Creates actions for treatments from config and adds them to the interaction menu. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_gui_fnc_addTreatmentActions + * + * Public: No + */ + +private _actionsConfig = configFile >> QACEGVAR(medical_treatment,actions); +private _actionPaths = ["ACE_Head", "ACE_Neck", "ACE_Torso", "ACE_Chest", "ACE_ArmLeft", "ACE_ArmUpperLeft", "ACE_ArmRight", "ACE_ArmUpperRight", "ACE_LegLeft", "ACE_LegUpperLeft", "ACE_LegRight", "ACE_LegUpperRight"]; + +private _fnc_statement = { + params ["_target", "_player", "_args"]; + _args params ["_bodyPart", "_treatmentName"]; + [_player, _target, _bodyPart, _treatmentName] call ACEFUNC(medical_treatment,treatment); +}; + +private _fnc_condition = { + params ["_target", "_player", "_args"]; + _args params ["_bodyPart", "_treatmentName"]; + [_player, _target, _bodyPart, _treatmentName] call ACEFUNC(medical_treatment,canTreatCached); +}; + +{ + private _configName = configName _x; + private _actionName = format [QACEGVAR(interaction,_%1), _configName]; + private _displayName = getText (_x >> "displayName"); + private _icon = getText (_x >> "icon"); + + private _allowedBodyParts = getArray (_x >> "allowedSelections") apply {toLowerANSI _x}; + if (_allowedBodyParts isEqualTo ["all"]) then { + _allowedBodyParts = ALL_BODY_PARTS apply {toLowerANSI _x}; + }; + + { + private _bodyPart = _x; + private _actionPath = _actionPaths select (ALL_BODY_PARTS find toLowerANSI _bodyPart); + + private _action = [ + _actionName, + _displayName, + _icon, + _fnc_statement, + _fnc_condition, + {}, + [_bodyPart, _configName], + {[0, 0, 0]}, + 2, + [false, true, false, false, false] + ] call ACEFUNC(interact_menu,createAction); + + ["CAManBase", 0, [_actionPath], _action, true] call ACEFUNC(interact_menu,addActionToClass); + ["CAManBase", 0, ["ACE_MainActions", "ACE_Medical_Radial", _actionPath], _action, true] call ACEFUNC(interact_menu,addActionToClass); + GVAR(selfInteractionActions) pushBack ["", 1, ["ACE_SelfActions", "ACE_Medical", _actionPath], _action]; + } forEach _allowedBodyParts; +} forEach configProperties [_actionsConfig, "isClass _x"]; diff --git a/addons/hitpoints/functions/fnc_bindPelvis.sqf b/addons/hitpoints/functions/fnc_bindPelvis.sqf new file mode 100644 index 000000000..d01e68235 --- /dev/null +++ b/addons/hitpoints/functions/fnc_bindPelvis.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(bindPelvis), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_bindPelvisLocal.sqf b/addons/hitpoints/functions/fnc_bindPelvisLocal.sqf new file mode 100644 index 000000000..73e5994b4 --- /dev/null +++ b/addons/hitpoints/functions/fnc_bindPelvisLocal.sqf @@ -0,0 +1,66 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call for fully healing a fracture. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_fnc_closedReductionLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; + +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; +private _fentanylEffectiveness = 0; +private _ketamineEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; +} forEach _medStack; +if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + _localAnesthesia <= 0.8 +) then { + [_patient, [0.6, 0.7, 0.8] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); +}; + +playSound3D [QEPATHTOF_SOUND(surgery,sounds\reduction.wav), _patient, false, getPosASL _patient, 8, 1, 15]; + +private _pelvicFracture = _patient getVariable [QGVAR(pelvicFracture), 0]; +if (_pelvicFracture > 0) then { + _patient setVariable [QGVAR(pelvicFracture), -1, true]; + [_patient] call EFUNC(misc,updateDamageEffects); + _patient setVariable [QGVAR(activePelvicBinder), true, true]; +}; + + diff --git a/addons/hitpoints/functions/fnc_burnDressing.sqf b/addons/hitpoints/functions/fnc_burnDressing.sqf new file mode 100644 index 000000000..928ac47bc --- /dev/null +++ b/addons/hitpoints/functions/fnc_burnDressing.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(burnDressing), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_burnDressingLocal.sqf b/addons/hitpoints/functions/fnc_burnDressingLocal.sqf new file mode 100644 index 000000000..5c4659d77 --- /dev/null +++ b/addons/hitpoints/functions/fnc_burnDressingLocal.sqf @@ -0,0 +1,84 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for bandaging a patient's open wounds. + * + * Arguments: + * 0: Patient + * 1: Body Part + * 2: Treatment + * 3: Bandage effectiveness coefficient (default: 1) + * + * Return Value: + * None + * + * Example: + * [player, "Head", "FieldDressing"] call ace_medical_treatment_fnc_bandageLocal + * + * Public: No + */ + +params ["_patient", "_bodyPart", "_bandage", ["_bandageEffectiveness", 1, [0]]]; +TRACE_4("burnDressingLocal",_patient,_bodyPart,_bandage,_bandageEffectiveness); +_bodyPart = toLowerANSI _bodyPart; + +private _openWounds = GET_OPEN_WOUNDS(_patient); +private _woundsOnPart = _openWounds getOrDefault [_bodyPart, []]; +if (_woundsOnPart isEqualTo []) exitWith {}; + +// Figure out which injuries for this bodypart are the best choice to bandage +private _targetWounds = [_patient, _bandage, _bodyPart, _bandageEffectiveness * ACEGVAR(medical_treatment,bandageEffectiveness)] call ACEFUNC(medical_treatment,findMostEffectiveWounds); + +// Everything is patched up on this body part already +if (count _targetWounds == 0) exitWith {}; + +private _treatedDamage = 0; +private _clearConditionCache = false; + +{ + private _wound = _x; + _wound params ["_classID", "_amountOf", "_bleeding", "_damage"]; + _y params ["_effectiveness", "_woundIndex", "_impact"]; + + // clear condition cache if we stopped all bleeding for this injury + if (!_clearConditionCache) then { + _clearConditionCache = (_effectiveness >= _amountOf); + }; + + // Reduce the amount this injury is present + (_woundsOnPart select _woundIndex) set [1, _amountOf - _impact]; + + // Store treated damage for clearing trauma + _treatedDamage = _treatedDamage + (_impact * _damage); + + // Handle reopening bandaged wounds + if (_impact > 0 && {ACEGVAR(medical_treatment,advancedBandages) == 2}) then { + [_patient, _impact, _bodyPart, _woundIndex, _wound, _bandage] call ACEFUNC(medical_treatment,handleBandageOpening); + }; +} forEach _targetWounds; + +_patient setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + +[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + +// Check if we fixed limping from this treatment +if ( + ACEGVAR(medical,limping) == 1 + && {_clearConditionCache} + && {_bodyPart in ["leftleg", "rightleg", "upperleftleg", "upperrightleg"]} + && {_patient getVariable [QACEGVAR(medical,isLimping), false]} +) then { + [_patient] call ACEFUNC(medical_engine,updateDamageEffects); +}; + +if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + TRACE_2("trauma - clearing trauma after bandage",_bodyPart,_woundsOnPart); + [_patient, _bodyPart, -_treatedDamage] call ACEFUNC(medical_treatment,addTrauma); +}; + +// Reset treatment condition cache for nearby players if we stopped all bleeding +if (_clearConditionCache) then { + private _nearPlayers = (_patient nearEntities ["CAManBase", 6]) select {_x call ACEFUNC(common,isPlayer)}; + TRACE_1("clearConditionCaches: bandage",_nearPlayers); + [QEGVAR(interact_menu,clearConditionCaches), [], _nearPlayers] call CBA_fnc_targetEvent; +}; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_canBandage.sqf b/addons/hitpoints/functions/fnc_canBandage.sqf new file mode 100644 index 000000000..152401928 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canBandage.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: kymckay/cplhardcore + * Prevents bandage actions from showing if selected body part isn't bleeding. + * Toggles between showing all or only basic bandage action for advanced setting. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Can Bandage + * + * Example: + * [player, cursorTarget, "Head", "FieldDressing"] call ace_medical_treatment_fnc_canBandage + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart", "_bandage"]; +_bodyPart = toLowerANSI _bodyPart; + +private _wounds = (GET_OPEN_WOUNDS(_patient)) getOrDefault [_bodyPart, []]; +private _canBandage = false; +if ((_bandage == "BasicBandage") isEqualTo (ACEGVAR(medical_treatment,advancedBandages) != 0)) exitWith {false}; + +{ + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + if ((_className isNotEqualTo "InternalBleeding") && (_amountOf * _bleeding > 0)) exitWith { + _canBandage = true; + }; +} forEach _wounds; +_canBandage \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_canBindPelvis.sqf b/addons/hitpoints/functions/fnc_canBindPelvis.sqf new file mode 100644 index 000000000..4b7232e2d --- /dev/null +++ b/addons/hitpoints/functions/fnc_canBindPelvis.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap a splint on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canWrapSplint + * + * Public: No + */ + +params ["", "_patient"]; +if (_patient call ACEFUNC(common,isSwimming)) exitWith {false}; +private _canBindPelvis = false; +private _pelvicFracture = _patient getVariable [QGVAR(pelvicFracture), 0]; +if (_pelvicFracture > 0) then { + _canBindPelvis = true; +}; +_canBindPelvis + + diff --git a/addons/hitpoints/functions/fnc_canBurnBandage.sqf b/addons/hitpoints/functions/fnc_canBurnBandage.sqf new file mode 100644 index 000000000..96223550e --- /dev/null +++ b/addons/hitpoints/functions/fnc_canBurnBandage.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: kymckay/cplhardcore + * Prevents bandage actions from showing if selected body part isn't bleeding. + * Toggles between showing all or only basic bandage action for advanced setting. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Can Bandage + * + * Example: + * [player, cursorTarget, "Head", "FieldDressing"] call ace_medical_treatment_fnc_canBandage + * + * Public: No + */ +params ["", "_patient", "_bodyPart"]; +private _wounds = (GET_OPEN_WOUNDS(_patient)) getOrDefault [_bodyPart, []]; +private _canBandage = false; + +{ + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + if (_className isEqualTo "ThermalBurn") exitWith { + _canBandage = true; + }; +} forEach _wounds; + +TRACE_2("canBandage",_bodyPart,_canBandage); +_canBandage \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_canIceJoint.sqf b/addons/hitpoints/functions/fnc_canIceJoint.sqf new file mode 100644 index 000000000..be57e4fa8 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canIceJoint.sqf @@ -0,0 +1,55 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap a splint on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canWrapSplint + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; +if (_patient call ACEFUNC(common,isSwimming)) exitWith {false}; +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _canIceJoint = false; +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; +private _jointCheck = (_patient getVariable [QGVAR(jointCheck), [false, false, false, false]]) select _jointGroupIndex; + +if !(_jointCheck) exitWith { + _canIceJoint}; +if (_jointGroupIndex != -1) then { + private _limbJointStatus = _jointArray select _jointGroupIndex; + private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] + } else { + [1, 2] + }; + { + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury in [1, 2]) exitWith { + _canIceJoint = true; + TRACE_1("CanIceJoint1",_canIceJoint); + }; + } forEach _selectedJointIndexes; +}; +TRACE_1("CanIceJoint2",_canIceJoint); +_canIceJoint + + diff --git a/addons/hitpoints/functions/fnc_canReduceJoint.sqf b/addons/hitpoints/functions/fnc_canReduceJoint.sqf new file mode 100644 index 000000000..7fe84327e --- /dev/null +++ b/addons/hitpoints/functions/fnc_canReduceJoint.sqf @@ -0,0 +1,50 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap a splint on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canWrapSplint + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; +if (_patient call ACEFUNC(common,isSwimming)) exitWith {false}; +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _canReduceJoint = false; +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; +private _jointCheck = (_patient getVariable [QGVAR(jointCheck), [false, false, false, false]]) select _jointGroupIndex; +if !(_jointCheck) exitWith {_canReduceJoint}; +if (_jointGroupIndex != -1) then { + private _limbJointStatus = _jointArray select _jointGroupIndex; + private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] + } else { + [1, 2] + }; + { + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury in [3, 6]) exitWith { + _canReduceJoint = true; + }; + } forEach _selectedJointIndexes; +}; +_canReduceJoint + diff --git a/addons/hitpoints/functions/fnc_canSoftcorePressure.sqf b/addons/hitpoints/functions/fnc_canSoftcorePressure.sqf new file mode 100644 index 000000000..a689bb576 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canSoftcorePressure.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can apply Softcore or Hardcore Pressure + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canWrapSplint + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +private _canPressure = false; +if ((GVAR(hardcorePressure)) && ([_medic, _patient, _bodyPart] call FUNC(canBandage))) then{ + if (!(GVAR(hardcorePressure)) && (_medic != _patient)) then { + _canPressure = true; + }; + if (GVAR(hardcorePressure)) then { + _canPressure = true; + }; +}; +_canPressure \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_canSplint.sqf b/addons/hitpoints/functions/fnc_canSplint.sqf new file mode 100644 index 000000000..2703ecdb1 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canSplint.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Checks if a splint can be applied to the patient. + * + * Arguments: + * 0: Medic (not used) + * 1: Patient + * 2: Body Part + * + * Return Value: + * Can Splint + * + * Example: + * [player, cursorObject, "LeftLeg"] call ace_medical_treatment_fnc_canSplint + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +(GET_FRACTURES(_patient) select _partIndex) == 1 \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_canStabilizeJoint.sqf b/addons/hitpoints/functions/fnc_canStabilizeJoint.sqf new file mode 100644 index 000000000..3b94f2ca5 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canStabilizeJoint.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap a splint on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canWrapSplint + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; +if (_patient call ACEFUNC(common,isSwimming)) exitWith {false}; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _canStabilizeJoint = false; +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; +private _jointCheck = (_patient getVariable [QGVAR(jointCheck), [false, false, false, false]]) select _jointGroupIndex; +if !(_jointCheck) exitWith {_canStabilizeJoint}; +if (_jointGroupIndex != -1) then { + private _limbJointStatus = _jointArray select _jointGroupIndex; + private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] + } else { + [1, 2] + }; + { + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury == 3) exitWith { + _canStabilizeJoint = true; + }; + } forEach _selectedJointIndexes; +}; +_canStabilizeJoint + diff --git a/addons/hitpoints/functions/fnc_canWrapJoint.sqf b/addons/hitpoints/functions/fnc_canWrapJoint.sqf new file mode 100644 index 000000000..f946d959b --- /dev/null +++ b/addons/hitpoints/functions/fnc_canWrapJoint.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap a splint on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canStabilizeJoint + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; +if (_patient call ACEFUNC(common,isSwimming)) exitWith {false}; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _canStabilizeJoint = false; +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; +private _jointCheck = (_patient getVariable [QGVAR(jointCheck), [false, false, false, false]]) select _jointGroupIndex; +if !(_jointCheck) exitWith {_canStabilizeJoint}; +if (_jointGroupIndex != -1) then { + private _limbJointStatus = _jointArray select _jointGroupIndex; + private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] + } else { + [1, 2] + }; + { + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury in [7, 8]) exitWith { + _canStabilizeJoint = true; + }; + } forEach _selectedJointIndexes; +}; +_canStabilizeJoint + diff --git a/addons/hitpoints/functions/fnc_canWrapSplint.sqf b/addons/hitpoints/functions/fnc_canWrapSplint.sqf new file mode 100644 index 000000000..afada0eb5 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canWrapSplint.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap a splint on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Bool + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_canWrapSplint + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; +if (_patient call ACEFUNC(common,isSwimming)) exitWith {false}; +if (ACEGVAR(medical,fractures) in [0, 1]) exitWith {false}; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +(GET_FRACTURES(_patient) select _partIndex) == -1 diff --git a/addons/hitpoints/functions/fnc_canWrapWound.sqf b/addons/hitpoints/functions/fnc_canWrapWound.sqf new file mode 100644 index 000000000..cba0a7f2f --- /dev/null +++ b/addons/hitpoints/functions/fnc_canWrapWound.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap Wounds on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + + * Return Value: + * Bool + * + * Example: + * [player, cursorTarget, "Head", "FieldDressing"] call kat_hitpoints_fnc_canWrapWound + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +_bodyPart = toLowerANSI _bodyPart; + +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); + +private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []]; +if (_bandagedWoundsOnPart isEqualTo []) exitWith { false }; + +private _includedTypes = [ + "Compressed_Gauze", + "fourByfour_Gauze", + "Burn_Dressing", + "Hemostatic_Gauze" +]; + +private _hasIncludedBandage = _bandagedWoundsOnPart findIf { + (_x param [4, ""]) in _includedTypes +} != -1; +TRACE_2("canwrap",_hasIncludedBandage,_bandagedWoundsOnPart); +_hasIncludedBandage \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_canWrapWoundCoag.sqf b/addons/hitpoints/functions/fnc_canWrapWoundCoag.sqf new file mode 100644 index 000000000..3eb1a8c36 --- /dev/null +++ b/addons/hitpoints/functions/fnc_canWrapWoundCoag.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Condition Check if you can wrap Wounds on a limb + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + + * Return Value: + * Bool + * + * Example: + * [player, cursorTarget, "Head", "FieldDressing"] call kat_hitpoints_fnc_canWrapWound + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +_bodyPart = toLowerANSI _bodyPart; + +private _bandagedWounds = GET_COAGED_WOUNDS(_patient); + +private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []]; +if (_bandagedWoundsOnPart isEqualTo []) exitWith { false }; + +private _hasBloodClotBandage = _bandagedWoundsOnPart findIf { + (_x param [4, ""]) find "BloodClot" > -1 +} != -1; + +TRACE_2("canwrap",_hasBloodClotBandage,_bandagedWoundsOnPart); +_hasBloodClotBandage \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_checkJoints.sqf b/addons/hitpoints/functions/fnc_checkJoints.sqf new file mode 100644 index 000000000..c73cde1b5 --- /dev/null +++ b/addons/hitpoints/functions/fnc_checkJoints.sqf @@ -0,0 +1,95 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks for internal bleeding on a bodypart + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_hitpoints_checkJoints + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +TRACE_1("checkLimb1",_bodyPart); +private _partIndex = ALL_BODY_PARTS find _bodyPart; +if (_partindex == 3) then { + private _pelvicFracture = _patient getVariable [QGVAR(pelvicFracture), 0]; + _typeLabel = switch (true) do { + case (_pelvicFracture == -1): { LSTRING(stabilizedPelvicFracture_log) }; + case (_pelvicFracture == 0): { LSTRING(noPelvicFracture_log) }; + case (_pelvicFracture == 1): { LSTRING(pelvicFracture_log) }; + default {""}; + }; + if (_typeLabel != "") then { + [_patient, "quick_view", _typeLabel] call EFUNC(circulation,removeLog); + [_patient, "quick_view", _typeLabel, [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + }; +} else { +private _jointArray = GET_JOINTS(_patient); +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; +private _jointCheck = _patient getVariable [QGVAR(jointCheck), [false, false, false, false]]; +_jointCheck set [_jointGroupIndex, true]; +_patient setVariable [QGVAR(jointCheck), _jointCheck, true]; +[{ + params ["_patient", "_jointGroupIndex"]; + private _jointCheck = _patient getVariable [QGVAR(jointCheck), [false, false, false, false]]; + _jointCheck set [_jointGroupIndex, false]; + _patient setVariable [QGVAR(jointCheck), _jointCheck, true]; +}, [_patient, _jointGroupIndex], 300] call CBA_fnc_waitAndExecute; +private _limbJointStatus = _jointArray select _jointGroupIndex; +{ + _x params ["_level"]; + _typeLabel = switch (true) do { + case (_level == 1): { localize LSTRING(JointInjury_InflamedStrain) }; + case (_level == 2): { localize LSTRING(JointInjury_InflamedSprain) }; + case (_level == 3): { localize LSTRING(JointInjury_Dislocation) }; + case (_level == 4): { localize LSTRING(JointInjury_IcedStrain) }; + case (_level == 5): { localize LSTRING(JointInjury_IcedSprain) }; + case (_level == 6): { localize LSTRING(JointInjury_StabilizedDislocation) }; + case (_level == 7): { localize LSTRING(JointInjury_Strain) }; + case (_level == 8): { localize LSTRING(JointInjury_Sprain) }; + case (_level == 9): { localize LSTRING(JointInjury_ReducedDislocation) }; + case (_level == 10): { localize LSTRING(JointInjury_WrappedStrain) }; + case (_level == 11): { localize LSTRING(JointInjury_WrappedSprain) }; + default {""}; + }; + _limbLabel = switch (true) do { + case (_jointGroupIndex == 0): { localize ACELSTRING(medical_gui,LeftArm) }; + case (_jointGroupIndex == 1): { localize ACELSTRING(medical_gui,RightArm) }; + case (_jointGroupIndex == 2): { localize ACELSTRING(medical_gui,LeftLeg) }; + case (_jointGroupIndex == 3): { localize ACELSTRING(medical_gui,RightLeg) }; + default {}; + }; + _joint = switch (true) do { + case ((_jointGroupIndex in [0, 1]) && (_forEachIndex == 0)): { localize LSTRING(JointInjury_Shoulder) }; + case ((_jointGroupIndex in [0, 1]) && (_forEachIndex == 1)): { localize LSTRING(JointInjury_Elbow) }; + case ((_jointGroupIndex in [0, 1]) && (_forEachIndex == 2)): { localize LSTRING(JointInjury_Wrist) }; + case ((_jointGroupIndex in [2, 3]) && (_forEachIndex == 0)): { localize LSTRING(JointInjury_Hip) }; + case ((_jointGroupIndex in [2, 3]) && (_forEachIndex == 1)): { localize LSTRING(JointInjury_Knee) }; + case ((_jointGroupIndex in [2, 3]) && (_forEachIndex == 2)): { localize LSTRING(JointInjury_Ankle) }; + default {}; + }; + if ((_typeLabel != "") && (GVAR(JointChance) > 0)) then { + [_patient, "quick_view", LSTRING(JointLog)] call EFUNC(circulation,removeLog); + [_patient, "quick_view", LSTRING(JointLog), [[_medic] call ACEFUNC(common,getName), _typeLabel, _joint, _limbLabel]] call ACEFUNC(medical_treatment,addToLog); + }; + } forEach _limbJointStatus; +}; + + + diff --git a/addons/hitpoints/functions/fnc_convertTourniquet.sqf b/addons/hitpoints/functions/fnc_convertTourniquet.sqf new file mode 100644 index 000000000..dd9678c84 --- /dev/null +++ b/addons/hitpoints/functions/fnc_convertTourniquet.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001 + * Applies a tourniquet to the patient on the given body part. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment (not used) + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg", "", objNull, "ACE_tourniquet"] call ace_medical_treatment_fnc_tourniquet + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "", "", "_usedItem", "", "_type"]; + +[_patient, "activity", LSTRING(Activity_convertedTourniquet), [[_medic, false, true] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + +[QGVAR(tourniquetLocal), [_patient, _bodyPart, _type], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_convertTourniquetCheck.sqf b/addons/hitpoints/functions/fnc_convertTourniquetCheck.sqf new file mode 100644 index 000000000..67bd2e319 --- /dev/null +++ b/addons/hitpoints/functions/fnc_convertTourniquetCheck.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001 + * Applies a tourniquet to the patient on the given body part. + * + * Arguments: + * 0: Unit + * 1: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg", "", objNull, "ACE_tourniquet"] call ace_medical_treatment_fnc_tourniquet + * + * Public: No + */ + +params ["_unit", "_bodyPart"]; + +private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart; +_hasCovertableTQ = false; +if (_index >= 0) then { + private _tqValue = (_unit getVariable [VAR_KAT_TOURNIQUET, [0,0,0,0,0,0,0,0,0,0,0,0]] select _index); + _hasCovertableTQ = (_tqValue > 0.1 && _tqValue < 1); +}; +_hasCovertableTQ \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_convertTourniquetTime.sqf b/addons/hitpoints/functions/fnc_convertTourniquetTime.sqf new file mode 100644 index 000000000..cce43c02a --- /dev/null +++ b/addons/hitpoints/functions/fnc_convertTourniquetTime.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001 + * Applies a tourniquet to the patient on the given body part. + * + * Arguments: + * 0: Unit + * 1: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg", "", objNull, "ACE_tourniquet"] call ace_medical_treatment_fnc_tourniquet + * + * Public: No + */ + +params ["_type"]; + +_tqTime = 1; +if (_type == 0) then { + _tqTime = GVAR(treatmentTimeDelibrateTourniquet) - GVAR(treatmentTimeHastyTourniquet); +} else { + _tqTime = GVAR(treatmentTimeTrainedDelibrateTourniquet) - GVAR(treatmentTimeTrainedHastyTourniquet); +}; +_tqTime \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_damageAmount.sqf b/addons/hitpoints/functions/fnc_damageAmount.sqf new file mode 100644 index 000000000..1cf2e4936 --- /dev/null +++ b/addons/hitpoints/functions/fnc_damageAmount.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Modified: Returns highest damage value instead of bool + * + * Arguments: + * 0: The Unit + * 1: BodyPartNumber + * + * Return Value: + * Highest damage amount + * + * Public: No + */ + +params ["_unit", "_bodyPartN"]; + +private _damage = GET_BODYPART_DAMAGE(_unit); +private _occlusionMap = [ + [4, [4, 5]], + [5, [5]], + [6, [6, 7]], + [7, [7]], + [8, [8, 9, 3]], + [9, [9, 3]], + [10, [10, 11, 3]], + [11, [11, 3]] +]; + +private _idx = _occlusionMap findIf { _x#0 == _bodyPartN }; +private _parts = if (_idx != -1) then { _occlusionMap select _idx select 1 } else { [] }; +private _highestDamage = 0; +{ + _highestDamage = _highestDamage max (_damage select _x); +} forEach _parts; +_highestDamage \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_damageCheck.sqf b/addons/hitpoints/functions/fnc_damageCheck.sqf new file mode 100644 index 000000000..14b5430de --- /dev/null +++ b/addons/hitpoints/functions/fnc_damageCheck.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Checks if an IV is occluded + * + * Arguments: + * 0: The Unit + * 1: BodyPartNumber + * + * Return Value: + * IsOccluded (Bool) + * + * Example: + * [player, 1] call kat_pharma_fnc_getBloodVolumeChange + * + * Public: No + */ + +params ["_unit", "_bodyPartN"]; +private _isOccluded = false; +private _damage = GET_BODYPART_DAMAGE(_unit); +private _occlusionMap = [ + [4, [4, 5]], + [5, [5]], + [6, [6, 7]], + [7, [7]], + [8, [8, 9, 3]], + [9, [9, 3]], + [10, [10, 11, 3]], + [11, [11, 3]] +]; +private _idx = _occlusionMap findIf { _x#0 == _bodyPartN }; +private _result = if (_idx != -1) then { _occlusionMap select _idx select 1 } else { [] }; +private _isOccluded = ({ _damage select _x > GVAR(damageEffectThreshold)} count _result > 0); +_isOccluded \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_determineIfFatal.sqf b/addons/hitpoints/functions/fnc_determineIfFatal.sqf new file mode 100644 index 000000000..d8d6a8563 --- /dev/null +++ b/addons/hitpoints/functions/fnc_determineIfFatal.sqf @@ -0,0 +1,72 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror, Glowbal + * Determines if damage is fatal + * + * Arguments: + * 0: The Unit + * 1: Part No + * 2: Damage Array - QEGVAR(medical,bodyPartDamage) + * 3: New Damage + * + * ReturnValue: + * Was Fatal + * + * Example: + * [player, 0, 1.4, 0.7] call ace_medical_damage_fnc_determineIfFatal + * + * Public: No + */ + +params ["_unit", "_part", "_bodyPartDamage", "_woundDamage"]; + +if (_part > 1 && ACEGVAR(medical,useLimbDamage) == 0) exitWith { false }; + +scopeName "main"; + +if (ACEGVAR(medical,fatalDamageSource) in [0, 2]) then { + // Emulate damage to vital organs - Original rewrite logic, only powerfull headshots or random torso shots + if (_part == 0 && {_woundDamage >= HEAD_DAMAGE_THRESHOLD}) exitWith { + // Fatal damage to the head is guaranteed death + TRACE_1("determineIfFatal: lethal headshot",_woundDamage); + true breakOut "main"; + }; + if (_part == 1 && {_woundDamage >= HEAD_DAMAGE_THRESHOLD}) exitWith { + // Fatal damage to the head is guaranteed death + TRACE_1("determineIfFatal: lethal headshot",_woundDamage); + true breakOut "main"; + }; + if (_part == 2 && {_woundDamage >= ORGAN_DAMAGE_THRESHOLD} && {random 1 < HEART_HIT_CHANCE}) exitWith { + // Fatal damage to torso has various results based on organ hit - Heart shot is lethal + TRACE_1("determineIfFatal: lethal heartshot",_woundDamage); + true breakOut "main"; + }; +}; +if (ACEGVAR(medical,fatalDamageSource) in [1, 2]) then { + // Sum of trauma to critical areas can be fatal (e.g. many small hits) + private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit); + private _headThreshold = 1.25 * _damageThreshold; + private _bodyThreshold = 1.5 * _damageThreshold; + + _bodyPartDamage params ["_headDamage", "_bodyDamage"]; + + private _vitalDamage = ((_headDamage - _headThreshold) max 0) + ((_bodyDamage - _bodyThreshold) max 0); + + // Sum of trauma to the limbs can also be fatal (shock) but this should take much more damage at default (5x as much) + if ([false, (!(isPlayer _unit) && {!(GET_CONVERT_STATUS(_unit))}), true] select ACEGVAR(medical,useLimbDamage)) then { + private _limbThreshold = ACEGVAR(medical,limbDamageThreshold) * _damageThreshold; + { + _vitalDamage = _vitalDamage + ((_x - _limbThreshold) max 0); + } forEach (_bodyPartDamage select [2]); + }; + + private _chanceFatal = 1 - exp -((_vitalDamage/FATAL_SUM_DAMAGE_WEIBULL_L)^FATAL_SUM_DAMAGE_WEIBULL_K); + TRACE_3("",_bodyPartDamage,_vitalDamage,_chanceFatal); + + if (_chanceFatal > random 1) exitWith { + TRACE_1("determineIfFatal: lethal trauma",_woundDamage); + true breakOut "main"; + }; +}; + +false \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_fullHealLocal.sqf b/addons/hitpoints/functions/fnc_fullHealLocal.sqf new file mode 100644 index 000000000..022eb13dd --- /dev/null +++ b/addons/hitpoints/functions/fnc_fullHealLocal.sqf @@ -0,0 +1,117 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call ace_medical_treatment_fnc_fullHealLocal + * + * Public: No + */ + +params ["_patient"]; +TRACE_1("fullHealLocal",_patient); + +if (!alive _patient) exitWith {}; + +// check if on fire, then put out the fire before healing +if ((["ace_fire"] call ACEFUNC(common,isModLoaded)) && {[_patient] call ACEFUNC(fire,isBurning)}) then { + _patient setVariable [QACEGVAR(fire,intensity), 0, true]; +}; + +// Allow mods to heal +[QACEGVAR(medical_treatment,fullHealLocalMod), [_patient]] call CBA_fnc_localEvent; + +private _state = GET_SM_STATE(_patient); +TRACE_1("start",_state); + +// Treatment conditions would normally limit full heal to non-unconscious units +// However, this may be called externally (through Zeus) +if IN_CRDC_ARRST(_patient) then { + TRACE_1("Exiting cardiac arrest",_patient); + [QACEGVAR(medical,CPRSucceeded), _patient] call CBA_fnc_localEvent; + _state = GET_SM_STATE(_patient); + TRACE_1("after CPRSucceeded",_state); +}; + +_patient setVariable [VAR_PAIN, 0, true]; +_patient setVariable [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME, true]; + +// Tourniquets +{ + if (_x != 0) then { + [_patient, "ACE_tourniquet"] call ACEFUNC(common,addToInventory); + }; +} forEach GET_TOURNIQUETS(_patient); +_patient setVariable [VAR_KAT_TOURNIQUET, [0,0,0,0,0,0,0,0,0,0,0,0], true]; +_patient setVariable [VAR_TOURNIQUET, [0,0,0,0,0,0,0,0,0,0,0,0], true]; +_patient setVariable [QACEGVAR(medical,occludedMedications), nil, true]; + +// Wounds and Injuries +_patient setVariable [VAR_OPEN_WOUNDS, createHashMap, true]; +_patient setVariable [VAR_BANDAGED_WOUNDS, createHashMap, true]; +_patient setVariable [VAR_STITCHED_WOUNDS, createHashMap, true]; +_patient setVariable [VAR_COAGED_WOUNDS, createHashMap, true]; +_patient setVariable [VAR_WRAPPED_WOUNDS, createHashMap, true]; +_patient setVariable [QACEGVAR(medical,isLimping), false, true]; +_patient setVariable [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES, true]; + +// Update wound bleeding +[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + +// Vitals +_patient setVariable [VAR_HEART_RATE, [_patient] call EFUNC(circulation,generateDefaultHeartRate), true]; +_patient setVariable [VAR_BLOOD_PRESS, [80, 120], true]; +_patient setVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES, true]; +_patient setVariable [VAR_SPO2, DEFAULT_SPO2, true]; +_patient setVariable [VAR_OXYGEN_DEMAND, 0, true]; +// IVs +_patient setVariable [QACEGVAR(medical,ivBags), nil, true]; + +// Damage storage +_patient setVariable [VAR_BODYPART_DAMAGE, DEFAULT_BODYPART_DAMAGE_VALUES, true]; + +// wakeup needs to be done after achieving stable vitals, but before manually reseting unconc var +if IS_UNCONSCIOUS(_patient) then { + if !([_patient] call ACEFUNC(medical_status,hasStableVitals)) then {ERROR_2("fullheal [unit %1][state %2] did not restore stable vitals",_patient,_state);}; + TRACE_1("Waking up",_patient); + [QACEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent; + _state = GET_SM_STATE(_patient); + TRACE_1("after WakeUp",_state); + if IS_UNCONSCIOUS(_patient) then {ERROR_2("fullheal [unit %1][state %2] failed to wake up patient",_patient,_state);}; +}; + +// Generic medical admin +// _patient setVariable [VAR_CRDC_ARRST, false, true]; // this should be set by statemachine transition +// _patient setVariable [VAR_UNCON, false, true]; // this should be set by statemachine transition +_patient setVariable [VAR_HEMORRHAGE, 0, true]; +_patient setVariable [VAR_IN_PAIN, false, true]; +_patient setVariable [VAR_PAIN_SUPP, 0, true]; + + +//pressure +_patient setVariable [QGVAR(pressureApplied), [-1, objNull], true]; +_patient setVariable [VAR_APPLIEDPRESSURE, DEFAULT_APPLIEDPRESSURE_VALUES, true]; + +// Medication +_patient setVariable [VAR_MEDICATIONS, [], true]; + +// Reset triage card since medication is reset +_patient setVariable [QACEGVAR(medical,triageCard), [], true]; + +[_patient] call ACEFUNC(medical_engine,updateDamageEffects); + +// Reset damage +_patient setDamage 0; + +_patient setVariable [VAR_BODY_BLEED_RATE, DEFAULT_BODY_BLEED_RATE_VALUES]; + +[QACEGVAR(medical,FullHeal), _patient] call CBA_fnc_localEvent; +_state = GET_SM_STATE(_patient); +TRACE_1("after FullHeal",_state); diff --git a/addons/hitpoints/functions/fnc_fullHealMod.sqf b/addons/hitpoints/functions/fnc_fullHealMod.sqf new file mode 100644 index 000000000..96cea2269 --- /dev/null +++ b/addons/hitpoints/functions/fnc_fullHealMod.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for fully healing a patient. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call ace_medical_treatment_fnc_fullHealLocal + * + * Public: No + */ + +params ["_patient"]; +TRACE_1("fullHealMod",_patient); + +_patient setVariable [QGVAR(isApplyingPressure), false, true]; +_patient setVariable [QGVAR(evisceration), 0, true]; +_patient setVariable [QGVAR(activeWoundPack), 0, true]; +_patient setVariable [VAR_JOINTS, DEFAULT_JOINT_VALUES, true]; +_patient setVariable [QGVAR(jointCheck), [false, false, false, false], true]; +_patient setVariable [QGVAR(pelvicFracture), 0, true]; +_patient setVariable [QGVAR(activePelvicBinder), false, true]; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_getAmmoData.sqf b/addons/hitpoints/functions/fnc_getAmmoData.sqf new file mode 100644 index 000000000..8590a7464 --- /dev/null +++ b/addons/hitpoints/functions/fnc_getAmmoData.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: LinkIsGrim + * Returns base damage value, penetration factor, and expected muzzle velocity of a given round, either from a cache or by reading the ammo config. + * + * Arguments: + * 0: Ammo + * + * Return Value: + * Base damage value, penetration factor, muzzle velocity + * + * Example: + * "B_556x45_Ball" call ace_medical_damage_fnc_getAmmoData + * + * Public: No + */ + +// Baseline penetrability used for armor penetration calculation, see (https://community.bistudio.com/wiki/CfgAmmo_Config_Reference#caliber) +#define ARMOR_PENETRABILITY 0.015 + +params ["_ammo"]; + +GVAR(ammoCache) getOrDefaultCall [toLowerANSI _ammo, { + TRACE_1("Cache miss",_ammo); + private _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + + if (isNull _ammoConfig) then { + [0, 0, 0] // return + } else { + private _hit = getNumber (_ammoConfig >> "hit"); + private _caliber = getNumber (_ammoConfig >> "caliber"); + private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed"); + private _penFactor = _caliber * ARMOR_PENETRABILITY; + [_hit, _penFactor, _typicalSpeed] // return + }; +}, true] \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_getHitpointArmor.sqf b/addons/hitpoints/functions/fnc_getHitpointArmor.sqf new file mode 100644 index 000000000..6b5ad48f2 --- /dev/null +++ b/addons/hitpoints/functions/fnc_getHitpointArmor.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" +/* + * Author: Pterolatypus, LinkIsGrim + * Checks a unit's equipment to calculate the total armor on a hitpoint. + * + * Arguments: + * 0: Unit + * 1: Hitpoint + * + * Return Value: + * Armor for the given hitpoint, may be scaled. + * + * Example: + * [player, "HitChest"] call ace_medical_engine_fnc_getHitpointArmor + * + * Public: No + */ + +params ["_unit", "_hitpoint"]; + +private _uniform = uniform _unit; +// If unit is naked, use its underwear class instead +if (_uniform isEqualTo "") then { + _uniform = getText (configOf _unit >> "nakedUniform"); +}; + +private _gear = [ + _uniform, + vest _unit, + headgear _unit +]; +TRACE_1("HPA1",_gear); +private _rags = _gear joinString "$"; +private _var = format [QGVAR(armorCache$%1), _hitpoint]; +_unit getVariable [_var, ["", 0]] params ["_prevRags", "_armor"]; + +if (_rags != _prevRags) then { + _armor = 0; + + { + _armor = _armor + ([_x, _hitpoint] call FUNC(getItemArmor)); + TRACE_1("HPA3",_armor); + } forEach _gear; + + // Armor should be at least 1 to prevent dividing by 0 + _armor = _armor max 1; + TRACE_2("HPA1",_rags,_armor); + _unit setVariable [_var, [_rags, _armor]]; +}; +TRACE_1("HPA1",_armor); + +_armor // return \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_getItemArmor.sqf b/addons/hitpoints/functions/fnc_getItemArmor.sqf new file mode 100644 index 000000000..8c2264553 --- /dev/null +++ b/addons/hitpoints/functions/fnc_getItemArmor.sqf @@ -0,0 +1,60 @@ +#include "..\script_component.hpp" +/* + * Author: Pterolatypus, LinkIsGrim + * Returns the armor value provided by an item to a hitpoint. Armor may be scaled back if over the cap. + * + * Arguments: + * 0: Item Class + * 1: Hitpoint + * + * Return Value: + * Item armor for the given hitpoint, may be scaled. + * + * Example: + * ["V_PlateCarrier_rgr", "HitChest"] call ace_medical_engine_fnc_getItemArmor + * + * Public: No + */ + +params ["_item", "_hitpoint"]; +TRACE_1("IA1",_hitpoint); +GVAR(armorCache) getOrDefaultCall [_this joinString "$", { + TRACE_2("Cache miss",_item,_hitpoint); + private _armor = 0; + private _passThrough = 1; + + if !("" in [_item, _hitpoint]) then { + private _itemInfo = configFile >> "CfgWeapons" >> _item >> "ItemInfo"; + private _itemType = getNumber (_itemInfo >> "type"); + + if (_itemType == TYPE_UNIFORM) then { + private _unitCfg = configFile >> "CfgVehicles" >> getText (_itemInfo >> "uniformClass"); + if (_hitpoint == "#structural") then { + // TODO: I'm not sure if this should be multiplied by the base armor value or not + _armor = getNumber (_unitCfg >> "armorStructural"); + } else { + private _entry = _unitCfg >> "HitPoints" >> _hitpoint; + _armor = getNumber (_unitCfg >> "armor") * (1 max getNumber (_entry >> "armor")); + _passThrough = 0.1 max getNumber (_entry >> "passThrough") min 1; // prevent dividing by 0 + }; + } else { + private _condition = format ["getText (_x >> 'hitpointName') == '%1'", _hitpoint]; + private _entry = configProperties [_itemInfo >> "HitpointsProtectionInfo", _condition] param [0, configNull]; + if (!isNull _entry) then { + _armor = getNumber (_entry >> "armor"); + _passThrough = 0.1 max getNumber (_entry >> "passThrough") min 1; + }; + }; + + // Scale armor using passthrough to fix explosive-resistant & stupid armor (#9063) + // Skip scaling for uniforms and items that don't cover the hitpoint to prevent infinite armor + private _armorLevelStep = [4, 2] select (_itemType == TYPE_HEADGEAR); + if (_itemType != TYPE_UNIFORM && (_armor > _armorLevelStep * 6)) then { + private _passThroughEffect = [0.8, 0.4] select (_itemType == TYPE_VEST); + _armor = (log (_armor / (_passThrough ^ _passThroughEffect))) * 10; + TRACE_1("IA2",_hitpoint); + }; + }; + + _armor // return +}, true] \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_getWrapTime.sqf b/addons/hitpoints/functions/fnc_getWrapTime.sqf new file mode 100644 index 000000000..1c2613874 --- /dev/null +++ b/addons/hitpoints/functions/fnc_getWrapTime.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Check for time to wrap a limb + * + * Arguments: + * 0: The Unit + * 1: Body part ("Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg") + * + * Return Value: + * Number + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_getWrapTime + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; +private _allowedBandages = ["Compressed_Gauze", "fourByfour_Gauze", "Burn_Dressing", "Hemostatic_Gauze"]; +private _wounds = GET_BANDAGED_WOUNDS(_patient); +private _woundsOnPart = _wounds getOrDefault [_bodyPart, []]; +private _filteredWounds = []; +{ + private _wound = _x; + if (_wound isEqualType [] && { (_wound select 4) in _allowedBandages }) then { + _filteredWounds pushBack _wound; + }; +} forEach _woundsOnPart; + +private _number = count _filteredWounds; +private _time = _number * GVAR(woundWrapTime); +TRACE_4("getWrap",_time,_number,_woundsOnPart,_filteredWounds); +_time diff --git a/addons/hitpoints/functions/fnc_getWrapTimeCoag.sqf b/addons/hitpoints/functions/fnc_getWrapTimeCoag.sqf new file mode 100644 index 000000000..cecc60675 --- /dev/null +++ b/addons/hitpoints/functions/fnc_getWrapTimeCoag.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Check for time to wrap a limb + * + * Arguments: + * 0: The Unit + * 1: Body part ("Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg") + * + * Return Value: + * Number + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_getWrapTime + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; + +private _wounds = GET_COAGED_WOUNDS(_patient); +private _woundsOnPart = _wounds getOrDefault [_bodyPart, []]; +private _filteredWounds = []; + +{ + private _wound = _x; + if ( + _wound isEqualType [] + && { ((_wound select 4) find "BloodClot") > -1 } + ) then { + _filteredWounds pushBack _wound; + }; +} forEach _woundsOnPart; + +private _number = count _filteredWounds; +private _time = _number * GVAR(woundWrapTime); +TRACE_4("getWrap",_time,_number,_woundsOnPart,_filteredWounds); +_time \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_gui_updateBodyImage.sqf b/addons/hitpoints/functions/fnc_gui_updateBodyImage.sqf new file mode 100644 index 000000000..fe3710eac --- /dev/null +++ b/addons/hitpoints/functions/fnc_gui_updateBodyImage.sqf @@ -0,0 +1,45 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Updates the body image for given target. + * + * Arguments: + * 0: Body image controls group + * 1: Target + * 2: Body part + * + * Return Value: + * None + * + * Example: + * [CONTROL, _target, 0] call kat_breathing_fnc_gui_updateBodyImage + * + * Public: No + */ + +params ["_ctrlGroup", "_target", "_selectionN"]; + +private _ctrlWoundPack = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_WOUNDPACK; +private _ctrlWoundPackVac = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_WOUNDPACK_VACUUM; +private _ctrlEvisceration = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_EVISCERATION; + +private _activeWoundPack = _target getVariable [QGVAR(activeWoundPack), 0]; +private _evisceration = _target getVariable [QGVAR(evisceration), 0]; +if (_activeWoundPack == 1) then { + _ctrlWoundPack ctrlShow true; +} else { + _ctrlWoundPack ctrlShow false; +}; + +if (_activeWoundPack == 2) then { + _ctrlWoundPackVac ctrlShow true; +} else { + _ctrlWoundPackVac ctrlShow false; +}; + +if (_evisceration > 0) then { + _ctrlEvisceration ctrlShow true; +} else { + _ctrlEvisceration ctrlShow false; +}; + diff --git a/addons/hitpoints/functions/fnc_gui_updateInjuryListPart.sqf b/addons/hitpoints/functions/fnc_gui_updateInjuryListPart.sqf new file mode 100644 index 000000000..84791527d --- /dev/null +++ b/addons/hitpoints/functions/fnc_gui_updateInjuryListPart.sqf @@ -0,0 +1,85 @@ +#define DEBUG_MODE_FULL +#include "..\script_component.hpp" +/* + * Author: Blue + * Updates injury list for given body part for the target. + * + * Arguments: + * 0: Injury list + * 1: Target + * 2: Body part, -1 to only show overall health info + * 3: Entries + * + * Return Value: + * None + * + * Example: + * [_ctrlInjuries, _target, 0] call kat_breathing_fnc_gui_updateInjuryListPart + * + * Public: No + */ + +params ["_ctrl", "_target", "_selectionN", "_entries"]; + +private _eviscEntry = []; +if (_selectionN isEqualTo 3) then { + if ((_target getVariable [QGVAR(evisceration), 0]) > 0) then { + _eviscEntry pushBack [LLSTRING(Evisceration), [1,0.95,0,1]]; + }; + + if (_target getVariable [QGVAR(activeWoundPack), 0] == 1) then { + _eviscEntry pushBack [LLSTRING(WoundPackApplied), [1,0.95,0,1]]; + }; + + if (_target getVariable [QGVAR(activeWoundPack), 0] == 2) then { + _eviscEntry pushBack [LLSTRING(WoundVacApplied), [1,0.95,0,1]]; + }; +}; + +_target setVariable [QGVAR(gui_updateInjuryList_eviscEntries), _eviscEntry]; + +private _jointArray = GET_JOINTS(_target); +_hasInjury = false; +switch (_selectionN) do { + case 4: { + private _arr = _jointArray select 0; + _hasInjury = ((_arr select 0) > 0) || ((_arr select 1) > 0); + }; + case 5: { + private _arr = _jointArray select 0; + _hasInjury = ((_arr select 1) > 0) || ((_arr select 2) > 0); + }; + case 6: { + private _arr = _jointArray select 1; + _hasInjury = ((_arr select 0) > 0) || ((_arr select 1) > 0); + }; + case 7: { + private _arr = _jointArray select 1; + _hasInjury = ((_arr select 1) > 0) || ((_arr select 2) > 0); + }; + case 8: { + private _arr = _jointArray select 2; + _hasInjury = ((_arr select 0) > 0) || ((_arr select 1) > 0); + }; + case 9: { + private _arr = _jointArray select 2; + _hasInjury = ((_arr select 1) > 0) || ((_arr select 2) > 0); + }; + case 10: { + private _arr = _jointArray select 3; + _hasInjury = ((_arr select 0) > 0) || ((_arr select 1) > 0); + }; + case 11: { + private _arr = _jointArray select 3; + _hasInjury = ((_arr select 1) > 0) || ((_arr select 2) > 0); + }; + default {}; +}; +private _pressureArray = GET_APPLIEDPRESSURE(_target); +if ((_pressureArray select _selectionN) > 0) then { + _entries pushBack [LLSTRING(pressure_GUI), [0.1, 1, 1, 1]]; +}; + +if (_hasInjury) then { + _entries pushBack [LLSTRING(jointInjuryGUI), [1, 0, 0, 1]]; +}; diff --git a/addons/hitpoints/functions/fnc_gui_updateInjuryListWounds.sqf b/addons/hitpoints/functions/fnc_gui_updateInjuryListWounds.sqf new file mode 100644 index 000000000..117bd362a --- /dev/null +++ b/addons/hitpoints/functions/fnc_gui_updateInjuryListWounds.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Updates injury list for given body part for the target. + * + * Arguments: + * 0: Injury list + * 1: Target + * 2: Body part, -1 to only show overall health info + * 3: Entries + * + * Return Value: + * None + * + * Example: + * [_ctrlInjuries, _target, 0] call kat_hitpoints_fnc_gui_updateInjuryListWounds + * + * Public: No + */ + +params ["_ctrl", "_target", "_selectionN", "_woundEntries"]; + +// Collected in gui_updateInjuryListPart +private _eviscEntries = _target getVariable [QGVAR(gui_updateInjuryList_eviscEntries), []]; + +if (_eviscEntries isEqualTo _woundEntries) exitWith {}; + +_woundEntries append _eviscEntries; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_handleDamage.sqf b/addons/hitpoints/functions/fnc_handleDamage.sqf new file mode 100644 index 000000000..31628af17 --- /dev/null +++ b/addons/hitpoints/functions/fnc_handleDamage.sqf @@ -0,0 +1,275 @@ +#include "..\script_component.hpp" +/* + * Author: commy2, kymckay, LinkIsGrim + * HandleDamage EH where wound events are raised based on incoming damage. + * Be aware that for each source of damage, the EH can fire multiple times (once for each hitpoint). + * We store these incoming damages and compare them on last iteration of the event (_context == 2). + * + * Arguments: + * Handle damage EH + * + * Return Value: + * Damage to be inflicted + * + * Public: No + */ + +#define INSTAKILL_ALLOWED(unit) (unit isNotEqualTo (unit getVariable [QGVAR(blockInstaKill), objNull])) + +params ["_unit", "_selection", "_damage", "_shooter", "_ammo", "_hitPointIndex", "_instigator", "_hitpoint", "_directHit", "_context"]; + +// HD sometimes triggers for remote units - ignore. +if !(local _unit) exitWith {nil}; + +// Get missing meta info +private _oldDamage = 0; +private _structuralDamage = _context == 0; + +if (_structuralDamage) then { + _hitpoint = "#structural"; + _oldDamage = damage _unit; +} else { + _oldDamage = _unit getHitIndex _hitPointIndex; +}; +// Damage can be disabled with old variable or via sqf command allowDamage +if !(isDamageAllowed _unit && {_unit getVariable [QACEGVAR(medical,allowDamage), true]}) exitWith {_oldDamage}; + +// Killing units via End key is an edge case (#10375) +// This didn't matter pre-Arma 3 2.18 but now this goes through the event handler +// TODO: Structural fire damage >= 1 in a single damage event could still be caught here and we don't want that, but we haven't found a better way to catch this, fire damage should be small most of the time anyway +// Also triggers for catastrophic vehicle explosions which would kill crew outright, check for blocking +private _newDamage = _damage - _oldDamage; +if (_structuralDamage && {(abs (_newDamage - 1)) < 0.001 && _ammo == "" && isNull _shooter && isNull _instigator} && {INSTAKILL_ALLOWED(_unit)}) exitWith { + TRACE_1("unit killed by curator or engine",_unit); + + _damage +}; + +// _newDamage == 0 happens occasionally for vehiclehit events (see line 80 onwards), just exit early to save some frametime +// context 4 is engine "bleeding". For us, it's just a duplicate event for #structural which we can ignore without any issues +// Leverage this to block insta-kills on the same frame (see above) +if (_context != 2 && {_context == 4 || _newDamage == 0}) exitWith { + TRACE_4("Skipping engine bleeding or zero damage, blocking insta kills until next frame",_ammo,_newDamage,_directHit,_context); + + if (INSTAKILL_ALLOWED(_unit)) then { + _unit setVariable [QACEGVAR(medical_engine,blockInstaKill), _unit]; + [{_this setVariable [QACEGVAR(medical_engine,blockInstaKill), nil]}, _unit] call CBA_fnc_execNextFrame; + }; + + _oldDamage +}; + +// Get scaled armor value of hitpoint and calculate damage before armor +// We scale using passThrough to handle explosive-resistant armor properly (#9063) +// We need realDamage to determine which limb was hit correctly +private _armor = [_unit, _hitpoint] call FUNC(getHitpointArmor); +private _realDamage = _newDamage * _armor; +TRACE_7("Received hit",_hitpoint,_ammo,_armor,_newDamage,_realDamage,_directHit,_context); + +// Drowning doesn't fire the EH for each hitpoint and never triggers _context=2 (LastHitPoint) +// Damage occurs in consistent increments +if ( + _structuralDamage && + {getOxygenRemaining _unit <= 0.5} && + {_damage isEqualTo (_oldDamage + 0.005)} +) exitWith { + TRACE_5("Drowning",_unit,_shooter,_instigator,_damage,_newDamage); + [QACEGVAR(medical,woundReceived), [_unit, [[_newDamage, "Body", _newDamage]], _unit, "drowning"]] call CBA_fnc_localEvent; + + 0 +}; + +// Faster than (vehicle _unit), also handles dead units +private _vehicle = objectParent _unit; +private _inVehicle = !isNull _vehicle; +private _environmentDamage = _ammo == ""; + +// Crashing a vehicle doesn't fire the EH for each hitpoint and never triggers _context=2 (LastHitPoint) +// It does fire the EH multiple times, but this seems to scale with the intensity of the crash +if ( + ACEGVAR(medical,enableVehicleCrashes) && + {_environmentDamage && _inVehicle && _structuralDamage} && + {vectorMagnitude (velocity _vehicle) > 5} + // todo: no way to detect if stationary and another vehicle hits you +) exitWith { + TRACE_5("Crash",_unit,_shooter,_instigator,_damage,_newDamage); + [QACEGVAR(medical,woundReceived), [_unit, [[_newDamage, _hitpoint, _newDamage]], _unit, "vehiclecrash"]] call CBA_fnc_localEvent; + + 0 +}; + +// Receiving explosive damage inside a vehicle doesn't trigger for each hitpoint +// This is the case for mines, explosives, artillery, and catasthrophic vehicle explosions +if ( + (!_environmentDamage && _inVehicle && _structuralDamage) && + { + private _ammoCfg = configFile >> "CfgAmmo" >> _ammo; + GET_NUMBER(_ammoCfg >> "explosive",0) > 0 || + {GET_NUMBER(_ammoCfg >> "indirectHit",0) > 0} || + (_newDamage > 0.25 && !(_ammo isKindOf "BulletBase")) + } +) exitWith { + private _newDamage = _newDamage * 3; + TRACE_5("Vehicle hit",_unit,_shooter,_instigator,_damage,_newDamage); + + _unit setVariable [QACEGVAR(medical,lastDamageSource), _shooter]; + _unit setVariable [QACEGVAR(medical,lastInstigator), _instigator]; + + [QACEGVAR(medical,woundReceived), [_unit, [[_newDamage, _hitpoint, _newDamage]], _shooter, "vehiclehit"]] call CBA_fnc_localEvent; + + 0 +}; + +// Damages are stored for last iteration of the HandleDamage event (_context == 2) +_unit setVariable [format [QACEGVAR(medical_engine,$%1), _hitpoint], [_realDamage, _newDamage]]; + +// Ref https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage +// Context 2 means this is the last iteration of HandleDamage, so figure out which hitpoint took the most real damage and send wound event +// Don't exit, as the last iteration can be one of the hitpoints that we need to keep _oldDamage for +if (_context == 2) then { + _unit setVariable [QACEGVAR(medical,lastDamageSource), _shooter]; + _unit setVariable [QACEGVAR(medical,lastInstigator), _instigator]; + + private _damageStructural = _unit getVariable [QACEGVAR(medical_engine,$#structural), [0,0]]; + + // --- Head + private _damageHead = [ + _unit getVariable [QACEGVAR(medical_engine,$HitFace), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitHead), [0,0]] + ]; + _damageHead sort false; + _damageHead = _damageHead select 0; + + // --- Neck + private _damageNeck = _unit getVariable [QACEGVAR(medical_engine,$HitNeck), [0,0]]; + + // --- Body + private _damageBody = [ + _unit getVariable [QACEGVAR(medical_engine,$HitPelvis), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitAbdomen), [0,0]] + ]; + _damageBody sort false; + _damageBody = _damageBody select 0; + + private _damageChest = [ + _unit getVariable [QACEGVAR(medical_engine,$HitDiaphragm), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitChest), [0,0]] + ]; + _damageChest sort false; + _damageChest = _damageChest select 0; + + // --- Arms and Legs + private _damageLeftArm = _unit getVariable [QACEGVAR(medical_engine,$HitLeftArm), [0,0]]; + + private _damageRightArm = _unit getVariable [QACEGVAR(medical_engine,$HitRightArm), [0,0]]; + + private _damageLeftLeg = [ + _unit getVariable [QACEGVAR(medical_engine,$HitLeftLeg), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitLeftLegRoll), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitLeftFoot), [0,0]] + ]; + + _damageLeftLeg sort false; + _damageLeftLeg = _damageLeftLeg select 0; + + private _damageRightLeg = [ + _unit getVariable [QACEGVAR(medical_engine,$HitRightLeg), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitRightLegRoll), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitRightFoot), [0,0]] + ]; + _damageRightLeg sort false; + _damageRightLeg = _damageRightLeg select 0; + + private _damageUpperLeftArm = [ + _unit getVariable [QACEGVAR(medical_engine,$HitUpperLeftArm), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitUpperRollLeftArm), [0,0]] + ]; + _damageUpperLeftArm sort false; + _damageUpperLeftArm = _damageUpperLeftArm select 0; + + private _damageUpperRightArm = [ + _unit getVariable [QACEGVAR(medical_engine,$HitUpperRightArm), [0,0]], + _unit getVariable [QACEGVAR(medical_engine,$HitUpperRollRightArm), [0,0]] + ]; + _damageUpperRightArm sort false; + _damageUpperRightArm = _damageUpperRightArm select 0; + + private _damageUpperLeftLeg = _unit getVariable [QACEGVAR(medical_engine,$HitUpperLeftLeg), [0,0]]; + + private _damageUpperRightLeg = _unit getVariable [QACEGVAR(medical_engine,$HitUpperRightLeg), [0,0]]; + + // Find hit point that received the maximum damage + // Priority used for sorting if incoming damage is equal + // _realDamage, priority, _newDamage, body part name + private _allDamages = [ + [_damageHead select 0, PRIORITY_HEAD, _damageHead select 1, "Head"], + [_damageNeck select 0, PRIORITY_NECK, _damageNeck select 1, "Neck"], + [_damageChest select 0, PRIORITY_CHEST, _damageChest select 1, "Chest"], + [_damageBody select 0, PRIORITY_BODY, _damageBody select 1, "Body"], + [_damageLeftArm select 0, PRIORITY_LEFT_ARM, _damageLeftArm select 1, "LeftArm"], + [_damageRightArm select 0, PRIORITY_RIGHT_ARM, _damageRightArm select 1, "RightArm"], + [_damageUpperLeftArm select 0, PRIORITY_UPPER_LEFT_ARM, _damageUpperLeftArm select 1, "UpperLeftArm"], + [_damageUpperRightArm select 0, PRIORITY_UPPER_RIGHT_ARM, _damageUpperRightArm select 1, "UpperRightArm"], + [_damageLeftLeg select 0, PRIORITY_LEFT_LEG, _damageLeftLeg select 1, "LeftLeg"], + [_damageRightLeg select 0, PRIORITY_RIGHT_LEG, _damageRightLeg select 1, "RightLeg"], + [_damageUpperLeftLeg select 0, PRIORITY_UPPER_LEFT_LEG, _damageUpperLeftLeg select 1, "UpperLeftLeg"], + [_damageUpperRightLeg select 0, PRIORITY_UPPER_RIGHT_LEG, _damageUpperRightLeg select 1, "UpperRightLeg"], + [_damageStructural select 0, 1, _damageStructural select 1, "#structural"] + ]; + TRACE_2("incoming",_allDamages,_damageStructural); + + _allDamages sort false; + _allDamages = _allDamages apply {[_x select 2, _x select 3, _x select 0]}; + + // Environmental damage sources all have empty ammo string + // No explicit source given, we infer from differences between them + if (_environmentDamage) then { + // Any collision with terrain/vehicle/object has a shooter + // Check this first because burning can happen at any velocity + if (isNull _shooter) then { + // Anything else is almost guaranteed to be fire damage + _ammo = "fire"; + TRACE_5("Fire Damage",_unit,_shooter,_instigator,_damage,_allDamages); + } else { + /* + If shooter != unit then they hit unit, otherwise it could be: + - Unit hitting anything at speed + - An empty vehicle hitting unit + - A physX object hitting unit + Assume fall damage for downward velocity because it's most common + */ + if (_shooter == _unit && {(velocity _unit select 2) < -2}) then { + _ammo = "falling"; + TRACE_5("Fall",_unit,_shooter,_instigator,_damage,_allDamages); + } else { + _ammo = "collision"; + TRACE_5("Collision",_unit,_shooter,_instigator,_damage,_allDamages); + }; + }; + }; + + // No wounds for minor damage + // TODO check if this needs to be changed for burning damage (occurs as lots of small events that we add together) + if ((_allDamages select 0 select 0) > 1E-3) then { + TRACE_1("received",_allDamages); + [QACEGVAR(medical,woundReceived), [_unit, _allDamages, _shooter, _ammo]] call CBA_fnc_localEvent; + }; + + // Clear stored damages otherwise they will influence future damage events + // (aka wounds will pile onto the historically most damaged hitpoint) + { + _unit setVariable [_x, nil]; + } forEach [ + QACEGVAR(medical_engine,$HitFace),QACEGVAR(medical_engine,$HitNeck),QACEGVAR(medical_engine,$HitHead), + QACEGVAR(medical_engine,$HitPelvis),QACEGVAR(medical_engine,$HitAbdomen),QACEGVAR(medical_engine,$HitDiaphragm),QACEGVAR(medical_engine,$HitChest),QACEGVAR(medical_engine,$HitBody), + QACEGVAR(medical_engine,$HitLeftArm),QACEGVAR(medical_engine,$HitRightArm),QACEGVAR(medical_engine,$HitLeftLeg),QACEGVAR(medical_engine,$HitRightLeg),QACEGVAR(medical_engine,$HitUpperLeftArm), + QACEGVAR(medical_engine,$HitUpperRightArm),QACEGVAR(medical_engine,$HitUpperRollLeftArm),QACEGVAR(medical_engine,$HitUpperRollRightArm),QACEGVAR(medical_engine,$HitUpperLeftLeg),QACEGVAR(medical_engine,$HitUpperRightLeg), + QACEGVAR(medical_engine,$HitLeftLegRoll),QACEGVAR(medical_engine,$HitRightLegRoll),QACEGVAR(medical_engine,$HitLeftFoot),QACEGVAR(medical_engine,$HitRightFoot), + QACEGVAR(medical_engine,$#structural) + ]; +}; + +// Engine damage to these hitpoints controls blood visuals, limping, weapon sway +// Handled in fnc_damageBodyPart, persist here +// For all other hitpoints, we store our own damage values, so engine damage is unnecessary +[0, _oldDamage] select (_hitpoint in ["hithead", "hitbody", "hithands", "hitlegs"]) diff --git a/addons/hitpoints/functions/fnc_handleIncapacitation.sqf b/addons/hitpoints/functions/fnc_handleIncapacitation.sqf new file mode 100644 index 000000000..bd0857cd7 --- /dev/null +++ b/addons/hitpoints/functions/fnc_handleIncapacitation.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: Ruthberg + * Handle incapacitation due to damage and pain + * + * Arguments: + * 0: The Unit + * + * ReturnValue: + * None + * + * Example: + * [player] call ace_medical_damage_fnc_handleIncapacitation + * + * Public: No + */ + +params ["_unit"]; + +private _painLevel = GET_PAIN_PERCEIVED(_unit); +private _bodyPartDamage = GET_BODYPART_DAMAGE(_unit); + +_bodyPartDamage params ["_headDamage", "_neckDamage", "_chestDamage","_bodyDamage"]; + +// Exclude non penetrating body damage +{ + _x params ["", "_amountOf", "", "_damage"]; + if (_damage < PENETRATION_THRESHOLD) then { + _bodyDamage = _bodyDamage - (_amountOf * _damage); + }; +} forEach (GET_OPEN_WOUNDS(_unit) getOrDefault ["body", []]); + +private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit); + +if ((_headDamage > _damageThreshold / 2) || (_neckDamage > _damageThreshold / 2) || (_chestDamage > _damageThreshold) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < EGVAR(medical,painUnconsciousChance)}}) then { + [QACEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent; +}; diff --git a/addons/chemical/functions/fnc_handleRespawn.sqf b/addons/hitpoints/functions/fnc_handleRespawn.sqf similarity index 54% rename from addons/chemical/functions/fnc_handleRespawn.sqf rename to addons/hitpoints/functions/fnc_handleRespawn.sqf index 2f60a8c9b..2045b6233 100644 --- a/addons/chemical/functions/fnc_handleRespawn.sqf +++ b/addons/hitpoints/functions/fnc_handleRespawn.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: YetheSamartaka, Brett Mayson + * Author: YetheSamartaka * Ensures proper initial values reset on respawn * * Arguments: @@ -11,7 +11,7 @@ * None * * Example: - * [alive, body] call kat_chemical_fnc_handleRespawn; + * [alive, body] call kat_misc_fnc_handleRespawn; * * Public: No */ @@ -19,10 +19,5 @@ params ["_unit","_dead"]; TRACE_2("handleRespawn",_unit,_dead); -if (!local _unit) exitWith {}; +[_unit] call FUNC(fullHealMod); -params ["_unit"]; - -[_unit] call FUNC(fullHealLocal); - -_unit setVariable [QGVAR(detectorSound), false, true]; diff --git a/addons/hitpoints/functions/fnc_hasRemovableBandage.sqf b/addons/hitpoints/functions/fnc_hasRemovableBandage.sqf new file mode 100644 index 000000000..f0617974d --- /dev/null +++ b/addons/hitpoints/functions/fnc_hasRemovableBandage.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Checks if the unit has a tourniquet applied on the specified body part. + * + * Arguments: + * 0: Unit + * 1: Body Part + * 2: Type + * Return Value: + * Bool + * + * Example: + * [player, "leftleg"] call ace_medical_treatment_fnc_hasRemovableBandage + * + * Public: No + */ + +params ["_unit", "_bodyPart", "_bandageType"]; +private _bandagedWounds = GET_BANDAGED_WOUNDS(_unit); +private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []]; + +private _hasRemovableBandage = false; + +{ + private _candidate = _x; + _candidate params ["_id", "_amount", "_bleedRate", "", "_type"]; + + if (_type ==_bandageType) exitWith { + _hasRemovableBandage = true; + }; + } forEach _bandagedWoundsOnPart; +TRACE_1("HasBandag",_hasRemovableBandage); +_hasRemovableBandage \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/hitpoints/functions/fnc_hasTourniquetAppliedTo.sqf new file mode 100644 index 000000000..dde7115c7 --- /dev/null +++ b/addons/hitpoints/functions/fnc_hasTourniquetAppliedTo.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Checks if the unit has a tourniquet applied on the specified body part. + * + * Arguments: + * 0: Unit + * 1: Body Part + * + * Return Value: + * Has Tourniquet Been Applied + * + * Example: + * [player, "leftleg"] call ace_medical_treatment_fnc_hasTourniquetAppliedTo + * + * Public: No + */ + +params ["_unit", "_bodyPart"]; + +private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +_index >= 0 && {HAS_TOURNIQUET_APPLIED_ON(_unit,_index)} \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_iceJoint.sqf b/addons/hitpoints/functions/fnc_iceJoint.sqf new file mode 100644 index 000000000..9b90d175b --- /dev/null +++ b/addons/hitpoints/functions/fnc_iceJoint.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(iceJoint), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_iceJointLocal.sqf b/addons/hitpoints/functions/fnc_iceJointLocal.sqf new file mode 100644 index 000000000..4245e98e7 --- /dev/null +++ b/addons/hitpoints/functions/fnc_iceJointLocal.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Callback to wrap a splint on a bodypart + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + + * Return Value: + * None + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_wrapSplint + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; +if (_jointGroupIndex == -1) exitWith {}; +private _limbJointStatus = _jointArray select _jointGroupIndex; +private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] +} else { + [1, 2] +}; +{ + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury in [1, 2]) exitWith { + _limbJointStatus set [_x, _jointInjury + 3]; + [_patient] call EFUNC(misc,updateDamageEffects); + private _delay = (random [120, 200, 240]) * _jointInjury; + [{ + params ["_x", "_patient", "_jointInjury", "_limbJointStatus"]; + _limbJointStatus set [_x, _jointInjury + 6]; + [_patient] call EFUNC(misc,updateDamageEffects); + }, [_x, _patient, _jointInjury, _limbJointStatus], _delay] call CBA_fnc_waitAndExecute; + }; +} forEach _selectedJointIndexes; + + diff --git a/addons/hitpoints/functions/fnc_init.sqf b/addons/hitpoints/functions/fnc_init.sqf new file mode 100644 index 000000000..9041ef716 --- /dev/null +++ b/addons/hitpoints/functions/fnc_init.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Initializes unit variables. + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_airway_fnc_init; + * + * Public: No + */ + +params ["_unit", ["_isRespawn", true]]; + +// init variables +[_unit] call FUNC(fullHealMod); + diff --git a/addons/hitpoints/functions/fnc_initUnit.sqf b/addons/hitpoints/functions/fnc_initUnit.sqf new file mode 100644 index 000000000..842fa8e97 --- /dev/null +++ b/addons/hitpoints/functions/fnc_initUnit.sqf @@ -0,0 +1,54 @@ +#include "..\script_component.hpp" +/* + * Author: KoffeinFlummi, commy2 + * Initializes unit variables. + * + * Arguments: + * 0: The Unit + * 1: Is Respawned + * + * Return Value: + * None + * + * Example: + * [bob, false] call ace_medical_status_fnc_initUnit + * + * Public: No + */ + +params ["_unit", ["_isRespawn", true]]; +TRACE_2("initUnit",_unit,_isRespawn); + +if (!_isRespawn) then { // Always add respawn EH (same as CBA's onRespawn=1) + _unit addEventHandler ["Respawn", {[(_this select 0), true] call FUNC(initUnit)}]; +}; + +if (!local _unit) exitWith {}; + +if (damage _unit > 0) then { + _unit setDamage 0; +}; + +if (_isRespawn) then { + TRACE_1("reseting all vars on respawn",_isRespawn); // note: state is handled by ace_medical_statemachine_fnc_resetStateDefault + _unit call FUNC(fullHealLocal); + _unit setVariable [VAR_UNCON, false, true]; + + // Triage card and logs + _unit setVariable [QACEGVAR(medical,triageLevel), 0, true]; + _unit setVariable [QACEGVAR(medical,triageCard), [], true]; + + // Unconscious spontanious wake up chance + _unit setVariable [QACEGVAR(medical,lastWakeUpCheck), nil, true]; + + // Cause of death + _unit setVariable [QACEGVAR(medical,causeOfDeath), nil, true]; +}; + +[{ + params ["_unit"]; + TRACE_3("Unit Init",_unit,local _unit,typeOf _unit); + + _unit setVariable [QACEGVAR(medical,initialized), true, true]; + [QACEGVAR(medical_status,initialized), [_unit]] call CBA_fnc_localEvent; +}, [_unit], 0.5] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_internalBleedingRate.sqf b/addons/hitpoints/functions/fnc_internalBleedingRate.sqf new file mode 100644 index 000000000..46551a02a --- /dev/null +++ b/addons/hitpoints/functions/fnc_internalBleedingRate.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Gets Bleeding Rate of internal bleeding on a bodypart + * + * Arguments: + * 0: Unit + * 1: Body part + * + * Return Value: + * Amount of bleeding per second + * + * + * Public: No + */ + +params ["_unit", "_selectionN"]; +private _wounds = GET_OPEN_WOUNDS(_unit); +private _bodyPart = ALL_BODY_PARTS select _selectionN; +private _partWounds = _wounds getOrDefault [_bodyPart, []]; +private _internalBleedAmount = 0; + +{ + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + TRACE_1("checkLimb4",_className); + if (_className isEqualTo "InternalBleeding") then { + _internalBleedAmount = _internalBleedAmount + (_bleeding * _amountOf); + }; +} forEach _partWounds; + +_internalBleedAmount diff --git a/addons/hitpoints/functions/fnc_ivBagLocal.sqf b/addons/hitpoints/functions/fnc_ivBagLocal.sqf new file mode 100644 index 000000000..98858e037 --- /dev/null +++ b/addons/hitpoints/functions/fnc_ivBagLocal.sqf @@ -0,0 +1,55 @@ +#define DEBUG_MODE_FULL +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001, Cplhardcore + * Local callback for administering an IV bag to a patient. + * + * Arguments: + * 0: Patient + * 1: Body Part + * 2: Treatment + * 3: Medic + * 4: Item User + * 5: Used item + * + * Return Value: + * None + * + * Example: + * [player, "RightArm", "BloodIV", player, player, "ACE_BloodIV"] call ace_medical_treatment_fnc_ivBagLocal + * + * Public: No + */ + +params ["_patient", "_bodyPart", "_treatment", "_medic", "_itemUser", "_item"]; + +// Exit if patient has max blood volume +private _bloodVolume = GET_BLOOD_VOLUME_LITERS(_patient); +if (_bloodVolume >= 7.5) exitWith { + // Return the bag if patient is topped up on blood + if (_medic call ACEFUNC(common,isPlayer) || {missionNamespace getVariable [QACEGVAR(medical_ai,requireItems), 0] > 0}) then { + [_itemUser, _item] call ACEFUNC(common,addToInventory); + }; +}; + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +// Get attributes for the used IV +private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "IV"; +private _ivConfig = _defaultConfig >> _treatment; + +private _volume = GET_NUMBER(_ivConfig >> "volume",getNumber (_defaultConfig >> "volume")); +private _type = GET_STRING(_ivConfig >> "type",getText (_defaultConfig >> "type")); +private _rateCoef = GET_NUMBER(_ivConfig >> "rateCoef",getNumber (_defaultConfig >> "rateCoef")); +private _platelets = GET_NUMBER(_ivConfig >> "platelets",getNumber (_defaultConfig >> "platelets")); +private _ph = GET_NUMBER(_ivConfig >> "ph",getNumber (_defaultConfig >> "ph")); +private _ca = GET_NUMBER(_ivConfig >> "ca",getNumber (_defaultConfig >> "ca")); +private _uuid = (str CBA_missionTime + str random 1e6); // bag UID + +// Add IV bag to patient's ivBags array +TRACE_6("IVBAGLOCAL",_volume,_type,_partIndex,_treatment,_rateCoef,_item); +TRACE_4("IVBAGLOCAL1",_ca,_ph,_platelets,_uuid); +private _ivBags = _patient getVariable [QACEGVAR(medical,ivBags), []]; +_ivBags pushBack [_volume, _type, _partIndex, _treatment, _rateCoef, _item, _platelets, _ph, _ca, _uuid]; +TRACE_1("IVBAGLOCAL2",_ivBags); +_patient setVariable [QACEGVAR(medical,ivBags), _ivBags, true]; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_manualPressure.sqf b/addons/hitpoints/functions/fnc_manualPressure.sqf new file mode 100644 index 000000000..afcbf6299 --- /dev/null +++ b/addons/hitpoints/functions/fnc_manualPressure.sqf @@ -0,0 +1,77 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam (Adjusted by ChatGPT) + * Apply manual pressure for airway management. + * If medic already has pressure active (on self or another), it is removed first. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Successful treatment + * + * Example: + * [player, cursorTarget, "head"] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _manualPressure = GET_APPLIEDPRESSURE(_patient); + +private _oldPartArray = _medic getVariable [QGVAR(pressureApplied), [-1, objNull]]; +private _oldPartIndex = _oldPartArray select 0; +private _oldPatient = _oldPartArray select 1; + +if (_oldPartIndex != -1 && {!isNull _oldPatient}) then { + private _pressureArray = GET_APPLIEDPRESSURE(_oldPatient); + if ((_pressureArray select _oldPartIndex) != 0) then { + _pressureArray set [_oldPartIndex, 0]; + _oldPatient setVariable [VAR_APPLIEDPRESSURE, _pressureArray, true]; + }; + _medic setVariable [QGVAR(pressureApplied), [-1, objNull], true]; + [LLSTRING(Pressure_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}; + +// --- Prevent applying to a part that already has pressure +if ((_manualPressure select _partIndex) > 0) exitWith { + [LLSTRING(Pressure_already), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}; + +// --- Apply new pressure +_manualPressure set [_partIndex, ((_manualPressure select _partIndex) + selectRandom [0.6, 0.7, 0.8])]; +_patient setVariable [VAR_APPLIEDPRESSURE, _manualPressure, true]; +_medic setVariable [QGVAR(pressureApplied), [_partIndex, _patient], true]; + +[LLSTRING(Pressure_Ready), 1.5, _medic, 11] call ACEFUNC(common,displayTextStructured); + +// --- Wait until pressure is broken (distance > 5m, timeout, or cancel) +[{ + params ["_medic", "_patient"]; + private _pressureData = _medic getVariable [QGVAR(pressureApplied), [-1, objNull]]; + private _hasPressure = ((_pressureData select 0) != -1); + ((_patient distance2D _medic) > 5) || {!_hasPressure}; +}, { + params ["_medic", "_patient", "_partIndex"]; + private _manualPressure = GET_APPLIEDPRESSURE(_patient); + if ((_manualPressure select _partIndex) != 0) then { + _manualPressure set [_partIndex, 0]; + }; + _patient setVariable [VAR_APPLIEDPRESSURE, _manualPressure, true]; + _medic setVariable [QGVAR(pressureApplied), [-1, objNull], true]; + [LLSTRING(Pressure_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}, [_medic, _patient, _partIndex], 3600, { + params ["_medic", "_patient", "_partIndex"]; + private _manualPressure = GET_APPLIEDPRESSURE(_patient); + if ((_manualPressure select _partIndex) != 0) then { + _manualPressure set [_partIndex, 0]; + }; + _patient setVariable [VAR_APPLIEDPRESSURE, _manualPressure, true]; + _medic setVariable [QGVAR(pressureApplied), [-1, objNull], true]; + [LLSTRING(Pressure_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}] call CBA_fnc_waitUntilAndExecute; + diff --git a/addons/hitpoints/functions/fnc_manualPressureStop.sqf b/addons/hitpoints/functions/fnc_manualPressureStop.sqf new file mode 100644 index 000000000..77b1b014e --- /dev/null +++ b/addons/hitpoints/functions/fnc_manualPressureStop.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +_medic setVariable [QGVAR(pressureApplied), [-1, objNull], true]; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_manualPressureStopCondition.sqf b/addons/hitpoints/functions/fnc_manualPressureStopCondition.sqf new file mode 100644 index 000000000..edf5848f2 --- /dev/null +++ b/addons/hitpoints/functions/fnc_manualPressureStopCondition.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _canStop = false; +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _oldPartArray = _medic getVariable [QGVAR(pressureApplied), [-1, objNull]]; +private _oldPartIndex = _oldPartArray select 0; +private _oldPartUnit = _oldPartArray select 1; +if ((_oldPartIndex != -1) && (_oldPartIndex == _partIndex) && (!(GVAR(hardcorePressure))) && (_patient == _oldPartUnit)) then { + _canStop = true; +}; + +_canStop \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_onKeyDown.sqf b/addons/hitpoints/functions/fnc_onKeyDown.sqf new file mode 100644 index 000000000..e4841b1ac --- /dev/null +++ b/addons/hitpoints/functions/fnc_onKeyDown.sqf @@ -0,0 +1,118 @@ +#include "..\script_component.hpp" +#include "\a3\ui_f\hpp\defineDIKCodes.inc" +/* + * Author: AmsteadRayle + * Handles keyboard inputs in medical menu. + * + * Arguments: + * 1: Args + * - 0: Menu display + * - 1: Key being pressed + * - 2: Shift state + * - 3: Ctrl state + * - 4: Alt state + * + * Return Value: + * None + * + * Example: + * ["", [displayNull, 5, false, false, false]] call ace_medical_gui_fnc_onKeyDown + * + * Public: No +*/ +// TODO: Is the airway category ever visible? Can the dynamic category stuff be removed? + +#define NUMBER_KEYS [DIK_1, DIK_2, DIK_3, DIK_4, DIK_5, DIK_6, DIK_7, DIK_8, DIK_9, DIK_0] +#define ALL_CATEGORIES ["triage", "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"] + +params ["", "_args"]; +_args params ["_display", "_keyPressed", "_shiftState", "_ctrlState", "_altState"]; + +private _return = true; // Override existing keybinds for keys used here + +private _visibleCategories = [ + "bandage","medication","airway","advanced","drag" +] select { + private _category = _x; + (ACEGVAR(medical_gui,actions) findIf {_category == _x select 1}) > -1 +}; + +private _allCategories = ["triage", "examine"] + _visibleCategories + ["toggle"]; + +// Use hashmap as a shortcut to "zip" two arrays together +// Use categories as keys in hashmap because there are fewer, +// otherwise the hashmap is padded with nil +private _keyCategoryPairs = _allCategories createHashMapFromArray NUMBER_KEYS; + +private _temp_category = ""; +private _temp_idc = 0; + +switch (true) do { +// Dynamically assign number keys to visible categories + { + _temp_category = _x; // _x does not exist inside case code + _temp_idc = IDC_TRIAGE + (ALL_CATEGORIES find _temp_category) * 10; + case (_keyPressed == _y && {ACEGVAR(medical_gui,selectedCategory) != _temp_category}): { + if (ctrlEnabled _temp_idc) then { + if (_temp_category == "toggle") then { + call ACEFUNC(medical_gui,handleToggle); + } else { + ACEGVAR(medical_gui,selectedCategory) = _temp_category; + }; + } else { + _return = false; + }; + }; + } forEach _keyCategoryPairs; + +// Select body part through similar keyboard layout: +// w +// a s d +// z x + case (_keyPressed == DIK_W && {ACEGVAR(medical_gui,selectedBodyPart) != 0}): { + ACEGVAR(medical_gui,selectedBodyPart) = 0; + }; + case (_keyPressed == DIK_W && {ACEGVAR(medical_gui,selectedBodyPart) != 1}): { + ACEGVAR(medical_gui,selectedBodyPart) = 1; + }; + case (_keyPressed == DIK_S && {ACEGVAR(medical_gui,selectedBodyPart != 2)}): { + ACEGVAR(medical_gui,selectedBodyPart) = 2; + }; + case (_keyPressed == DIK_S && {ACEGVAR(medical_gui,selectedBodyPart != 3)}): { + ACEGVAR(medical_gui,selectedBodyPart) = 3; + }; + case (_keyPressed == DIK_D && {ACEGVAR(medical_gui,selectedBodyPart) != 4}): { + ACEGVAR(medical_gui,selectedBodyPart) = 4; + }; + case (_keyPressed == DIK_D && {ACEGVAR(medical_gui,selectedBodyPart) != 5}): { + ACEGVAR(medical_gui,selectedBodyPart) = 5; + }; + case (_keyPressed == DIK_A && {ACEGVAR(medical_gui,selectedBodyPart) != 6}): { + ACEGVAR(medical_gui,selectedBodyPart) = 6; + }; + case (_keyPressed == DIK_A && {ACEGVAR(medical_gui,selectedBodyPart) != 7}): { + ACEGVAR(medical_gui,selectedBodyPart) = 7; + }; + case (_keyPressed == DIK_X && {ACEGVAR(medical_gui,selectedBodyPart) != 8}): { + ACEGVAR(medical_gui,selectedBodyPart) = 8; + }; + case (_keyPressed == DIK_X && {ACEGVAR(medical_gui,selectedBodyPart) != 9}): { + ACEGVAR(medical_gui,selectedBodyPart) = 9; + }; + case (_keyPressed == DIK_Z && {ACEGVAR(medical_gui,selectedBodyPart) != 10}): { + ACEGVAR(medical_gui,selectedBodyPart) = 10; + }; + case (_keyPressed == DIK_Z && {ACEGVAR(medical_gui,selectedBodyPart) != 11}): { + ACEGVAR(medical_gui,selectedBodyPart) = 11; + }; + + default { + _return = false; // Do not override existing keybinds for keys not used here + }; +}; + +if (_return) then { + playSound ["SoundClick", true] +}; + +_return diff --git a/addons/hitpoints/functions/fnc_partBleedingRate.sqf b/addons/hitpoints/functions/fnc_partBleedingRate.sqf new file mode 100644 index 000000000..86a185c82 --- /dev/null +++ b/addons/hitpoints/functions/fnc_partBleedingRate.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Gets Bleeding Rate of internal bleeding on a bodypart + * + * Arguments: + * 0: Unit + * 1: Body part + * + * Return Value: + * Amount of bleeding per second + * + * + * Public: No + */ + +params ["_unit", "_selectionN"]; +private _wounds = GET_OPEN_WOUNDS(_unit); +private _bodyPart = ALL_BODY_PARTS select _selectionN; +private _partWounds = _wounds getOrDefault [_bodyPart, []]; +private _partBleedAmount = 0; + +{ + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + _partBleedAmount = _partBleedAmount + (_bleeding * _amountOf); +} forEach _partWounds; + +_partBleedAmount diff --git a/addons/hitpoints/functions/fnc_pressureStart.sqf b/addons/hitpoints/functions/fnc_pressureStart.sqf new file mode 100644 index 000000000..e8755a793 --- /dev/null +++ b/addons/hitpoints/functions/fnc_pressureStart.sqf @@ -0,0 +1,132 @@ +#include "..\script_component.hpp" +/* + * Author: Blue/ Modified for use by Cplhardcore + * Begin CPR + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Bodypart + * Return Value: + * None + * + * Example: + * [player, cursorObject, "leftleg"] call kat_hitpoints_fnc_PressureStart; + * + * Public: No + */ +params ["_medic", "_patient", "_bodypart"]; +TRACE_3("Pressure0",_medic,_patient,_bodypart); +_patient setVariable [QGVAR(applyingPressure), _medic, true]; +_medic setVariable [QGVAR(isApplyingPressure), true, true]; + +GVAR(PressureTarget) = _patient; +GVAR(PressureProvider) = _medic; + +GVAR(PressureCancel_EscapeID) = [0x01, [false, false, false], { + GVAR(PressureTarget) setVariable [QGVAR(applyingPressure), objNull, true]; +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + +GVAR(PressureCancel_MouseID) = [0xF0, [false, false, false], { + GVAR(PressureTarget) setVariable [QGVAR(applyingPressure), objNull, true]; +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + +ACEGVAR(medical_gui,pendingReopen) = false; // Prevent medical menu from reopening + +if (dialog) then { // If another dialog is open (medical menu) close it + closeDialog 0; +}; + +private _notInVehicle = isNull objectParent _medic; +loopPressure = false; + +if (_notInVehicle) then { + [_medic, "Acts_TreatingWounded_in", 1] call ACEFUNC(common,doAnimation); + loopPressure = true; +}; + +[{ + params ["_medic", "_notInVehicle"]; + if (_notInVehicle) then { + [_medic, "Acts_TreatingWounded_loop", 1] call ACEFUNC(common,doAnimation); + loopPressure = true; +};}, [_medic, _notInVehicle], 3] call CBA_fnc_waitAndExecute; + +[{ + params ["_medic", "_patient", "_bodypart", "_notInVehicle"]; + + [LLSTRING(StopPressure), "", ""] call ACEFUNC(interaction,showMouseHint); + [LLSTRING(StartPressure), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + + [{ + params ["_args", "_idPFH"]; + _args params ["_medic", "_patient", "_bodypart", "_notInVehicle"]; + + private _patientCondition = (!(alive _patient) || _patient isEqualTo objNull); + private _medicCondition = (!(alive _medic) || IS_UNCONSCIOUS(_medic) || _medic isEqualTo objNull); + private _vehicleCondition = (objectParent _medic isNotEqualTo objectParent _patient); + private _distanceCondition = (_patient distance2D _medic > ACEGVAR(medical_gui,maxDistance)); + TRACE_4("conditionsforPressure",_patientCondition,_medicCondition,_vehicleCondition,_distanceCondition); + + if (_patientCondition || _medicCondition || (_patient getVariable [QGVAR(applyingPressure), objNull]) isEqualTo objNull || !(_medic getVariable [QGVAR(isApplyingPressure), false]) || dialog || {(!_notInVehicle && _vehicleCondition) || {(_notInVehicle && _distanceCondition)}}) exitWith { // Stop Pressure + [_idPFH] call CBA_fnc_removePerFrameHandler; + + _medic setVariable [QGVAR(isApplyingPressure), false, true]; + + if (_patient getVariable [QGVAR(applyingPressure), objNull] isNotEqualTo objNull) then { + _patient setVariable [QGVAR(applyingPressure), objNull, true]; + }; + + [] call ACEFUNC(interaction,hideMouseHint); + [GVAR(PressureCancel_EscapeID), "keydown"] call CBA_fnc_removeKeyHandler; + [GVAR(PressureCancel_MouseID), "keydown"] call CBA_fnc_removeKeyHandler; + + if (_notInVehicle) then { + [_medic, "Acts_TreatingWounded_Out", 2] call ACEFUNC(common,doAnimation); + }; + + closeDialog 0; + private _part = ALL_BODY_PARTS find toLower _bodyPart; + private _appliedPressure = GET_APPLIEDPRESSURE(_patient); + _appliedPressure set [_part, 0]; + _patient setVariable [VAR_APPLIEDPRESSURE, _appliedPressure, true]; + _medic setVariable [QGVAR(pressureApplied), [-1, _patient], true]; + [_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + TRACE_1("Pressure1",_appliedPressure); + [LLSTRING(CancelPressure), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; + + if (loopPressure) then { + loopPressure = false; + + [{ + params ["_medic"]; + + !(_medic getVariable [QGVAR(isApplyingPressure), false]); + }, {}, [_medic], 9, { + loopPressure = true; + }] call CBA_fnc_waitUntilAndExecute; + }; + }, 0, [_medic, _patient, _bodypart, _notInVehicle]] call CBA_fnc_addPerFrameHandler; +}, [_medic, _patient, _bodypart, _notInVehicle], 0.2] call CBA_fnc_waitAndExecute; + + +[{ + params ["_medic", "_patient", "_bodypart"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_medic", "_patient", "_bodypart"]; + + if ((_patient getVariable [QGVAR(applyingPressure), objNull]) isEqualTo objNull) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _part = ALL_BODY_PARTS find toLower _bodyPart; + private _appliedPressure = GET_APPLIEDPRESSURE(_patient); + private _randomPressureAmmount = selectRandom [0.6, 0.7, 0.8]; + [_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + _appliedPressure set [_part, _randomPressureAmmount]; + _patient setVariable [VAR_APPLIEDPRESSURE, _appliedPressure, true]; + _medic setVariable [QGVAR(pressureApplied), [-1, _patient], true]; + TRACE_2("Pressure3",_appliedPressure,_randomPressureAmmount); + }, 5, [_medic, _patient, _bodypart]] call CBA_fnc_addPerFrameHandler; +}, [_medic, _patient, _bodypart], 0.2] call CBA_fnc_waitAndExecute; diff --git a/addons/hitpoints/functions/fnc_reduceJoint.sqf b/addons/hitpoints/functions/fnc_reduceJoint.sqf new file mode 100644 index 000000000..df3dad1c9 --- /dev/null +++ b/addons/hitpoints/functions/fnc_reduceJoint.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(reduceJoint), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_reduceJointLocal.sqf b/addons/hitpoints/functions/fnc_reduceJointLocal.sqf new file mode 100644 index 000000000..3e5d79202 --- /dev/null +++ b/addons/hitpoints/functions/fnc_reduceJointLocal.sqf @@ -0,0 +1,90 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call for fully healing a fracture. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_fnc_closedReductionLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; + +private _limbJointStatus = _jointArray select _jointGroupIndex; +private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] +} else { + [1, 2] +}; +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; +private _fentanylEffectiveness = 0; +private _ketamineEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; +} forEach _medStack; +if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + _localAnesthesia <= 0.8 +) then { + [_patient, [0.6, 0.7, 0.8] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); +}; + +playSound3D [QEPATHTOF_SOUND(surgery,sounds\reduction.wav), _patient, false, getPosASL _patient, 8, 1, 15]; + +{ + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury == 3) exitWith { + _limbJointStatus set [_x, _jointInjury + 6]; + [_patient] call EFUNC(misc,updateDamageEffects); + _patient setVariable [QACEGVAR(medical,isLimping), false, true]; + [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); + }; + if (_jointInjury == 6) exitWith { + _limbJointStatus set [_x, _jointInjury + 3]; + [_patient] call EFUNC(misc,updateDamageEffects); + _patient setVariable [QACEGVAR(medical,isLimping), false, true]; + [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); + }; +} forEach _selectedJointIndexes; + + + diff --git a/addons/hitpoints/functions/fnc_removeBandage.sqf b/addons/hitpoints/functions/fnc_removeBandage.sqf new file mode 100644 index 000000000..600fda780 --- /dev/null +++ b/addons/hitpoints/functions/fnc_removeBandage.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_patient", "_bodyPart", "_type"]; + +[QGVAR(removeBandage), [_patient, _bodyPart, _type], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_removeBandageLocal.sqf b/addons/hitpoints/functions/fnc_removeBandageLocal.sqf new file mode 100644 index 000000000..4eac7e0e0 --- /dev/null +++ b/addons/hitpoints/functions/fnc_removeBandageLocal.sqf @@ -0,0 +1,91 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call for fully healing a fracture. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_fnc_closedReductionLocal + * + * Public: No + */ +params ["_patient", "_bodypart", "_type"]; + +private _bandagedWounds = _patient getVariable [VAR_BANDAGED_WOUNDS, createHashMap]; +private _openWounds = _patient getVariable [VAR_OPEN_WOUNDS, createHashMap]; + +private _wounds = _bandagedWounds getOrDefault [_bodypart, []]; +private _openWoundsOnPart = _openWounds getOrDefault [_bodypart, []]; + +{ + _x params ["_classID", "_amountOf", "_bleeding", "_damage", "_bandage"]; + if (_bandage isEqualTo _type) exitWith { + private _injuryIndex = -1; + { + _x params ["_selClassID"]; + if (_selClassID == _classID) exitWith { _injuryIndex = _forEachIndex }; + } forEach _openWoundsOnPart; + + if (_injuryIndex == -1) exitWith { + TRACE_1("Matching open wound not found for classID",_classID); + }; + + private _selectedInjury = _openWoundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "_selBleeding", "_selDamage"]; + + private _wounds = _bandagedWounds getOrDefault [_bodypart, []]; + private _indexToRemove = -1; + private _removedAmount = 0; // store how much we remove + + { + _x params ["_id", "_amountOf", "", "", "_oldBandage"]; + if (_id == _classID && {_oldBandage == _bandage}) exitWith { + private _reduction = [2, 4] select (_bandage == "ETD"); + _newAmount = 0 max (_amountOf - _reduction); + + // store actual removed amount + _removedAmount = _amountOf - _newAmount; + + if (_newAmount == 0) then { + _indexToRemove = _forEachIndex; + } else { + _x set [1, _newAmount]; + }; + }; + } forEach _wounds; + + if (_indexToRemove != -1) then { + _wounds deleteAt _indexToRemove; + if (_wounds isEqualTo []) then { + _bandagedWounds deleteAt _bodypart; + } else { + _bandagedWounds set [_bodypart, _wounds]; + }; + }; + _selectedInjury set [1, _selAmount + _removedAmount]; + + _patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; + _patient setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _bodypart; + + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_patient, _bodypart, _selDamage] call ACEFUNC(medical_treatment,addTrauma); + }; + + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_patient] call EFUNC(misc,updateDamageEffects); + }; + + TRACE_2("Forced reopening complete",_classID,_type); + }; +} forEach _wounds; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_splintLocal.sqf b/addons/hitpoints/functions/fnc_splintLocal.sqf new file mode 100644 index 000000000..ee6c01a6f --- /dev/null +++ b/addons/hitpoints/functions/fnc_splintLocal.sqf @@ -0,0 +1,48 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Local callback for applying a splint to a patient. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call ace_medical_treatment_fnc_splintLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +TRACE_3("splintLocal",_medic,_patient,_bodyPart); + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +private _fractures = GET_FRACTURES(_patient); +TRACE_2("handleSplintFalloff1",_partIndex,_fractures); +_fractures set [_partIndex, -1]; +_patient setVariable [VAR_FRACTURES, _fractures, true]; +private _delay = random [60, 120, 180]; +[{ + params ["_patient", "_partIndex"]; + private _fractures = GET_FRACTURES(_patient); + TRACE_3("handleSplintFalloff2",_patient,_partIndex,_fractures); + if (_fractures select _partIndex == -1) then { + _fractures set [_partIndex, 1]; + _patient setVariable [VAR_FRACTURES, _fractures, true]; + [_patient] call EFUNC(misc,updateDamageEffects); + [LSTRING(SplintFellOff), 1.5, _patient] call ACEFUNC(common,displayTextStructured); + } +}, [_patient, _partIndex], _delay] call CBA_fnc_waitAndExecute; + +TRACE_2("splintFalloff",_patient,_bodyPart); + +// Check if we fixed limping from this treatment +[_patient] call EFUNC(misc,updateDamageEffects); + +[_patient, "ACE_splint"] call ACEFUNC(medical_treatment,addToTriageCard); +[_patient, "activity", ACELSTRING(medical_treatment,Activity_appliedSplint), [[_medic, false, true] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_stabilizeJoint.sqf b/addons/hitpoints/functions/fnc_stabilizeJoint.sqf new file mode 100644 index 000000000..06a729fbb --- /dev/null +++ b/addons/hitpoints/functions/fnc_stabilizeJoint.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(stabilizeJoint), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_stabilizeJointLocal.sqf b/addons/hitpoints/functions/fnc_stabilizeJointLocal.sqf new file mode 100644 index 000000000..01c58737b --- /dev/null +++ b/addons/hitpoints/functions/fnc_stabilizeJointLocal.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Callback to wrap a splint on a bodypart + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + + * Return Value: + * None + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_wrapJoint + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; + +private _limbJointStatus = _jointArray select _jointGroupIndex; +private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] +} else { + [1, 2] +}; +{ + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury == 3) exitWith { + _limbJointStatus set [_x, _jointInjury + 3]; + [_patient] call EFUNC(misc,updateDamageEffects); + }; +} forEach _selectedJointIndexes; + diff --git a/addons/hitpoints/functions/fnc_tourniquet.sqf b/addons/hitpoints/functions/fnc_tourniquet.sqf new file mode 100644 index 000000000..2838b43ba --- /dev/null +++ b/addons/hitpoints/functions/fnc_tourniquet.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, mharis001 + * Applies a tourniquet to the patient on the given body part. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment (not used) + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg", "", objNull, "ACE_tourniquet"] call ace_medical_treatment_fnc_tourniquet + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "", "", "_usedItem", "", "_type"]; + +// Exit if there is a tourniquet already applied to body part +if ([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) exitWith { + ["There is already a tourniquet on this body part!", 1.5] call ACEFUNC(common,displayTextStructured); // todo: localize +}; + +[_patient, _usedItem] call ACEFUNC(medical_treatment,addToTriageCard); +[_patient, "activity", ACELSTRING(medical_treatment,Activity_appliedTourniquet), [[_medic, false, true] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + +[QGVAR(tourniquetLocal), [_patient, _bodyPart, _type], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_tourniquetLocal.sqf b/addons/hitpoints/functions/fnc_tourniquetLocal.sqf new file mode 100644 index 000000000..067b5f975 --- /dev/null +++ b/addons/hitpoints/functions/fnc_tourniquetLocal.sqf @@ -0,0 +1,39 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for applying a tourniquet to a patient. + * + * Arguments: + * 0: Patient + * 1: Body Part + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg"] call ace_medical_treatment_fnc_tourniquetLocal + * + * Public: No + */ + +params ["_patient", "_bodyPart", "_type"]; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +private _tourniquets = GET_TOURNIQUETS(_patient); +private _tourniquetArray = GET_KAT_TOURNIQUETS(_patient); +if (_type == 1) then { + private _amount = random [0.7, 0.8, 0.95]; + _tourniquetArray set [_partIndex, _amount]; +} else { + _tourniquetArray set [_partIndex, 1]; +}; + +_tourniquets set [_partIndex, CBA_missionTime]; +_patient setVariable [VAR_TOURNIQUET, _tourniquets, true]; +_patient setVariable [VAR_KAT_TOURNIQUET, _tourniquetArray, true]; + +[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + +private _nearPlayers = (_patient nearEntities ["CAManBase", 6]) select {_x call ACEFUNC(common,isPlayer)}; +TRACE_1("clearConditionCaches: tourniquetLocal",_nearPlayers); +[QACEGVAR(interact_menu,clearConditionCaches), [], _nearPlayers] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_updateBodyPartVisuals.sqf b/addons/hitpoints/functions/fnc_updateBodyPartVisuals.sqf new file mode 100644 index 000000000..149c9888a --- /dev/null +++ b/addons/hitpoints/functions/fnc_updateBodyPartVisuals.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: commy2 + * Damages a body part of a local unit. Does not kill the unit. + * + * Arguments: + * 0: Unit + * 1: Update Head + * 2: Update Body + * 3: Update Arms + * 4: Update Legs + * + * Return Value: + * None + * + * Example: + * [player, true, true, true, true] call ace_medical_engine_fnc_updateBodyPartVisuals + * + * Public: No + */ + +params ["_unit", "_updateHead", "_updateBody", "_updateArms", "_updateLegs"]; +TRACE_5("updateBodyPartVisuals",_unit,_updateHead,_updateBody,_updateArms,_updateLegs); + +private _bodyPartDamage = GET_BODYPART_DAMAGE(_unit); + +if (_updateHead) then { + [_unit, "head", ((_bodyPartDamage select 0) max (_bodyPartDamage select 1)) > VISUAL_BODY_DAMAGE_THRESHOLD] call ACEFUNC(medical_engine,damageBodyPart); +}; +if (_updateBody) then { + [_unit, "body", ((_bodyPartDamage select 2) max (_bodyPartDamage select 3)) > VISUAL_BODY_DAMAGE_THRESHOLD] call ACEFUNC(medical_engine,damageBodyPart); +}; +if (_updateArms) then { + [_unit, "arms", (((_bodyPartDamage select 4) max (_bodyPartDamage select 5)) max ((_bodyPartDamage select 6) max (_bodyPartDamage select 7))) > VISUAL_BODY_DAMAGE_THRESHOLD] call ACEFUNC(medical_engine,damageBodyPart); +}; +if (_updateLegs) then { + [_unit, "legs", (((_bodyPartDamage select 8) max (_bodyPartDamage select 9)) max ((_bodyPartDamage select 10) max (_bodyPartDamage select 11))) > VISUAL_BODY_DAMAGE_THRESHOLD] call ACEFUNC(medical_engine,damageBodyPart); +}; diff --git a/addons/hitpoints/functions/fnc_woundsHandlerArmorPenetration.sqf b/addons/hitpoints/functions/fnc_woundsHandlerArmorPenetration.sqf new file mode 100644 index 000000000..ba47b2830 --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerArmorPenetration.sqf @@ -0,0 +1,79 @@ +#include "..\script_component.hpp" +/* + * Author: LinkIsGrim + * Custom wounds handler for armor penetration. Calculates damage based on round material penetration and unit armor + * + * Arguments: + * 0: Unit that was hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Type of the damage done + * 3: Ammo + * + * Return Value: + * None + * + * Example: + * [player, [[0.5, "Body", 1]], "bullet"] call ace_medical_damage_fnc_woundsHandlerArmorPenetration + * + * Public: No + */ + +// This gets close to vanilla values on FMJ ammo +#define DAMAGE_SCALING_FACTOR 5 +#define UNSCALED_BASE_ARMOR 2 + +if (!ACEGVAR(medical,alternateArmorPenetration)) exitWith {_this}; +params ["_unit", "_allDamages", "_typeOfDamage", "_ammo"]; +TRACE_4("woundsHandlerArmorPenetration",_unit,_allDamages,_typeOfDamage,_ammo); +// See (https://community.bistudio.com/wiki/CfgAmmo_Config_Reference#caliber), +// _penFactor is ammo "caliber" * RHA penetrability, armor plates according to BI are just made of RHAe material +(_ammo call FUNC(getAmmoData)) params ["_hit", "_penFactor", "_typicalSpeed"]; + +// Skip bad ammo +if (_hit <= 0) exitWith {_this}; + +private _damageData = _allDamages select 0; // selection specific +_damageData params ["_engineDamage", "_bodyPart", "_realDamage"]; + +private _armorLevelStep = [2, 4] select (_bodyPart == "chest"); +private _armor = (_realDamage/_engineDamage) - UNSCALED_BASE_ARMOR; // remove base armor + +// There's no need to calculate penetration if there is no armor to begin with, base damage handling is good enough in this case +if (_armor <= _armorLevelStep) exitWith { + TRACE_3("skipping no armor",_armor,_bodyPart,_armorLevelStep); + _this // return +}; + +// Cap at Armor Level V +// Jumping from no armor to armor level 1 is 2 steps +private _armorLevel = 0 max (round ((_armor - (_armorLevelStep * 2)) / _armorLevelStep)) min 4; +TRACE_3("gotArmorLevel",_armorLevel,_armor,_armorLevelStep); + +// Armor RHA equivalent, non-linear, ref \a3\Data_F\Penetration\armour_plate/thin/medium/heavy.bisurf +// Divided by 2 to keep inline with vanilla caliber values +private _armorThickness = [ + 6, + 15, + 21, + 40, + 55 +] select _armorLevel; +TRACE_1("gotArmorThickness",_armorThickness); + +// Impact damage is hit * (impactSpeed / typicalSpeed): https://community.bistudio.com/wiki/CfgAmmo_Config_Reference#typicalSpeed +// Impact damage is already lowered by engine based on hit angle, so speed and therefore penetration are also naturally lowered +// Assume typicalSpeed < 1 means no damage dropoff +private _impactSpeed = (_realDamage/_hit) * (_typicalSpeed max 1); + +private _penDepth = _penFactor * _impactSpeed; +private _effectivness = GVAR(armorEffectivness); +// Max damage is the config value, go down from there based on armor penetration +private _finalDamage = (_hit * ((_penDepth/_armorThickness) min 1)) / (DAMAGE_SCALING_FACTOR * _effectivness); +_damageData set [0, _finalDamage]; + +TRACE_3("Armor penetration handled, passing damage",_finalDamage,_damageData,_allDamages); + +_this // return \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_woundsHandlerBase.sqf b/addons/hitpoints/functions/fnc_woundsHandlerBase.sqf new file mode 100644 index 000000000..1488d1783 --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerBase.sqf @@ -0,0 +1,290 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, commy2 + * Handling of the open wounds & injuries upon the handleDamage eventhandler. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 2: Type of the damage done + * + * Return Value: + * None + * + * Example: + * [player, [[0.5, "Body", 1]], "bullet"] call ace_medical_damage_fnc_woundsHandlerBase + * + * Public: No + */ + +params ["_unit", "_allDamages", "_typeOfDamage"]; +TRACE_3("woundsHandlerBase",_unit,_allDamages,_typeOfDamage); + +if !(_typeOfDamage in ACEGVAR(medical_damage,damageTypeDetails)) then { + WARNING_1("damage type %1 not found",_typeOfDamage); + _typeOfDamage = "unknown"; +}; + +ACEGVAR(medical_damage,damageTypeDetails) get _typeOfDamage params ["_thresholds", "_selectionSpecific", "", "_damageWoundDetails"]; +TRACE_3("damageType",_thresholds,_selectionSpecific,_damageWoundDetails); +// Administration for open wounds and ids +private _openWounds = GET_OPEN_WOUNDS(_unit); + +private _createdWounds = false; +private _updateDamageEffects = false; +private _painLevel = 0; +private _criticalDamage = false; +private _bodyPartDamage = GET_BODYPART_DAMAGE(_unit); +private _bodyPartVisParams = [_unit, false, false, false, false]; // params array for EFUNC(medical_engine,updateBodyPartVisuals); + +// process wounds separately for each body part hit +{ // forEach _allDamages + _x params ["_damage", "_bodyPart"]; + _bodyPart = toLowerANSI _bodyPart; + if (_typeOfDamage != "explosive") then { + if (_bodyPart == "head") then { + private _isNeck = (random 1) < 0.15; // 10% chance for neck damage + _bodyPart = ["head", "neck"] select (_isNeck); + }; + }; + // silently ignore structural damage + if (_bodyPart == "#structural") then {continue}; + + // Convert the selectionName to a number and ensure it is a valid selection. + private _bodyPartNToAdd = ALL_BODY_PARTS find _bodyPart; + if (_bodyPartNToAdd < 0) then { + ERROR_1("invalid body part %1",_bodyPart); + continue + }; + + // determine how many wounds to create + private _nWounds = [_damage, _thresholds, true] call ACEFUNC(medical_damage,interpolatePoints); + if (_nWounds < 1) then { + TRACE_2("Damage created zero wounds",_damage,_typeOfDamage); + continue + }; + private _dmgPerWound = _damage/_nWounds; + + // find the available injuries for this damage type and damage amount + private _weightedWoundTypes = []; + { + private _weighting = _x select 1; + private _woundWeight = [_dmgPerWound, _weighting] call ACEFUNC(medical_damage,interpolatePoints); + _weightedWoundTypes pushBack _x; + _weightedWoundTypes pushBack _woundWeight; + } forEach _damageWoundDetails; + + if (_weightedWoundTypes isEqualTo []) then { + TRACE_2("No valid wounds",_damage,_typeOfDamage); + continue + }; + + for "_i" from 1 to _nWounds do { + + // Select the injury we are going to add + selectRandomWeighted _weightedWoundTypes params ["_woundTypeToAdd", "", "_dmgMultiplier", "_bleedMultiplier", "_sizeMultiplier", "_painMultiplier", "_fractureMultiplier"]; + if (isNil "_woundTypeToAdd") then { + WARNING_4("No valid wound types %1-%2-%3-%4",_damage,_dmgPerWound,_typeOfDamage,_bodyPart); + continue + }; + if (_woundTypeToAdd in ["Avulsion", "Velocity Wound", "Contusion"] && (random 100 < GVAR(InternalBleedingChance)) && (GVAR(InternalBleedingEnable))) then { + private _woundTypeToAdd = "InternalBleeding"; + ACEGVAR(medical_damage,woundDetails) get _woundTypeToAdd params ["","_injuryBleedingRate","_injuryPain","_causeLimping","_causeFracture"]; + private _woundClassIDToAdd = ACEGVAR(medical_damage,woundClassNames) find _woundTypeToAdd; + TRACE_2("wounds",_woundTypeToAdd,_woundClassIDToAdd); + // Add a bit of random variance to wounds + private _woundDamage = _dmgPerWound * _dmgMultiplier * random [0.3, 0.5, 0.7] ; + + _bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _woundDamage]; + + // Anything above this value is guaranteed worst wound possible + private _worstDamage = 2; + + #define LARGE_WOUND_THRESHOLD 0.5 + // Config specifies bleeding and pain for worst possible wound + // Worse wound correlates to higher damage, damage is not capped at 1 + private _woundSize = linearConversion [0.1, _worstDamage, _woundDamage * _sizeMultiplier, LARGE_WOUND_THRESHOLD^3, 1, true]; + + private _pain = _woundSize * _painMultiplier * _injuryPain; + _painLevel = _painLevel + _pain; + + _arterialRate = 1; + if (random 100 < GVAR(ArterialChance)) then { + _arterialRate = random [1.1, 1.3, 1.6]; + }; + _bleeding = (_woundSize * _bleedMultiplier * _injuryBleedingRate) * _arterialRate; + TRACE_6("BleedingRate",_bleeding,_woundSize,_bleedMultiplier,_injuryBleedingRate,_arterialRate,GVAR(ArterialChance)); + // large wounds are > LARGE_WOUND_THRESHOLD + // medium is > LARGE_WOUND_THRESHOLD^2 + // minor is > LARGE_WOUND_THRESHOLD^3 + private _category = 0 max (2 - floor (ln _woundSize / ln LARGE_WOUND_THRESHOLD)) min 2; + + private _classComplex = 10 * _woundClassIDToAdd + _category; + + // Create a new injury. Format [0:classComplex, 1:amountOf, 2:bleedingRate, 3:woundDamage] + private _injury = [_classComplex, 1, _bleeding, _woundDamage]; + + #ifdef DEBUG_MODE_FULL + diag_log format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, _woundDamage toFixed 2, _woundDamage > PENETRATION_THRESHOLD, _bleeding toFixed 3, _pain toFixed 3]; + systemChat format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, _woundDamage toFixed 2, _woundDamage > PENETRATION_THRESHOLD, _bleeding toFixed 3, _pain toFixed 3]; + #endif + + // if possible merge into existing wounds + private _createNewWound = true; + private _existingWounds = _openWounds getOrDefault [_bodyPart, [], true]; + { + _x params ["_classID", "_oldAmountOf", "_oldBleeding", "_oldDamage"]; + if ( + (_classComplex == _classID) && + {(_bodyPart isNotEqualTo "") || {(_woundDamage < PENETRATION_THRESHOLD) isEqualTo (_oldDamage < PENETRATION_THRESHOLD)}} && + {(_bodyPartNToAdd > 7) || {!_causeLimping} || {(_woundDamage <= LIMPING_DAMAGE_THRESHOLD) isEqualTo (_oldDamage <= LIMPING_DAMAGE_THRESHOLD)}} // ensure limping damage is stacked correctly + ) exitWith { + TRACE_2("merging with existing wound",_injury,_x); + private _newAmountOf = _oldAmountOf + 1; + _x set [1, _newAmountOf]; + private _newBleeding = (_oldAmountOf * _oldBleeding + _bleeding) / _newAmountOf; + _x set [2, _newBleeding]; + private _newDamage = (_oldAmountOf * _oldDamage + _woundDamage) / _newAmountOf; + _x set [3, _newDamage]; + _createNewWound = false; + }; + } forEach _existingWounds; + + if (_createNewWound) then { + TRACE_1("adding new wound",_injury); + _existingWounds pushBack _injury; + }; + }; + ACEGVAR(medical_damage,woundDetails) get _woundTypeToAdd params ["","_injuryBleedingRate","_injuryPain","_causeLimping","_causeFracture"]; + private _woundClassIDToAdd = ACEGVAR(medical_damage,woundClassNames) find _woundTypeToAdd; + TRACE_2("wounds",_woundTypeToAdd,_woundClassIDToAdd); + // Add a bit of random variance to wounds + private _woundDamage = _dmgPerWound * _dmgMultiplier * random [0.9, 1, 1.1]; + + _bodyPartDamage set [_bodyPartNToAdd, (_bodyPartDamage select _bodyPartNToAdd) + _woundDamage]; + _bodyPartVisParams set [[1,1,1,2,2,2,3,3,3,4,4,4] select _bodyPartNToAdd, true]; // Mark the body part index needs updating + + // Anything above this value is guaranteed worst wound possible + private _worstDamage = 6; + #undef LARGE_WOUND_THRESHOLD + #define LARGE_WOUND_THRESHOLD 0.75 + + // Config specifies bleeding and pain for worst possible wound + // Worse wound correlates to higher damage, damage is not capped at 1 + private _woundSize = linearConversion [0.1, _worstDamage, _woundDamage * _sizeMultiplier, LARGE_WOUND_THRESHOLD^3, 1, true]; + + private _pain = _woundSize * _painMultiplier * _injuryPain; + _painLevel = _painLevel + _pain; + + _arterialRate = 1; + if (random 100 < GVAR(ArterialChance)) then { + _arterialRate = random [1.1, 1.3, 1.6]; + }; + _bleeding = (_woundSize * _bleedMultiplier * _injuryBleedingRate) * _arterialRate * random [0.8, 1, 1.2];; + TRACE_6("BleedingRate",_bleeding,_woundSize,_bleedMultiplier,_injuryBleedingRate,_arterialRate,GVAR(ArterialChance)); + // large wounds are > LARGE_WOUND_THRESHOLD + // medium is > LARGE_WOUND_THRESHOLD^2 + // minor is > LARGE_WOUND_THRESHOLD^3 + private _category = 0 max (2 - floor (ln _woundSize / ln LARGE_WOUND_THRESHOLD)) min 2; + + private _classComplex = 10 * _woundClassIDToAdd + _category; + + // Create a new injury. Format [0:classComplex, 1:amountOf, 2:bleedingRate, 3:woundDamage] + private _injury = [_classComplex, 1, _bleeding, _woundDamage]; + + if (_bodyPart in ["head", "body", "neck", "chest"] && {_woundDamage > PENETRATION_THRESHOLD}) then { + _criticalDamage = true; + }; + if ([_unit, _bodyPartNToAdd, _bodyPartDamage, _woundDamage] call FUNC(determineIfFatal)) then { + if (!isPlayer _unit || {random 1 < ACEGVAR(medical,deathChance)}) then { + TRACE_1("determineIfFatal returned true",_woundDamage); + [QACEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; + }; + }; + + #ifdef DEBUG_MODE_FULL + diag_log format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, _woundDamage toFixed 2, _woundDamage > PENETRATION_THRESHOLD, _bleeding toFixed 3, _pain toFixed 3]; + systemChat format["%1, damage: %2, peneration: %3, bleeding: %4, pain: %5", _bodyPart, _woundDamage toFixed 2, _woundDamage > PENETRATION_THRESHOLD, _bleeding toFixed 3, _pain toFixed 3]; + #endif + + switch (true) do { + case ( + _causeFracture + && {ACEGVAR(medical,fractures) > 0} + && {_bodyPartNToAdd > 3} + && {_woundDamage > FRACTURE_DAMAGE_THRESHOLD} + && {random 1 < (_fractureMultiplier * ACEGVAR(medical,fractureChance))} + ): { + private _fractures = GET_FRACTURES(_unit); + _fractures set [_bodyPartNToAdd, 1]; + _unit setVariable [VAR_FRACTURES, _fractures, true]; + + [QACEGVAR(medical,fracture), [_unit, _bodyPartNToAdd]] call CBA_fnc_localEvent; + TRACE_1("Limb fracture",_bodyPartNToAdd); + + _updateDamageEffects = true; + }; + case ( + _causeLimping + && {ACEGVAR(medical,limping) > 0} + && {_bodyPartNToAdd > 3} + && {_woundDamage > LIMPING_DAMAGE_THRESHOLD} + ): { + _updateDamageEffects = true; + }; + }; + + // if possible merge into existing wounds + private _createNewWound = true; + private _existingWounds = _openWounds getOrDefault [_bodyPart, [], true]; + { + _x params ["_classID", "_oldAmountOf", "_oldBleeding", "_oldDamage"]; + if ( + (_classComplex == _classID) && + {(_bodyPart isNotEqualTo "") || {(_woundDamage < PENETRATION_THRESHOLD) isEqualTo (_oldDamage < PENETRATION_THRESHOLD)}} && + {(_bodyPartNToAdd > 7) || {!_causeLimping} || {(_woundDamage <= LIMPING_DAMAGE_THRESHOLD) isEqualTo (_oldDamage <= LIMPING_DAMAGE_THRESHOLD)}} // ensure limping damage is stacked correctly + ) exitWith { + TRACE_2("merging with existing wound",_injury,_x); + private _newAmountOf = _oldAmountOf + 1; + _x set [1, _newAmountOf]; + private _newBleeding = (_oldAmountOf * _oldBleeding + _bleeding) / _newAmountOf; + _x set [2, _newBleeding]; + private _newDamage = (_oldAmountOf * _oldDamage + _woundDamage) / _newAmountOf; + _x set [3, _newDamage]; + _createNewWound = false; + }; + } forEach _existingWounds; + + if (_createNewWound) then { + TRACE_1("adding new wound",_injury); + _existingWounds pushBack _injury; + }; + _createdWounds = true; + }; + + // selection-specific damage only hits the first part + if (_selectionSpecific > 0) then { + break; + }; +} forEach _allDamages; + +if (_updateDamageEffects) then { + [_unit] call ACEFUNC(medical_engine,updateDamageEffects); +}; + +if (_createdWounds) then { + _unit setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + _unit setVariable [VAR_BODYPART_DAMAGE, _bodyPartDamage, true]; + TRACE_1("CreatedNewWounds",_openWounds); + _bodyPartVisParams call ACEFUNC(medical_engine,updateBodyPartVisuals); + + [QACEGVAR(medical,injured), [_unit, _painLevel]] call CBA_fnc_localEvent; + + if (_criticalDamage || {_painLevel > PAIN_UNCONSCIOUS}) then { + [_unit] call ACEFUNC(medical_damage,handleIncapacitation); + }; + + TRACE_4("exit",_unit,_painLevel,GET_PAIN(_unit),GET_OPEN_WOUNDS(_unit)); +}; + +[] //return, no further damage handling diff --git a/addons/hitpoints/functions/fnc_woundsHandlerBurning.sqf b/addons/hitpoints/functions/fnc_woundsHandlerBurning.sqf new file mode 100644 index 000000000..9c3e7b5ed --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerBurning.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" +/* + * Author: Pterolatypus + * Custom wound handler for burns. Stores up small damage events until there's enough to create a wound. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 2: Type of the damage done + * + * Return Value: + * None + * + * Example: + * [player, [[0.5, "Body", 0.5]], "burning"] call ace_medical_damage_fnc_woundsHandlerBurning + * + * Public: No + */ +params ["_unit", "_allDamages", "_typeOfDamage"]; +TRACE_3("woundsHandlerBurning",_unit,_allDamages,_typeOfDamage); + +#define FIRE_DAMAGE_INTERVAL 1 + +{ + _x params ["_damage", "_bodyPart"]; + + if (_bodyPart != "#structural") then { + continue + }; + + private _storedDamage = _unit getVariable [QACEGVAR(medical_damage,storedBurnDamage), 0]; + private _newDamage = _storedDamage + _damage; + + // schedule a task to convert stored damage to wounds after a delay + // the task resets stored damage to zero, so if it isn't currently zero that means there is a task already waiting + if (_storedDamage == 0 && _newDamage > 0) then { + [{ + params ["_unit"]; + + private _bodyPart = ["leftarm", "rightarm", "leftleg", "rightleg", "upperleftarm", "upperrightarm", "upperleftleg", "upperrightleg", "body", "chest"]; + { + private _storedDamage = (_unit getVariable [QACEGVAR(medical_damage,storedBurnDamage), 0]) / 2; + [QACEGVAR(medical,woundReceived), [_unit, [[_storedDamage, _x, _storedDamage]], _unit, "burn"]] call CBA_fnc_localEvent; + } forEach _bodyPart; + _unit setVariable [QACEGVAR(medical_damage,storedBurnDamage), 0, true]; + }, + [_unit], FIRE_DAMAGE_INTERVAL] call CBA_fnc_waitAndExecute; + }; + + _unit setVariable [QACEGVAR(medical_damage,storedBurnDamage), _newDamage]; +} forEach _allDamages; + +[] //return, no further damage handling for this event diff --git a/addons/hitpoints/functions/fnc_woundsHandlerEviscerationHit.sqf b/addons/hitpoints/functions/fnc_woundsHandlerEviscerationHit.sqf new file mode 100644 index 000000000..5d09519af --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerEviscerationHit.sqf @@ -0,0 +1,63 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Called when a unit is damaged. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Damage type (unused) + * 3: Ammo (unused) + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_breathing_fnc_woundsHandlerEviscerationHit + * + * Public: No + */ + +params ["_unit", "_allDamages"]; +(_allDamages select 0) params ["_engineDamage", "_bodyPart"]; // selection-specific + +private _fixedBodyPart = toLower _bodyPart; +if !(GVAR(CatastrophicEnable) && _fixedBodyPart == "body") exitWith { + TRACE_1("NotEnable",_fixedBodyPart); + _this}; +if (_engineDamage < GVAR(EviscerationDamageThreshold)) exitWith { + TRACE_1("NotEnoughDamage",_engineDamage); + _this}; +TRACE_1("EnoughDamage",_engineDamage); +private _chanceIncrease = 0; +if (GVAR(EviscerationDamageThreshold_TakenDamage)) then { + _chanceIncrease = linearConversion [GVAR(EviscerationDamageThreshold), 3, _engineDamage, 0, 30, true]; + TRACE_1("chanceIncrease",_chanceIncrease); +}; +// Damage threshold passed & Evisceration given +if (floor (random 100) < (GVAR(EviscerationChance) + _chanceIncrease)) exitWith { + private _eviscerationLevel = _unit getVariable [QGVAR(evisceration), 0]; + private _hasEvisceration = _eviscerationLevel > 0; + private _initialEvisceration = _eviscerationLevel == 0; + TRACE_3("chanceIncrease",_eviscerationLevel,_hasEvisceration,_initialEvisceration); + switch (true) do { + case (_hasEvisceration): { + [_unit, 1] call ACEFUNC(medical_status,adjustPainLevel); + private _newEviscerationLevel = (_eviscerationLevel + 1) min 4; + _unit setVariable [QGVAR(evisceration), _newEviscerationLevel, true]; + }; + case (_initialEvisceration): { + [_unit, 1] call ACEFUNC(medical_status,adjustPainLevel); + private _newEviscerationLevel = (_eviscerationLevel + 1) min 4; + _unit setVariable [QGVAR(evisceration), _newEviscerationLevel, true]; + _unit setVariable [QGVAR(activeWoundPack), 0, true]; + }; + }; + + _this // return +}; + +_this // return \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_woundsHandlerJoints.sqf b/addons/hitpoints/functions/fnc_woundsHandlerJoints.sqf new file mode 100644 index 000000000..1c6b4fb04 --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerJoints.sqf @@ -0,0 +1,87 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Called when a unit is damaged. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Damage type (unused) + * 3: Ammo (unused) + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_breathing_fnc_woundsHandlerJoints + * + * Public: No + */ + +params ["_unit", "_allDamages", "_damageType"]; + +{ + _x params ["_damage", "_bodyPart"]; + + private _fixedBodyPart = toLower _bodyPart; + + if !(GVAR(CatastrophicEnable) && !(_fixedBodyPart in ["head", "neck", "chest", "body"])) then { + TRACE_1("NotEnable",_fixedBodyPart); + } else { + private _chanceIncrease = 0; + if (GVAR(JointDamageThreshold_TakenDamage)) then { + _chanceIncrease = linearConversion [GVAR(JointDamageThreshold), 3, _damage, 0, 30, true]; + TRACE_1("chanceIncrease",_chanceIncrease); + }; + TRACE_3("WHJoints1",_unit,_chance,_chanceIncrease); + + if (floor (random 100) < (GVAR(JointChance) + _chanceIncrease)) then { + private _partIndex = ALL_BODY_PARTS find _fixedBodyPart; + private _jointArray = GET_JOINTS(_unit); + private _jointGroupIndex = switch (true) do { + case (_partIndex in [4, 5]): { 0 }; + case (_partIndex in [6, 7]): { 1 }; + case (_partIndex in [8, 9]): { 2 }; + case (_partIndex in [10, 11]): { 3 }; + default { -1 }; + }; + TRACE_2("WHJoints3",_partIndex,_jointGroupIndex); + + if (_jointGroupIndex >= 0) then { + private _limbJointStatus = _jointArray select _jointGroupIndex; + private _jointNumber = selectRandom [0,1,2]; + private _jointInjury = _limbJointStatus select _jointNumber; + if (_jointInjury == 0) then { + [_unit, 0.8] call ACEFUNC(medical_status,adjustPainLevel); + + private _damageNormalized = linearConversion [0, 3, _damage, 0, 1, true]; + private _minChance3 = 0.05; + private _minChance2 = 0.35; + private _remaining = 1 - (_minChance3 + _minChance2); + private _dynamicW1 = (1 - _damageNormalized); + private _dynamicW2 = 0.5; + private _dynamicW3 = _damageNormalized; + private _totalDynamicW = _dynamicW1 + _dynamicW2 + _dynamicW3; + private _finalW1 = _remaining * (_dynamicW1 / _totalDynamicW); + private _finalW2 = _remaining * (_dynamicW2 / _totalDynamicW); + private _finalW3 = _remaining * (_dynamicW3 / _totalDynamicW); + _finalW2 = _finalW2 + _minChance2; + _finalW3 = _finalW3 + _minChance3; + private _jointInjury = selectRandomWeighted [1, _finalW1, 2, _finalW2, 3, _finalW3]; + + _limbJointStatus set [_jointNumber, _jointInjury]; + _jointArray set [_jointGroupIndex, _limbJointStatus]; + _unit setVariable [VAR_JOINTS, _jointArray, true]; + [_unit] call EFUNC(misc,updateDamageEffects); + TRACE_3("WHJoints4",_limbJointStatus,_jointInjury,_jointNumber); + if ((random 100) > 20) exitWith {_this}; + }; + }; + }; + }; +} forEach _allDamages; + +_this // Final return \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_woundsHandlerPelvicHit.sqf b/addons/hitpoints/functions/fnc_woundsHandlerPelvicHit.sqf new file mode 100644 index 000000000..87bbcb403 --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerPelvicHit.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Called when a unit is damaged. + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 0: Engine damage + * 1: Body part + * 2: Real damage + * 2: Damage type (unused) + * 3: Ammo (unused) + * + * Return Value: + * None + * + * Example: + * [cursorTarget, [1, "Body", 2], "bullet", "B_556x45_Ball"] call kat_hitpoints_fnc_woundsHandlerPelvicHit + * + * Public: No + */ + +params ["_unit", "_allDamages"]; +(_allDamages select 0) params ["_engineDamage", "_bodyPart"]; // selection-specific + +private _fixedBodyPart = toLower _bodyPart; +if !(GVAR(CatastrophicEnable) && _fixedBodyPart == "body") exitWith { + TRACE_1("NotEnable",_fixedBodyPart); + _this}; +if (_engineDamage < GVAR(PelvicDamageThreshold)) exitWith { + TRACE_1("NotEnoughDamage",_engineDamage); + _this}; + +private _chanceIncrease = 0; +if (GVAR(PelvicDamageThreshold_TakenDamage)) then { + _chanceIncrease = linearConversion [GVAR(PelvicDamageThreshold), 3, _engineDamage, 0, 30, true]; + TRACE_1("chanceIncrease",_chanceIncrease); +}; + +// Damage threshold passed & Evisceration given +if (floor (random 100) < (GVAR(PelvicFractureChance) + _chanceIncrease)) exitWith { + private _pelvicFracture = _unit getVariable [QGVAR(pelvicFracture), 0]; + if (_pelvicFracture == 0) then { + _unit setVariable [QGVAR(pelvicFracture), 1, true]; + [_unit, 0.9] call ACEFUNC(medical_status,adjustPainLevel); + _unit setVariable [QGVAR(activePelvicBinder), false, true]; + }; + _this +}; + +_this // return \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_woundsHandlerVehiclehit.sqf b/addons/hitpoints/functions/fnc_woundsHandlerVehiclehit.sqf new file mode 100644 index 000000000..e4786d2eb --- /dev/null +++ b/addons/hitpoints/functions/fnc_woundsHandlerVehiclehit.sqf @@ -0,0 +1,47 @@ +#include "..\script_component.hpp" +/* + * Author: Pterolatypus, LinkIsGrim + * Custom wound handler for vehicle hits and vehicleexplosions, sends damage to a random hitpoint + * + * Arguments: + * 0: Unit That Was Hit + * 1: Damage done to each body part + * 2: Type of the damage done + * + * Return Value: + * None + * + * Example: + * [player, [[0.5, "#structural", 1.5]], "vehiclehit"] call ace_medical_damage_fnc_woundsHandlerVehiclehit + * + * Public: No + */ +params ["_unit", "_allDamages", "_typeOfDamage"]; +TRACE_3("woundsHandlerVehiclehit",_unit,_allDamages,_typeOfDamage); + +// this should only trigger for hits to just structural +if (count _allDamages > 1) exitWith {_this}; + +// damage can sometimes be negative (why?) +// damage to structural is low unless it's a very large explosion, in which case it is typically >= 1 +private _damageToApply = (abs (_allDamages select 0 select 0)); + +private _damageMap = createHashMap; +private _bodyPart = ""; +private _allBodyParts = ALL_BODY_PARTS; // micro-optimization here and above, don't recreate this array every time +TRACE_1("Vehicle explosion handled, passing damage",_damageToApply); +// hitpoints are randomized, more damage means more wounds in different body parts +// use a hashmap so we only create one entry in _newDamages per body part +for "_i" from 1 to (_damageToApply * 12) do { + _bodyPart = selectRandom _allBodyParts; + _damageMap set [_bodyPart, (_damageMap getOrDefault [_bodyPart, 0]) + _damageToApply]; +}; + +private _newDamages = []; +{ + _newDamages pushBack [_damageMap get _x, _x, _damageToApply]; +} forEach (keys _damageMap); // micro-optimization again, two 'get's is still faster than iterating over a hashmap + +TRACE_1("Vehicle explosion handled, passing damage",_newDamages); +_this set [1, _newDamages]; +_this diff --git a/addons/hitpoints/functions/fnc_wrapJoint.sqf b/addons/hitpoints/functions/fnc_wrapJoint.sqf new file mode 100644 index 000000000..4ece8d7d1 --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapJoint.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(wrapJoint), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_wrapJointLocal.sqf b/addons/hitpoints/functions/fnc_wrapJointLocal.sqf new file mode 100644 index 000000000..82ff51340 --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapJointLocal.sqf @@ -0,0 +1,50 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Callback to wrap a splint on a bodypart + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + + * Return Value: + * None + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_wrapJoint + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _jointArray = GET_JOINTS(_patient); +private _jointGroupIndex = switch (true) do { +case (_partIndex in [4, 5]): { 0 }; +case (_partIndex in [6, 7]): { 1 }; +case (_partIndex in [8, 9]): { 2 }; +case (_partIndex in [10, 11]): { 3 }; +default { -1 }; +}; + +private _limbJointStatus = _jointArray select _jointGroupIndex; +private _selectedJointIndexes = if (["upper", _bodyPart] call BIS_fnc_inString) then { + [0, 1] +} else { + [1, 2] +}; +{ + private _jointInjury = _limbJointStatus select _x; + if (_jointInjury in [7, 8]) exitWith { + _limbJointStatus set [_x, _jointInjury + 3]; + [_patient] call EFUNC(misc,updateDamageEffects); + private _delay = random [300, 450, 600]; + [{ + params ["_x", "_patient", "_limbJointStatus"]; + _limbJointStatus set [_x, 0]; + [_patient] call EFUNC(misc,updateDamageEffects); + }, [_x, _patient, _limbJointStatus], _delay] call CBA_fnc_waitAndExecute; + }; +} forEach _selectedJointIndexes; + diff --git a/addons/hitpoints/functions/fnc_wrapSplint.sqf b/addons/hitpoints/functions/fnc_wrapSplint.sqf new file mode 100644 index 000000000..224958ee9 --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapSplint.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Callback to wrap a splint on a bodypart + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + + * Return Value: + * None + * + * Example: + * [player, "rightleg"] call kat_hitpoints_fnc_wrapSplint + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; + +private _fractures = GET_FRACTURES(_patient); +_fractures set [_partIndex, -2]; +_patient setVariable [VAR_FRACTURES, _fractures, true]; diff --git a/addons/hitpoints/functions/fnc_wrapWound.sqf b/addons/hitpoints/functions/fnc_wrapWound.sqf new file mode 100644 index 000000000..9ecc016a9 --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapWound.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(wrapWound), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_wrapWoundCoag.sqf b/addons/hitpoints/functions/fnc_wrapWoundCoag.sqf new file mode 100644 index 000000000..49bdbbd3a --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapWoundCoag.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Fully heals a fracture on the selected limb. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_closedReduction + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(wrapWoundCoag), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hitpoints/functions/fnc_wrapWoundCoagLocal.sqf b/addons/hitpoints/functions/fnc_wrapWoundCoagLocal.sqf new file mode 100644 index 000000000..c37eea8dc --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapWoundCoagLocal.sqf @@ -0,0 +1,74 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore, + * Function to wrap all wrappable wounds on a specified body part + * + * Arguments: + * 0: The Unit + * 1: Body part ("Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg") + * + * Return Value: + * True if at least one wound was wrapped, otherwise false + * + * Example: + * [player, "RightLeg"] call kat_hitpoints_fnc_wrapWound + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _bandagedWounds = GET_COAGED_WOUNDS(_patient); +private _wrappedWounds = _patient getVariable [VAR_WRAPPED_WOUNDS, createHashMap]; +private _wounds = _bandagedWounds getOrDefault [_bodyPart, []]; +TRACE_1("WrapAllWounds1",_wounds); +private _wrappedAny = false; + +private _newBandagedWounds = []; +private _newWrappedWounds = _wrappedWounds getOrDefault [_bodyPart, []]; + +{ + _x params ["_id", "_amount", "_bleeding", "_damage", "_bandage"]; + TRACE_4("aaa",_id,_amount,_bleeding,_bandage); + private _classIndex = _id / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + if (("BloodClot" in _bandage) && (_className != "InternalBleeding")) then { + // Create wrapped wound + private _newClassID = _id + 0.01; + private _newBandage = _bandage + "_wrapped"; + private _newWound = [_newClassID, _amount, _bleeding, _damage, _newBandage]; + + TRACE_2("Wound Before/After Wrap",_x,_newWound); + + // Add to wrapped wounds + _newWrappedWounds pushBack _newWound; + + // Call ACE handling + private _impact = 1; + private _woundIndex = count _newWrappedWounds - 1; + [_patient, _impact, _bodyPart, _woundIndex, _newWound, _newBandage, false] call EFUNC(misc,handleWrappedReopening); + + _wrappedAny = true; + } else { + _newBandagedWounds pushBack _x; // keep unwrapped wounds + }; +} forEach _wounds; + +// Update bandaged wounds +if (_newBandagedWounds isEqualTo []) then { + _bandagedWounds deleteAt _bodyPart; +} else { + _bandagedWounds set [_bodyPart, _newBandagedWounds]; +}; + +// Update wrapped wounds +if (_newWrappedWounds isNotEqualTo []) then { + _wrappedWounds set [_bodyPart, _newWrappedWounds]; +}; + +// Store updated variables +_patient setVariable [VAR_COAGED_WOUNDS, _bandagedWounds, true]; +_patient setVariable [VAR_WRAPPED_WOUNDS, _wrappedWounds, true]; + +_wrappedAny \ No newline at end of file diff --git a/addons/hitpoints/functions/fnc_wrapWoundLocal.sqf b/addons/hitpoints/functions/fnc_wrapWoundLocal.sqf new file mode 100644 index 000000000..4fdfc5247 --- /dev/null +++ b/addons/hitpoints/functions/fnc_wrapWoundLocal.sqf @@ -0,0 +1,73 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore, + * Function to wrap all wrappable wounds on a specified body part + * + * Arguments: + * 0: The Unit + * 1: Body part ("Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg") + * + * Return Value: + * True if at least one wound was wrapped, otherwise false + * + * Example: + * [player, "RightLeg"] call kat_hitpoints_fnc_wrapWound + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); +private _wrappedWounds = _patient getVariable [VAR_WRAPPED_WOUNDS, createHashMap]; +private _wounds = _bandagedWounds getOrDefault [_bodyPart, []]; +TRACE_1("WrapAllWounds1",_wounds); + +private _includedTypes = ["Compressed_Gauze", "fourByfour_Gauze", "Burn_Dressing", "Hemostatic_Gauze"]; +private _wrappedAny = false; + +private _newBandagedWounds = []; +private _newWrappedWounds = _wrappedWounds getOrDefault [_bodyPart, []]; + +{ + _x params ["_id", "_amount", "_bleeding", "_damage", "_bandage"]; + + if (_bandage in _includedTypes) then { + // Create wrapped wound + private _newClassID = _id + 0.01; + private _newBandage = _bandage + "_wrapped"; + private _newWound = [_newClassID, _amount, _bleeding, _damage, _newBandage]; + + TRACE_2("Wound Before/After Wrap",_x,_newWound); + + // Add to wrapped wounds + _newWrappedWounds pushBack _newWound; + + // Call ACE handling + private _impact = 1; + private _woundIndex = count _newWrappedWounds - 1; + [_patient, _impact, _bodyPart, _woundIndex, _newWound, _newBandage, false] call EFUNC(misc,handleWrappedReopening); + + _wrappedAny = true; + } else { + _newBandagedWounds pushBack _x; // keep unwrapped wounds + }; +} forEach _wounds; + +// Update bandaged wounds +if (_newBandagedWounds isEqualTo []) then { + _bandagedWounds deleteAt _bodyPart; +} else { + _bandagedWounds set [_bodyPart, _newBandagedWounds]; +}; + +// Update wrapped wounds +if (_newWrappedWounds isNotEqualTo []) then { + _wrappedWounds set [_bodyPart, _newWrappedWounds]; +}; + +// Store updated variables +_patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; +_patient setVariable [VAR_WRAPPED_WOUNDS, _wrappedWounds, true]; + +_wrappedAny \ No newline at end of file diff --git a/addons/hitpoints/initSettings.inc.sqf b/addons/hitpoints/initSettings.inc.sqf new file mode 100644 index 000000000..6c7d48c4a --- /dev/null +++ b/addons/hitpoints/initSettings.inc.sqf @@ -0,0 +1,263 @@ +[ + QGVAR(armorEffectivness), + "SLIDER", + [LSTRING(armorEffectivness_DisplayName), LSTRING(armorEffectivness_Description)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Armor)], + [0.5, 2, 1, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(longTermBandages), + "CHECKBOX", + [LLSTRING(SETTING_longTermBandages), LLSTRING(SETTING_longTermBandages_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(woundWrapTime), + "SLIDER", + [LSTRING(WoundWrapTime_DisplayName), LSTRING(WoundWrapTime_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [2, 16, 4, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeHastyTourniquet), + "SLIDER", + [LSTRING(TreatmentTimeHastyTourniquet_DisplayName), LSTRING(TreatmentTimeHastyTourniquet_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0.1, 60, 7, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeTrainedHastyTourniquet), + "SLIDER", + [LSTRING(TreatmentTimeTrainedHastyTourniquet_DisplayName), LSTRING(TreatmentTimeTrainedHastyTourniquet_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0.1, 60, 7, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeDelibrateTourniquet), + "SLIDER", + [LSTRING(TreatmentTimeDelibrateTourniquet_DisplayName), LSTRING(TreatmentTimeDelibrateTourniquet_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0.1, 60, 7, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeTrainedDelibrateTourniquet), + "SLIDER", + [LSTRING(TreatmentTimeTrainedDelibrateTourniquet_DisplayName), LSTRING(TreatmentTimeTrainedDelibrateTourniquet_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0.1, 60, 7, 1], + true +] call CBA_fnc_addSetting; + + +[ + QGVAR(ArterialChance), + "SLIDER", + [LLSTRING(SETTING_ArterialChance), LLSTRING(SETTING_ArterialChance_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [0, 100, 1.5, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(damageEffectThreshold), + "SLIDER", + [LLSTRING(SETTING_EffectDamageThreshold), LLSTRING(SETTING_EffectDamageThreshold_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [1, 40, 15, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(InternalBleedingEnable), + "CHECKBOX", + [LLSTRING(SETTING_InternalBleedingEnable), LLSTRING(SETTING_InternalBleedingEnable_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(InternalBleedingChance), + "SLIDER", + [LLSTRING(SETTING_InternalBleedingChance), LLSTRING(SETTING_InternalBleedingChance_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [0, 100, 10, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(CatastrophicEnable), + "CHECKBOX", + [LLSTRING(SETTING_ENABLE),LLSTRING(SETTING_ENABLE_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(EviscerationChance), + "SLIDER", + LLSTRING(EviscerationChance), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [0, 100, 5, 0], + true +] call CBA_fnc_addSetting; + + +[ + QGVAR(EviscerationDamageThreshold), + "SLIDER", + [LLSTRING(Evisceration_DAMAGE_THRESHOLD), LLSTRING(Evisceration_DAMAGE_THRESHOLD_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [0, 3, 1.5, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(EviscerationDamageThreshold_TakenDamage), + "CHECKBOX", + [LLSTRING(SETTING_EviscerationDamageThreshold_DamageTaken), LLSTRING(SETTING_EviscerationDamageThreshold_DamageTaken_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(PelvicFractureChance), + "SLIDER", + LLSTRING(PelvicChance), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [0, 100, 5, 0], + true +] call CBA_fnc_addSetting; + + +[ + QGVAR(PelvicDamageThreshold), + "SLIDER", + [LLSTRING(Pelvic_DAMAGE_THRESHOLD), LLSTRING(Pelvic_DAMAGE_THRESHOLD_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [0, 6, 3, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(PelvicDamageThreshold_TakenDamage), + "CHECKBOX", + [LLSTRING(SETTING_PelvicDamageThreshold_DamageTaken), LLSTRING(SETTING_PelvicDamageThreshold_DamageTaken_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Catastrophic_Injuries)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(JointChance), + "SLIDER", + LLSTRING(JointChance), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [0, 100, 5, 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(JointDamageThreshold), + "SLIDER", + [LLSTRING(Joint_DAMAGE_THRESHOLD), LLSTRING(Joint_DAMAGE_THRESHOLD_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [0, 3, 1.5, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(JointDamageThreshold_TakenDamage), + "CHECKBOX", + [LLSTRING(SETTING_JointDamageThreshold_DamageTaken), LLSTRING(SETTING_JointDamageThreshold_DamageTaken_DESC)], + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(JointCareLevel), + "LIST", + LLSTRING(JOINT_CARE_MEDLEVEL), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(iceTime), + "SLIDER", + LLSTRING(ICE_TIMER), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [0,100,10,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(wrapTime), + "SLIDER", + LLSTRING(WRAP_TIMER), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [0,100,10,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(stabilizeTime), + "SLIDER", + LLSTRING(STABILIZE_TIMER), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [0,100,10,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(reduceTime), + "SLIDER", + LLSTRING(REDUCE_TIMER), + [CBA_SETTINGS_CAT, LSTRING(Subcatagory_Joints)], + [0,100,10,0], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(removalTimeETD), + "SLIDER", + [LSTRING(removalTimeETD_DisplayName), LSTRING(removalTimeETD_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [2, 16, 8, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(removalTimeIsraeli), + "SLIDER", + [LSTRING(removalTimeIsraeli_DisplayName), LSTRING(removalTimeIsraeli_Description)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [2, 16, 6, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(hardcorePressure), + "CHECKBOX", + [LLSTRING(SETTING_hardcorePressure), LLSTRING(SETTING_hardcorePressure_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_Settings_fnc_init; \ No newline at end of file diff --git a/addons/hitpoints/script_component.hpp b/addons/hitpoints/script_component.hpp new file mode 100644 index 000000000..f668c1595 --- /dev/null +++ b/addons/hitpoints/script_component.hpp @@ -0,0 +1,116 @@ +#define COMPONENT hitpoints +#define COMPONENT_BEAUTIFIED KAT - Hitpoints +#include "\x\kat\addons\main\script_mod.hpp" +#include "\x\kat\addons\gui\gui_defines.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_MAIN + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_MAIN + #define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN +#endif + +#include "\x\kat\addons\main\script_macros.hpp" + +#undef HITPOINT_INDEX_BODY +#undef HITPOINT_INDEX_LARM +#undef HITPOINT_INDEX_RARM +#undef HITPOINT_INDEX_LLEG +#undef HITPOINT_INDEX_RLEG + +#undef DEFAULT_TOURNIQUET_VALUES +#undef DEFAULT_FRACTURE_VALUES +#undef DEFAULT_BODYPART_DAMAGE_VALUES + +#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +#define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +#define DEFAULT_BODYPART_DAMAGE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] + +#undef IDC_BODY_HEAD +#undef IDC_BODY_NECK +#undef IDC_BODY_TORSO +#undef IDC_BODY_CHEST +#undef IDC_BODY_ARMLEFT +#undef IDC_BODY_ARMUPPERLEFT +#undef IDC_BODY_ARMRIGHT +#undef IDC_BODY_ARMUPPERRIGHT +#undef IDC_BODY_LEGLEFT +#undef IDC_BODY_LEGUPPERLEFT +#undef IDC_BODY_LEGRIGHT +#undef IDC_BODY_LEGUPPERRIGHT +#undef IDC_BODY_ARMLEFT_T +#undef IDC_BODY_ARMUPPERLEFT_T +#undef IDC_BODY_ARMRIGHT_T +#undef IDC_BODY_ARMUPPERRIGHT_T +#undef IDC_BODY_LEGLEFT_T +#undef IDC_BODY_LEGUPPERLEFT_T +#undef IDC_BODY_LEGRIGHT_T +#undef IDC_BODY_LEGUPPERRIGHT_T +#undef IDC_BODY_ARMLEFT_B +#undef IDC_BODY_ARMUPPERLEFT_B +#undef IDC_BODY_ARMRIGHT_B +#undef IDC_BODY_ARMUPPERRIGHT_B +#undef IDC_BODY_LEGLEFT_B +#undef IDC_BODY_LEGUPPERLEFT_B +#undef IDC_BODY_LEGRIGHT_B +#undef IDC_BODY_LEGUPPERRIGHT_B +#undef IDC_BODY_GROUP_S +#undef IDC_BODY_HEAD_S +#undef IDC_BODY_NECK_S +#undef IDC_BODY_TORSO_S +#undef IDC_BODY_CHEST_S +#undef IDC_BODY_ARMLEFT_S +#undef IDC_BODY_ARMUPPERLEFT_S +#undef IDC_BODY_ARMRIGHT_S +#undef IDC_BODY_ARMUPPERRIGHT_S +#undef IDC_BODY_LEGLEFT_S +#undef IDC_BODY_LEGUPPERLEFT_S +#undef IDC_BODY_LEGRIGHT_S +#undef IDC_BODY_LEGUPPERRIGHT_S + +#define IDC_BODY_HEAD 6005 +#define IDC_BODY_NECK 6006 +#define IDC_BODY_TORSO 6010 +#define IDC_BODY_CHEST 6011 +#define IDC_BODY_ARMLEFT 6015 +#define IDC_BODY_ARMUPPERLEFT 6016 +#define IDC_BODY_ARMRIGHT 6020 +#define IDC_BODY_ARMUPPERRIGHT 6021 +#define IDC_BODY_LEGLEFT 6025 +#define IDC_BODY_LEGUPPERLEFT 6026 +#define IDC_BODY_LEGRIGHT 6030 +#define IDC_BODY_LEGUPPERRIGHT 6031 +#define IDC_BODY_ARMLEFT_T 6035 +#define IDC_BODY_ARMUPPERLEFT_T 6035 +#define IDC_BODY_ARMRIGHT_T 6040 +#define IDC_BODY_ARMUPPERRIGHT_T 6040 +#define IDC_BODY_LEGLEFT_T 6045 +#define IDC_BODY_LEGUPPERLEFT_T 6046 +#define IDC_BODY_LEGRIGHT_T 6050 +#define IDC_BODY_LEGUPPERRIGHT_T 6051 +#define IDC_BODY_ARMLEFT_B 6055 +#define IDC_BODY_ARMUPPERLEFT_B 6056 +#define IDC_BODY_ARMRIGHT_B 6060 +#define IDC_BODY_ARMUPPERRIGHT_B 6061 +#define IDC_BODY_LEGLEFT_B 6065 +#define IDC_BODY_LEGUPPERLEFT_B 6066 +#define IDC_BODY_LEGRIGHT_B 6070 +#define IDC_BODY_LEGUPPERRIGHT_B 6071 +#define IDC_BODY_GROUP_S 6075 +#define IDC_BODY_HEAD_S 6080 +#define IDC_BODY_NECK_S 6081 +#define IDC_BODY_TORSO_S 6085 +#define IDC_BODY_CHEST_S 6086 +#define IDC_BODY_ARMLEFT_S 6090 +#define IDC_BODY_ARMUPPERLEFT_S 6091 +#define IDC_BODY_ARMRIGHT_S 6095 +#define IDC_BODY_ARMUPPERRIGHT_S 6096 +#define IDC_BODY_LEGLEFT_S 6100 +#define IDC_BODY_LEGUPPERLEFT_S 6101 +#define IDC_BODY_LEGRIGHT_S 6105 +#define IDC_BODY_LEGUPPERRIGHT_S 6106 diff --git a/addons/hitpoints/stringtable.xml b/addons/hitpoints/stringtable.xml new file mode 100644 index 000000000..546fdfe50 --- /dev/null +++ b/addons/hitpoints/stringtable.xml @@ -0,0 +1,652 @@ + + + + + Torso + + + Torso + + + Chest + + + Neck + + + Head + + + Left Arm + + + Upper Left Arm + + + Right Arm + + + Upper Right Arm + + + Left Leg + + + Upper Left Leg + + + Right Leg + + + Upper Right Leg + + + Select Head + + + Select Neck + + + Select Chest + + + Select Torso + + + Select Lower Left Arm + + + Select Upper Left Arm + + + Select Lower Right Arm + + + Select Upper Right Arm + + + Select Lower Left Leg + + + Select Upper Left Leg + + + Select Lower Right Leg + + + Select Upper Right Leg + + + Triage Card + Štítek + Fiche de triage + Tarjeta de clasificación + Scheda Triage + Karta segregacyjna + Cartão de Triagem + Медкарта + Triagekarte + 부상자 분류 카드 + トリアージカード + 檢傷分類卡 + 分诊卡 + Triyaj Kartı + Orvosi lap + + + Bandage: Hemostatic Injector + + + Injecting Hemostatic Granules + + + Hemostatic Injector with CELOX granules + + + Injector loaded with Hemostatic granules for penetrating wounds + + + Hemostatic Injector (CELOX) + + + Elastic Bandage for Wrapping Packed Wounds and Splints + + + Elastic Bandage for Wrapping Packed Wounds and Splints + + + Bandage: Elastic Wrapping Bandage + + + Wrap Wounds (Elastic) + + + Wrap Splint + + + Wrapping Wounds + + + Wrapping Splint + + + 4X4 Gauze Sponge for Small Wounds + + + 4X4 Gauze Sponge for Small Wounds + + + Bandage: 4X4 Gauze Sponge + + + Apply Gauze Sponge + + + Applying Gauze Sponge + + + Compressed Gauze for Packing Large Wounds + + + Compressed Gauze for Packing Large Wounds + + + Bandage: Compressed Packing Gauze + + + Pack Wound + + + Packing Wound + + + Roller Gauze for Wrapping Packed Wounds + + + Roller Gauze for Wrapping Packed Wounds + + + Bandage: Roller Gauze + + + Wrap Wounds (Gauze) + + + Wrapping Wounds + + + Wrap Coagulated Wounds (Gauze) + + + Wrapping Coagulated Wounds + + + Abdominal Pad for Extremely Large Wounds On the Torso + + + Abdominal Pad for Extremely Large Wounds On the Torso + + + Bandage: Abdominal Pad + + + Apply Abdominal Pad + + + Applying Abdominal Pad + + + Emergency Trauma Dressing for Extremely Large Amounts of Wounds + + + Emergency Trauma Dressing for Extremely Large Amounts of Wounds + + + Emergency Trauma Dressing + + + Apply Emergency Trauma Dressing + + + Applying Emergency Trauma Dressing + + + Israeli Bandage for General Use + + + Israeli Bandage for General Use + + + Bandage: Israeli Bandage + + + Apply Israeli Bandage + + + Applying Israeli Bandage + + + Splint Fell Off + + + Hemostatic Gauze for Heavily Bleeding Wounds + + + Hemostatic Gauze for Heavily Bleeding Wounds + + + Bandage: Hemostatic Gauze + + + Apply Hemostatic Gauze + + + Applying Hemostatic Gauze + + + Adhesive Bandage for Cuts and Scrapes + + + Adhesive Bandage for Cuts and Scrapes + + + Bandage: Adhesive Bandage + + + Apply Adhesive Bandage + + + Applying Adhesive Bandage + + + Burn Dressing for Burns + + + Burn Dressing for Burns + + + Bandage: Burn Dressing + + + Apply Burn Dressing + + + Applying Burn Dressing + + + Light Bruising + + + Medium Bruising + + + Heavy Bruising + + + No Bruising + + + Check Body + + + Checking Body + + + KAT - ADV Medical: Hitpoints + + + Time to Check Body + + + Time it takes to check a body part for internal bleeding + + + Time, in seconds, required to wrap a single wound. + + + Wound Wrap Time + + + Stop Applying Pressure + + + Started Applying Pressure + + + Stopped Applying Pressure + + + Apply Pressure to Limb + + + + + + Enable Catastrophic Injuries + + + Catastrophic Injuries + + + Enables Catastrophic Injuries such as Eviscerations, Amputations, and others + + + Percent chance of an Evisceration happening + + + Evisceration Damage Threshold + + + Damage Threshold to cause an Evisceration + + + Increase Evisceration chance based on damage + + + Increase chance of a Evisceration occurring based on damage taken if over the Evisceration damage threshold + + + Evisceration + + + Wound Pack Applied + + + Wound Vac Applied + + + Arterial Bleed Chance + + + Chance for a wound to be an arterial bleed (10% - 45% worse bleeding) + + + Percent chance of an Joint Injury happening + + + Joint Injury Damage Threshold + + + Damage Threshold to cause a Joint Injury + + + Increase Joint Injury chance based on damage + + + Increase chance of a Joint Injury occurring based on damage taken if over the Joint Injury damage threshold + + + Ice Pack for Sprains and Strains + + + Ice Pack for Sprains and Strains + + + Ice Pack + + + Apply Ice Pack + + + Applying Ice Pack + + + Strained + + + Sprained + + + Dislocated + + + Shoulder + + + Elbow + + + Wrist + + + Hip + + + Knee + + + Ankle + + + Check Joints + + + Checking Joints + + + %1 has found a %2 %3 on the %4 + + + Pelvic Binder for securing Pelvic Injuries + + + Pelvic Binder for securing Pelvic Injuries + + + Pelvic Binder + + + Wrap Joint + + + Wrapping Joint + + + Iced Strained + + + Iced Sprained + + + Stabilised Dislocated + + + Inflamed Strained + + + Inflamed Sprained + + + Reduced Dislocated + + + Wrapped Strained + + + Wrapped Sprained + + + Stabilize Joint + + + Stabilizing Joint + + + Reduce Joint + + + Reducing Joint + + + Joint Injuries + + + Time to ice a joint + + + Time to wrap a joint + + + Time to stabilize a joint + + + Time to reduce a joint + + + Med Level to take care of joint injuries + + + Percent chance of a Pelvic Fracture happening + + + Pelvic Fracture Damage Threshold + + + Damage Threshold to cause an Pelvic Fracture + + + Increase Pelvic Fracture chance based on damage + + + Increase chance of a Pelvic Fracture occurring based on damage taken if over the Pelvic Fracture damage threshold + + + Bind Pelvis + + + Binding Pelvis + + + %1 has found a Pelvic Fracture + + + %1 has found a Stabilized Pelvic Fracture + + + %1 did not find a Pelvic Fracture + + + Enable Internal Bleeding + + + Turns on internal bleeding as a wound type + + + Chance Internal Bleeding + + + Percentage for a wound to have underlying internal bleeding + + + Remove Israeli Bandage + + + Removing Israeli Bandage + + + Remove ETD + + + Removing ETD + + + Time, in seconds, required to remove an ETD. + + + ETD Removal Time + + + Time, in seconds, required to remove an Israeli Bandage. + + + Israeli Bandage Removal Time + + + Apply Hasty Tourniquet + + + Applying Hasty Tourniquet... + + + Apply Delibrate Tourniquet + + + Applying Delibrate Tourniquet... + + + Time, in seconds, required to apply a Delibrate tourniquet. + + + Delibrate Tourniquet Treatment Time + + + Time, in seconds, required to apply a Hasty tourniquet. + + + Hasty Tourniquet Treatment Time + + + Time, in seconds, required for a unit exceeding required training level to apply a Hasty tourniquet. + + + Skilled Hasty Tourniquet Treatment Time + + + Time, in seconds, required for a unit exceeding required training level to apply a Delibrate tourniquet. + + + Skilled Delibrate Tourniquet Treatment Time + + + Convert Hasty Tourniquet + + + Converting Hasty Tourniquet... + + + %1 converted a Tourniquet + + + Armor Effectivness Multiplier + + + How effective armor is, higher is stronger + + + Armor + + + Inflamed Joint + + + Long Term Bandages + + + Greatly increases the time it takes for a wrapped bandage to fall off. Balanced around persistant missions where a stich kit is not often used + + + Hardcore Pressure + + + Causes pressure to take up all actions, rather then just a time penalty + + + Someone is already applying pressure + + + Started Applying Pressure + + + Stopped Applying Pressure + + + Pressure Applied + + + Damage Effect threshold + + + When damage is above this level, certain actions/treatments will fail and IV fluids will not flow + + + diff --git a/addons/hitpoints/ui/4X4_Gauze.paa b/addons/hitpoints/ui/4X4_Gauze.paa new file mode 100644 index 000000000..710580b16 Binary files /dev/null and b/addons/hitpoints/ui/4X4_Gauze.paa differ diff --git a/addons/hitpoints/ui/Abdominal_Pad.paa b/addons/hitpoints/ui/Abdominal_Pad.paa new file mode 100644 index 000000000..92800527e Binary files /dev/null and b/addons/hitpoints/ui/Abdominal_Pad.paa differ diff --git a/addons/hitpoints/ui/Adhesive_Bandage.paa b/addons/hitpoints/ui/Adhesive_Bandage.paa new file mode 100644 index 000000000..b74a293a8 Binary files /dev/null and b/addons/hitpoints/ui/Adhesive_Bandage.paa differ diff --git a/addons/hitpoints/ui/Burn_Dressing.paa b/addons/hitpoints/ui/Burn_Dressing.paa new file mode 100644 index 000000000..ed9e9e97b Binary files /dev/null and b/addons/hitpoints/ui/Burn_Dressing.paa differ diff --git a/addons/hitpoints/ui/Compressed_Gauze.paa b/addons/hitpoints/ui/Compressed_Gauze.paa new file mode 100644 index 000000000..86041ea2a Binary files /dev/null and b/addons/hitpoints/ui/Compressed_Gauze.paa differ diff --git a/addons/hitpoints/ui/ETD.paa b/addons/hitpoints/ui/ETD.paa new file mode 100644 index 000000000..2648ba457 Binary files /dev/null and b/addons/hitpoints/ui/ETD.paa differ diff --git a/addons/hitpoints/ui/Elastic_Wrap.paa b/addons/hitpoints/ui/Elastic_Wrap.paa new file mode 100644 index 000000000..cde87d454 Binary files /dev/null and b/addons/hitpoints/ui/Elastic_Wrap.paa differ diff --git a/addons/hitpoints/ui/Hemostatic_Gauze.paa b/addons/hitpoints/ui/Hemostatic_Gauze.paa new file mode 100644 index 000000000..f70e47c16 Binary files /dev/null and b/addons/hitpoints/ui/Hemostatic_Gauze.paa differ diff --git a/addons/hitpoints/ui/Ice_Pack.paa b/addons/hitpoints/ui/Ice_Pack.paa new file mode 100644 index 000000000..0e8b38607 Binary files /dev/null and b/addons/hitpoints/ui/Ice_Pack.paa differ diff --git a/addons/hitpoints/ui/Israeli_Bandage.paa b/addons/hitpoints/ui/Israeli_Bandage.paa new file mode 100644 index 000000000..056f10655 Binary files /dev/null and b/addons/hitpoints/ui/Israeli_Bandage.paa differ diff --git a/addons/hitpoints/ui/Pelvic_Binder.paa b/addons/hitpoints/ui/Pelvic_Binder.paa new file mode 100644 index 000000000..12749fa49 Binary files /dev/null and b/addons/hitpoints/ui/Pelvic_Binder.paa differ diff --git a/addons/hitpoints/ui/Roller_Gauze.paa b/addons/hitpoints/ui/Roller_Gauze.paa new file mode 100644 index 000000000..049685b90 Binary files /dev/null and b/addons/hitpoints/ui/Roller_Gauze.paa differ diff --git a/addons/hitpoints/ui/cross.paa b/addons/hitpoints/ui/cross.paa new file mode 100644 index 000000000..b9b4015eb Binary files /dev/null and b/addons/hitpoints/ui/cross.paa differ diff --git a/addons/hitpoints/ui/hemostat.paa b/addons/hitpoints/ui/hemostat.paa new file mode 100644 index 000000000..91e68b4e9 Binary files /dev/null and b/addons/hitpoints/ui/hemostat.paa differ diff --git a/addons/hitpoints/ui/triage_card.paa b/addons/hitpoints/ui/triage_card.paa new file mode 100644 index 000000000..0a1865fc9 Binary files /dev/null and b/addons/hitpoints/ui/triage_card.paa differ diff --git a/addons/hypothermia/ACE_Medical_Treatment_Actions.hpp b/addons/hypothermia/ACE_Medical_Treatment_Actions.hpp index 156155112..436552b90 100644 --- a/addons/hypothermia/ACE_Medical_Treatment_Actions.hpp +++ b/addons/hypothermia/ACE_Medical_Treatment_Actions.hpp @@ -7,7 +7,7 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(GVAR(hypothermiaActive)); treatmentLocations = 0; treatmentTime = 5; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg","RightLeg", "Body"}; items[] = {"kat_handWarmer"}; callbackSuccess = QFUNC(useHandWarmer); }; @@ -15,18 +15,18 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Apply_Warmer); displayNameProgress = CSTRING(perform); category = "advanced"; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"Chest", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg", "Neck"}; medicRequired = QACEGVAR(medical_treatment,medicIV); treatmentTime = 10; items[] = {"kat_fluidWarmer"}; - condition = QUOTE(([ARR_3(_medic,_patient,_bodyPart)] call EFUNC(pharma,removeIV)) && !([ARR_2(_patient,_bodyPart)] call FUNC(removeWarmer)) && GVAR(hypothermiaActive)); + condition = QUOTE(([ARR_3(_medic,_patient,_bodyPart)] call EFUNC(pharma,removeIVCheck)) && !([ARR_2(_patient,_bodyPart)] call FUNC(removeWarmer)) && GVAR(hypothermiaActive)); callbackSuccess = QFUNC(applyFluidWarmer); }; class RemoveFluidWarmer: BasicBandage { displayName = CSTRING(Remove_Warmer); displayNameProgress = CSTRING(perform); category = "advanced"; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"Chest", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg", "Neck"}; medicRequired = QACEGVAR(medical_treatment,medicIV); treatmentTime = 10; items[] = {}; @@ -37,9 +37,41 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Check_Temperature); displayNameProgress = CSTRING(Check_Temperature_Progress); category = "examine"; - allowedSelections[] = {"Head"}; + allowedSelections[] = {"Head","UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; treatmentTime = 3; condition = QUOTE(GVAR(hypothermiaActive)); callbackSuccess = QFUNC(checkTemperature); }; + class CheckTemperatureThermo: CheckPulse { + displayName = CSTRING(Check_TemperatureThermo); + displayNameProgress = CSTRING(Check_TemperatureThermo_Progress); + category = "examine"; + allowedSelections[] = {"UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + treatmentTime = 10; + items[] = {"kat_thermometer"}; + condition = QUOTE(GVAR(hypothermiaActive)); + callbackSuccess = QFUNC(checkTemperatureThermo); + }; + class ApplySpaceBlanket: BasicBandage { + displayName = CSTRING(Apply_SpaceBlanket); + displayNameProgress = CSTRING(perform); + category = "advanced"; + allowedSelections[] = {"All"}; + medicRequired = 0; + treatmentTime = 10; + items[] = {"kat_spaceBlanket"}; + condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call FUNC(removeBlanket)) && GVAR(hypothermiaActive)); + callbackSuccess = QFUNC(applySpaceBlanket); + }; + class RemoveSpaceBlanket: BasicBandage { + displayName = CSTRING(Remove_SpaceBlanket); + displayNameProgress = CSTRING(perform); + category = "advanced"; + allowedSelections[] = {"All"}; + medicRequired = 0; + treatmentTime = 4; + items[] = {}; + condition = QUOTE([ARR_2(_patient,_bodyPart)] call FUNC(removeBlanket) && GVAR(hypothermiaActive)); + callbackSuccess = QFUNC(removeSpaceBlanket); + }; }; diff --git a/addons/hypothermia/CfgVehicles.hpp b/addons/hypothermia/CfgVehicles.hpp index c5990b39a..c3452de83 100644 --- a/addons/hypothermia/CfgVehicles.hpp +++ b/addons/hypothermia/CfgVehicles.hpp @@ -14,7 +14,7 @@ class CfgVehicles { class ACE_MainActions { class KAT_CheckHandWarmers { displayName = CSTRING(Check_Hand_Warmers); - condition = QUOTE(GVAR(hypothermiaActive)); + condition = QUOTE([ARR_2(_player,_player)] call FUNC(handWarmersCheck)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkHandWarmers)); icon = QACEPATHTOF(medical_gui,ui\cross.paa); }; @@ -25,7 +25,7 @@ class CfgVehicles { class KAT_Equipment { class KAT_CheckHandWarmersSelf { displayName = CSTRING(Check_Hand_Warmers); - condition = QUOTE(GVAR(hypothermiaActive)); + condition = QUOTE([ARR_2(_player,_player)] call FUNC(handWarmersCheck)); statement = QUOTE([ARR_2(_player,_player)] call FUNC(checkHandWarmers)); icon = QACEPATHTOF(medical_gui,ui\cross.paa); }; diff --git a/addons/hypothermia/CfgWeapons.hpp b/addons/hypothermia/CfgWeapons.hpp index 25bb1d750..58806cbbb 100644 --- a/addons/hypothermia/CfgWeapons.hpp +++ b/addons/hypothermia/CfgWeapons.hpp @@ -24,4 +24,25 @@ class CfgWeapons { mass = 1; }; }; + class kat_spaceBlanket: ACE_ItemCore { + scope = 2; + displayName = CSTRING(spaceBlanket_displayName); + picture = QPATHTOF(ui\spaceBlanket.paa); + model = "\A3\Structures_F_EPA\Items\Medical\HeatPack_F.p3d"; + descriptionShort = CSTRING(spaceBlanket_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_thermometer: ACE_ItemCore { + scope = 2; + displayName = CSTRING(thermometer_displayName); + picture = QPATHTOF(ui\thermometer.paa); + descriptionShort = CSTRING(thermometer_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; }; diff --git a/addons/hypothermia/XEH_PREP.hpp b/addons/hypothermia/XEH_PREP.hpp index 7469488a6..6cf3adffe 100644 --- a/addons/hypothermia/XEH_PREP.hpp +++ b/addons/hypothermia/XEH_PREP.hpp @@ -1,12 +1,20 @@ PREP(applyFluidWarmer); PREP(applyFluidWarmerLocal); +PREP(applySpaceBlanket); +PREP(applySpaceBlanketLocal); PREP(checkHandWarmers); PREP(checkTemperature); +PREP(checkTemperatureThermo); PREP(fullHealLocal); +PREP(gui_updateInjuryListPart); +PREP(handWarmersCheck); PREP(handleRespawn); PREP(init); +PREP(removeBlanket); PREP(removeFluidWarmer); PREP(removeFluidWarmerLocal); +PREP(removeSpaceBlanket); +PREP(removeSpaceBlanketLocal); PREP(removeWarmer); PREP(useHandWarmer); PREP(useHandWarmerLocal); \ No newline at end of file diff --git a/addons/hypothermia/XEH_postInit.sqf b/addons/hypothermia/XEH_postInit.sqf index db2503afa..3ad198c37 100644 --- a/addons/hypothermia/XEH_postInit.sqf +++ b/addons/hypothermia/XEH_postInit.sqf @@ -3,6 +3,25 @@ [QGVAR(useHandWarmer), LINKFUNC(useHandWarmerLocal)] call CBA_fnc_addEventHandler; [QGVAR(applyFluidWarmer), LINKFUNC(applyFluidWarmerLocal)] call CBA_fnc_addEventHandler; [QGVAR(removeFluidWarmer), LINKFUNC(removeFluidWarmerLocal)] call CBA_fnc_addEventHandler; - +[QGVAR(applySpaceBlanket), LINKFUNC(applySpaceBlanketLocal)] call CBA_fnc_addEventHandler; +[QGVAR(removeSpaceBlanket), LINKFUNC(removeSpaceBlanketLocal)] call CBA_fnc_addEventHandler; +[QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; -[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; \ No newline at end of file +[QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; +["ace_medical_death", { + params ["_unit"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _alive = alive _unit; + if (_alive) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _temp = _unit getVariable [QGVAR(unitTemperature), 37]; + if (_temp < 22) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _temp = _temp - 0.1; + _unit setVariable [QGVAR(unitTemperature), _temp, true]; +}, 10, [_unit]] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; diff --git a/addons/hypothermia/config.cpp b/addons/hypothermia/config.cpp index 861f2a6a3..69e1124a8 100644 --- a/addons/hypothermia/config.cpp +++ b/addons/hypothermia/config.cpp @@ -8,7 +8,9 @@ class CfgPatches { }; weapons[] = { "kat_handWarmer", - "kat_fluidWarmer" + "kat_fluidWarmer", + "kat_spaceBlanket", + "kat_thermometer" }; magazines[] = { }; requiredAddons[] = { diff --git a/addons/hypothermia/functions/fnc_applyFluidWarmerLocal.sqf b/addons/hypothermia/functions/fnc_applyFluidWarmerLocal.sqf index a13098038..0bd0ed96e 100644 --- a/addons/hypothermia/functions/fnc_applyFluidWarmerLocal.sqf +++ b/addons/hypothermia/functions/fnc_applyFluidWarmerLocal.sqf @@ -18,6 +18,6 @@ params ["_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _warmerArray = _patient getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0]]; +private _warmerArray = _patient getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]]; _warmerArray set [_partIndex, 1]; _patient setVariable [QGVAR(fluidWarmer), _warmerArray, true]; diff --git a/addons/hypothermia/functions/fnc_applySpaceBlanket.sqf b/addons/hypothermia/functions/fnc_applySpaceBlanket.sqf new file mode 100644 index 000000000..26ff27d35 --- /dev/null +++ b/addons/hypothermia/functions/fnc_applySpaceBlanket.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski.H + * Begins Remove Fluid Warmer treatment + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "RightArm", "Fluid Warmer", objNull, "kat_FluidWarmer"] call kat_hypothermia_fnc_removeFluidWarmer; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; + +[_patient, _classname] call ACEFUNC(medical_treatment,addToTriageCard); +[_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), _classname]] call ACEFUNC(medical_treatment,addToLog); + + +[QGVAR(applySpaceBlanket), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hypothermia/functions/fnc_applySpaceBlanketLocal.sqf b/addons/hypothermia/functions/fnc_applySpaceBlanketLocal.sqf new file mode 100644 index 000000000..53edcb8c8 --- /dev/null +++ b/addons/hypothermia/functions/fnc_applySpaceBlanketLocal.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call for removing a fluid warmer + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_hypothermia_fnc_removeFluidWarmerLocal; + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +_patient setVariable [QGVAR(spaceBlanket), true, true]; +if (GET_BLOOD_VOLUME_LITERS(_patient) > 4) then { + private _impact = (_patient getVariable [QGVAR(warmingImpact), 0]); + _patient setVariable [QGVAR(warmingImpact), (_impact + 3000), true]; +}; +[{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (!alive _patient || (abs (speed _patient) > 9.9 && isNull objectParent _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _patient setVariable [QGVAR(spaceBlanket), false, true]; + private _impact = (_patient getVariable [QGVAR(warmingImpact), 0]); + _patient setVariable [QGVAR(warmingImpact), (_impact - 3000), true]; + [LLSTRING(thermalBlanket_FallOff), 1.5, _patient] call ACEFUNC(common,displayTextStructured); + }; +}, 1, [_patient]] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_checkHandWarmers.sqf b/addons/hypothermia/functions/fnc_checkHandWarmers.sqf index a7f52a510..cd7291e52 100644 --- a/addons/hypothermia/functions/fnc_checkHandWarmers.sqf +++ b/addons/hypothermia/functions/fnc_checkHandWarmers.sqf @@ -18,8 +18,8 @@ params ["_player", "_target"]; -private _warmers = _target getVariable [QGVAR(handWarmers), [0,0,0,0,0,0]]; -_warmers params ["_head", "_body", "_larm", "_rarm", "_lleg", "_rleg"]; +private _warmers = _target getVariable [QGVAR(handWarmers), [0,0,0,0,0,0,0,0,0,0,0,0]]; +_warmers params ["_head", "_neck", "_chest", "_body", "_larm", "_ularm", "_rarm", "_urarm", "_lleg", "_ulleg", "_rleg", "_urleg"]; if (_player == _target) exitWith { if (({_x == 0} count _warmers) == 6) exitWith { diff --git a/addons/hypothermia/functions/fnc_checkTemperature.sqf b/addons/hypothermia/functions/fnc_checkTemperature.sqf index a7a2bb293..ceac5a3f1 100644 --- a/addons/hypothermia/functions/fnc_checkTemperature.sqf +++ b/addons/hypothermia/functions/fnc_checkTemperature.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient"]; private _unitTemperature = _patient getVariable [QGVAR(unitTemperature), 37]; switch (true) do { - case (!(alive _patient)) : { [LLSTRING(temperature_dead), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; + case (_unitTemperature < 22) : { [LLSTRING(temperature_dead), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; case (_unitTemperature < 29) : { [LLSTRING(temperature_cold), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; case (_unitTemperature < 32) : { [LLSTRING(temperature_cool), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; case (_unitTemperature < 36) : { [LLSTRING(temperature_mild), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; diff --git a/addons/hypothermia/functions/fnc_checkTemperatureThermo.sqf b/addons/hypothermia/functions/fnc_checkTemperatureThermo.sqf new file mode 100644 index 000000000..4f4e9ae27 --- /dev/null +++ b/addons/hypothermia/functions/fnc_checkTemperatureThermo.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Checks patient temperature + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_hypothermia_fnc_checkTemperature; + * + * Public: No + */ +params ["_medic", "_patient"]; + +private _unitTemperature = ceil (_patient getVariable [QGVAR(unitTemperature), 37]); + +[_patient, "quick_view", LSTRING(Thermometer_log)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(Thermometer_log), [[_patient, false, true] call ACEFUNC(common,getName), _unitTemperature]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/hypothermia/functions/fnc_fullHealLocal.sqf b/addons/hypothermia/functions/fnc_fullHealLocal.sqf index f0570e08d..2001c0168 100644 --- a/addons/hypothermia/functions/fnc_fullHealLocal.sqf +++ b/addons/hypothermia/functions/fnc_fullHealLocal.sqf @@ -20,5 +20,6 @@ TRACE_1("fullHealLocal",_patient); _patient setVariable [QGVAR(unitTemperature), 37, true]; _patient setVariable [QGVAR(warmingImpact), 0, true]; -_patient setVariable [QGVAR(handWarmers), [0,0,0,0,0,0], true]; -_patient setVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0], true]; \ No newline at end of file +_patient setVariable [QGVAR(handWarmers), [0,0,0,0,0,0,0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(spaceBlanket), false, true]; \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_gui_updateInjuryListPart.sqf b/addons/hypothermia/functions/fnc_gui_updateInjuryListPart.sqf new file mode 100644 index 000000000..75b2c3a21 --- /dev/null +++ b/addons/hypothermia/functions/fnc_gui_updateInjuryListPart.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: MiszczuZPolski + * Updates injury list for given body part for the target. + * + * Arguments: + * 0: Injury list + * 1: Target + * 2: Body part, -1 to only show overall health info + * 3: Entries + * + * Return Value: + * None + * + * Example: + * [_ctrlInjuries, _target, 0] call kat_conversion_fnc_gui_updateInjuryListPart + * + * Public: No + */ + +params ["_ctrl", "_target", "_selectionN", "_entries"]; + +if ((_target getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]] select _selectionN) > 0) then { + _entries pushBack [LLSTRING(LineWarmer), [0.35, 0.72, 0.82, 1]]; +}; +if ((_target getVariable [QGVAR(handWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]] select _selectionN) > 0) then { + _entries pushBack [LLSTRING(HandWarmer_displayName), [0.35, 0.72, 0.82, 1]]; +}; +if (_target getVariable [QGVAR(spaceBlanket), false]) then { + _entries pushBack [LLSTRING(spaceblanket_displayname), [0.35, 0.72, 0.82, 1]]; +}; \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_handWarmersCheck.sqf b/addons/hypothermia/functions/fnc_handWarmersCheck.sqf new file mode 100644 index 000000000..7774f264d --- /dev/null +++ b/addons/hypothermia/functions/fnc_handWarmersCheck.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Checks handwarmer status + * + * Arguments: + * 0: Player + * 1: Target + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_hypothermia_fnc_checkHandWarmers; + * + * Public: No + */ + +params ["_player", "_target"]; +_hasWarmer = false; +private _warmers = _target getVariable [QGVAR(handWarmers), [0,0,0,0,0,0,0,0,0,0,0,0]]; +_hasWarmer = (selectMax _warmers) > 0; +_hasWarmer \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_handleRespawn.sqf b/addons/hypothermia/functions/fnc_handleRespawn.sqf index 453e4db2f..b1b0a7151 100644 --- a/addons/hypothermia/functions/fnc_handleRespawn.sqf +++ b/addons/hypothermia/functions/fnc_handleRespawn.sqf @@ -31,7 +31,7 @@ if (GVAR(hypothermiaActive)) then { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - private _handWarmers = _patient getVariable [QGVAR(handWarmers), [0,0,0,0,0,0]]; + private _handWarmers = _patient getVariable [QGVAR(handWarmers), [0,0,0,0,0,0,0,0,0,0,0,0]]; { _x params ["_timeRemaining"]; diff --git a/addons/hypothermia/functions/fnc_init.sqf b/addons/hypothermia/functions/fnc_init.sqf index 7e6953ea8..0a393937a 100644 --- a/addons/hypothermia/functions/fnc_init.sqf +++ b/addons/hypothermia/functions/fnc_init.sqf @@ -32,7 +32,7 @@ if (GVAR(hypothermiaActive)) then { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - private _handWarmers = _unit getVariable [QGVAR(handWarmers), [0,0,0,0,0,0]]; + private _handWarmers = _unit getVariable [QGVAR(handWarmers), [0,0,0,0,0,0,0,0,0,0,0,0]]; { _x params ["_timeRemaining"]; diff --git a/addons/hypothermia/functions/fnc_removeBlanket.sqf b/addons/hypothermia/functions/fnc_removeBlanket.sqf new file mode 100644 index 000000000..c2de2292c --- /dev/null +++ b/addons/hypothermia/functions/fnc_removeBlanket.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Check for fluid warmers present + * + * Arguments: + * 0: Patient + * 1: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_hypothermia_fnc_removeWarmer; + * + * Public: No + */ +params ["_patient", "_bodyPart"]; +private _spaceBlanket = _patient getVariable [QGVAR(spaceBlanket), false]; + +_spaceBlanket \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_removeFluidWarmerLocal.sqf b/addons/hypothermia/functions/fnc_removeFluidWarmerLocal.sqf index 359d55932..ce313f7a9 100644 --- a/addons/hypothermia/functions/fnc_removeFluidWarmerLocal.sqf +++ b/addons/hypothermia/functions/fnc_removeFluidWarmerLocal.sqf @@ -19,7 +19,7 @@ params ["_medic", "_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _warmerArray = _patient getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0]]; +private _warmerArray = _patient getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]]; _warmerArray set [_partIndex, 0]; _patient setVariable [QGVAR(fluidWarmer), _warmerArray]; diff --git a/addons/hypothermia/functions/fnc_removeSpaceBlanket.sqf b/addons/hypothermia/functions/fnc_removeSpaceBlanket.sqf new file mode 100644 index 000000000..050a4d63a --- /dev/null +++ b/addons/hypothermia/functions/fnc_removeSpaceBlanket.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski.H + * Begins Remove Fluid Warmer treatment + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "RightArm", "Fluid Warmer", objNull, "kat_FluidWarmer"] call kat_hypothermia_fnc_removeFluidWarmer; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; + +[QGVAR(removeSpaceBlanket), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/hypothermia/functions/fnc_removeSpaceBlanketLocal.sqf b/addons/hypothermia/functions/fnc_removeSpaceBlanketLocal.sqf new file mode 100644 index 000000000..1f5cd0b20 --- /dev/null +++ b/addons/hypothermia/functions/fnc_removeSpaceBlanketLocal.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call for removing a fluid warmer + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_hypothermia_fnc_removeFluidWarmerLocal; + * + * Public: No + */ +params ["_medic", "_patient"]; + +_patient setVariable [QGVAR(spaceBlanket), false, true]; +private _impact = (_patient getVariable [QGVAR(warmingImpact), 0]); +_patient setVariable [QGVAR(warmingImpact), (_impact - 300), true]; \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_removeWarmer.sqf b/addons/hypothermia/functions/fnc_removeWarmer.sqf index f9207ab6a..b179da5ce 100644 --- a/addons/hypothermia/functions/fnc_removeWarmer.sqf +++ b/addons/hypothermia/functions/fnc_removeWarmer.sqf @@ -18,7 +18,7 @@ params ["_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _warmerArray = _patient getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0]]; +private _warmerArray = _patient getVariable [QGVAR(fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]]; if (_warmerArray select _partIndex == 0) exitWith { false diff --git a/addons/hypothermia/functions/fnc_useHandWarmerLocal.sqf b/addons/hypothermia/functions/fnc_useHandWarmerLocal.sqf index e167c6c90..b35756228 100644 --- a/addons/hypothermia/functions/fnc_useHandWarmerLocal.sqf +++ b/addons/hypothermia/functions/fnc_useHandWarmerLocal.sqf @@ -18,7 +18,7 @@ params ["_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _warmerArray = _patient getVariable [QGVAR(handWarmers), [0,0,0,0,0,0]]; +private _warmerArray = _patient getVariable [QGVAR(handWarmers), [0,0,0,0,0,0,0,0,0,0,0,0]]; _warmerArray set [_partIndex, 60]; _patient setVariable [QGVAR(handWarmers), _warmerArray]; \ No newline at end of file diff --git a/addons/hypothermia/initSettings.inc.sqf b/addons/hypothermia/initSettings.inc.sqf index 6e0a04f56..d2da8382c 100644 --- a/addons/hypothermia/initSettings.inc.sqf +++ b/addons/hypothermia/initSettings.inc.sqf @@ -6,4 +6,22 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Hypothermia)], [true], true +] call CBA_fnc_addSetting; + +[ + QGVAR(baroPressureEnable), + "CHECKBOX", + [LLSTRING(PRESSURE_ENABLE), LLSTRING(PRESSURE_ENABLE_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(useACEpressure), + "CHECKBOX", + [LLSTRING(PRESSURE_ACE), LLSTRING(PRESSURE_ACE_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [true], + true ] call CBA_fnc_addSetting; \ No newline at end of file diff --git a/addons/hypothermia/stringtable.xml b/addons/hypothermia/stringtable.xml index 782ced2b4..76c452204 100644 --- a/addons/hypothermia/stringtable.xml +++ b/addons/hypothermia/stringtable.xml @@ -413,5 +413,51 @@ 患者感觉温暖 Patiënt voelt warm aan + + Thin mylar blanket, acts as an effective insulator + + + Space Blanket + + + Wrap w/ Space Blanket + + + Remove Space Blanket + + + Your Thermal Blanket Fell off + + + Check Thermometer Temperature + + + Checking Temperature + + + Small, multi use Thermometer + + + Thermometer + + + %1 has a Temperature of %2°c + + + Enable barometric pressure change + 気圧の変化を有効化 + + + Enables barometric pressure changes with altitude that affect Vitals such as oxygen calculations. + 酸素の計算などバイタルに影響を与える高度による気圧の変化を有効化します。 + + + Use ACE barometric pressure + ACEの大気圧を使用 + + + Use ACE calculation instead of KAM simplified calculation for barometric pressure value. (Requires ACE Weather) + 気圧の値にKAMによる簡易化された計算ではなく、ACEによる計算を使用します。 (ACE Weather 天候システム が必要です) + diff --git a/addons/hypothermia/ui/spaceBlanket.paa b/addons/hypothermia/ui/spaceBlanket.paa new file mode 100644 index 000000000..00fbcbd66 Binary files /dev/null and b/addons/hypothermia/ui/spaceBlanket.paa differ diff --git a/addons/hypothermia/ui/thermometer.paa b/addons/hypothermia/ui/thermometer.paa new file mode 100644 index 000000000..62aa8f467 Binary files /dev/null and b/addons/hypothermia/ui/thermometer.paa differ diff --git a/addons/main/CfgVehicles.hpp b/addons/main/CfgVehicles.hpp new file mode 100644 index 000000000..425034b58 --- /dev/null +++ b/addons/main/CfgVehicles.hpp @@ -0,0 +1,163 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + // General + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // BluFor + class B_Soldier_base_F; + class B_Soldier_04_f: B_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class B_Soldier_05_f: B_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // Indep + class I_Soldier_base_F; + class I_Soldier_03_F: I_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class I_Soldier_04_F: I_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // OpFor + class SoldierEB; + class O_Soldier_base_F: SoldierEB { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class O_Soldier_02_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class O_officer_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class O_Soldier_diver_base_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // Virtual Reality + class B_Soldier_VR_F: B_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class B_Protagonist_VR_F: B_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class O_Soldier_VR_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class I_Soldier_VR_F: I_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class I_Protagonist_VR_F: I_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class O_Protagonist_VR_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class C_man_1; + class C_Protagonist_VR_F: C_man_1 { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // Civilians + class C_Soldier_VR_F: C_man_1 { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // APEX + class O_V_Soldier_Viper_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + class O_V_Soldier_base_F: O_Soldier_base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; + + // Enoch + class I_E_Man_Base_F; + class I_E_Uniform_01_coveralls_F: I_E_Man_Base_F { + class HitPoints { + class HitHands; + class HitLegs; + ADD_ACE_HITPOINTS; + }; + }; +}; \ No newline at end of file diff --git a/addons/main/config.cpp b/addons/main/config.cpp index a8a4d0632..af7f17824 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -20,14 +20,15 @@ class CfgPatches { class CfgMods { class PREFIX { dir = "@kat_aceAdvMedical"; - name = "KAT - Advanced Medical"; + name = "KAT - Advanced Medical REDUX"; picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca.paa"; hidePicture = "true"; hideName = "true"; actionName = "Website"; action = CSTRING(URL); - description = "Issue Tracker: https://github.com/Tomcat-SG/KAM/issues"; + description = "Issue Tracker"; }; }; #include "CfgSettings.hpp" +#include "CfgVehicles.hpp" \ No newline at end of file diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 883c87382..2d7c6dc27 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -14,6 +14,14 @@ #define DFUNC(var1) TRIPLES(ADDON,fnc,var1) #define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) +#define SIXES(var1,var2,var3,var4,var5,var6) var1##_##var2##_##var3##_##var4##_##var5##_##var6 +#define FOURS(var1,var2,var3,var4) var1##_##var2##_##var3##_##var4## +#define KATPUSHCSTRING(var1,var2,var3) QUOTE(SIXES($STR,ADDON,Push,var1,var2,var3)) +#define KATPUSHINGCSTRING(var1,var2,var3) QUOTE(SIXES($STR,ADDON,Pushing,var1,var2,var3)) +#define KATDISPLAYCSTRING(var1,var2,var3) QUOTE(SIXES($STR,ADDON,SyringeDisplay,var1,var2,var3)) +#define LOC(var1,var2) QUOTE(TRIPLES(STR,ADDON,DOUBLES(var1,var2))) +#define ICON_PATH(name) ADDON##\ui\##name##.paa + #undef QFUNC #undef QEFUNC #define QFUNC(var1) QUOTE(DFUNC(var1)) @@ -119,12 +127,18 @@ #define FATAL_INJURIES_ALWAYS 0 #define FATAL_INJURIES_CRDC_ARRST 1 #define FATAL_INJURIES_NEVER 2 + +#undef PENETRATION_THRESHOLD +#undef PENETRATION_THRESHOLD_DEFAULT +#define PENETRATION_THRESHOLD ACEGVAR(medical,const_penetrationThreshold) +#define PENETRATION_THRESHOLD_DEFAULT 0.35 + #undef BLOOD_LOSS_KNOCK_OUT_THRESHOLD #define BLOOD_LOSS_KNOCK_OUT_THRESHOLD ACEGVAR(medical,const_bloodLossKnockOutThreshold) #undef GET_BLOOD_LOSS -#define GET_BLOOD_LOSS(unit) ([unit] call ACEFUNC(medical_status,getBloodLoss)) +#define GET_BLOOD_LOSS(unit) ([unit] call EFUNC(vitals,getBloodLoss)) // Minimum leg damage required for limping #undef LIMPING_DAMAGE_THRESHOLD @@ -135,7 +149,9 @@ #define FRACTURE_DAMAGE_THRESHOLD ACEGVAR(medical,const_fractureDamageThreshold) // Minimum cardiac output +#ifdef CARDIAC_OUTPUT_MIN #undef CARDIAC_OUTPUT_MIN +#endif #define CARDIAC_OUTPUT_MIN ACEGVAR(medical,const_minCardiacOutput) //We have to undef them before redefining @@ -165,7 +181,7 @@ // Defined here for easy consistency with GETVAR/SETVAR (also a list for reference) #define VAR_BLOOD_PRESS QACEGVAR(medical,bloodPressure) #define VAR_BLOOD_VOL QACEGVAR(medical,bloodVolume) -#define VAR_WOUND_BLEEDING QACEGVAR(medical,woundBleeding) +#define VAR_WOUND_BLEEDING QEGVAR(circulation,woundBleeding) #define VAR_CRDC_ARRST QACEGVAR(medical,inCardiacArrest) #define VAR_HEART_RATE QACEGVAR(medical,heartRate) #define VAR_PAIN QACEGVAR(medical,pain) @@ -174,6 +190,10 @@ #define VAR_OPEN_WOUNDS QACEGVAR(medical,openWounds) #define VAR_BANDAGED_WOUNDS QACEGVAR(medical,bandagedWounds) #define VAR_STITCHED_WOUNDS QACEGVAR(medical,stitchedWounds) +#define VAR_COAGED_WOUNDS QEGVAR(hitpoints,coagedWounds) +#define VAR_WRAPPED_WOUNDS QEGVAR(hitpoints,wrappedWounds) +#define GET_COAGED_WOUNDS(unit) (unit getVariable [VAR_COAGED_WOUNDS, createHashMap]) +#define GET_WRAPPED_WOUNDS(unit) (unit getVariable [VAR_WRAPPED_WOUNDS, createHashMap]) // These variables track gradual adjustments (from medication, etc.) #define VAR_MEDICATIONS QACEGVAR(medical,medications) // These variables track the current state of status values above @@ -181,6 +201,7 @@ #define VAR_IN_PAIN QACEGVAR(medical,inPain) #define VAR_TOURNIQUET QACEGVAR(medical,tourniquets) #define VAR_FRACTURES QACEGVAR(medical,fractures) +#define VAR_JOINTS QEGVAR(hitpoints,joints) // - Unit Functions --------------------------------------------------- // Retrieval macros for common unit values @@ -191,13 +212,16 @@ #undef GET_BLOOD_VOLUME #define GET_OPIOID_FACTOR(unit) (unit getVariable [QEGVAR(pharma,opioidFactor), 0]) +#define GET_OPIOID_DEPRESSION(unit) (unit getVariable [QEGVAR(pharma,opioidDepression), 0]) #define GET_PAIN_PERCEIVED(unit) (0 max ((GET_PAIN(unit) - GET_PAIN_SUPPRESS(unit)) min 1)) #undef GET_DAMAGE_THRESHOLD -#define GET_DAMAGE_THRESHOLD(unit) ((unit getVariable [QACEGVAR(medical,damageThreshold), [ACEGVAR(medical,AIDamageThreshold),ACEGVAR(medical,playerDamageThreshold)] select (isPlayer unit)]) * (GET_OPIOID_FACTOR(unit) + 1)) +#define GET_DAMAGE_THRESHOLD(unit) ((unit getVariable [QACEGVAR(medical,damageThreshold), [ACEGVAR(medical,AIDamageThreshold),ACEGVAR(medical,playerDamageThreshold)] select ((isPlayer unit) || (GET_CONVERT_STATUS(unit)))]) * (GET_OPIOID_FACTOR(unit) + 1)) -#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0] +#define VAR_KAT_TOURNIQUET QEGVAR(hitpoints,tourniquets) +#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] #define GET_TOURNIQUETS(unit) (unit getVariable [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES]) +#define GET_KAT_TOURNIQUETS(unit) (unit getVariable [VAR_KAT_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES]) #define GET_SURGICAL_TOURNIQUETS(unit) (unit getVariable [QEGVAR(surgery,surgicalBlock), DEFAULT_TOURNIQUET_VALUES]) #define HAS_TOURNIQUET_APPLIED_ON(unit,index) ((GET_TOURNIQUETS(unit) select index) > 0 ) #define HAS_TOURNIQUET_ACTUAL(unit,index) (((GET_TOURNIQUETS(unit) select index) > 0) && ((GET_SURGICAL_TOURNIQUETS(unit) select index) < 1)) @@ -269,11 +293,12 @@ #define MOA_TO_RAD(d) ((d) * 0.00029088) // Conversion factor: PI / 10800 #define QPATHTOF_SOUND(var1) QUOTE(PATHTOF2_SYS(PREFIX,COMPONENT,var1)) +#define QEPATHTOF_SOUND(var1,var2) QUOTE(PATHTOF2_SYS(PREFIX,var1,var2)) #define QQPATHTOF_SOUND(var1) QUOTE(QPATHTOF_SOUND(var1)) #include "script_debug.hpp" -#define ALL_BODY_PARTS_PRIORITY ["body", "head", "leftarm", "rightarm", "leftleg", "rightleg"] +#define ALL_BODY_PARTS_PRIORITY ["chest", "body", "head", "neck", "leftarm", "upperleftarm", "rightarm", "upperrightarm", "leftleg", "upperleftleg", "rightleg", "upperrightleg"] #define DEFAULT_PACO2 40 #define DEFAULT_PAO2 90 @@ -283,6 +308,7 @@ #define DEFAULT_ETCO2 37 #define DEFAULT_BLOOD_GAS [DEFAULT_PACO2, DEFAULT_PAO2, DEFAULT_O2SAT, DEFAULT_HCO3, DEFAULT_PH, DEFAULT_ETCO2] #define DEFAULT_RESPIRATORY_DEPTH 10 +#define DEFAULT_LOCAL_ANESTHESIA [0,0,0,0,0,0,0,0,0,0,0,0] #define DEFAULT_ANEROBIC_EXCHANGE 0.8 #define DEFAULT_TEMPERATURE 37 @@ -291,7 +317,10 @@ #define DEFAULT_ECP 3300 #define DEFAULT_SRBC 500 #define DEFAULT_ISP 10000 -#define DEFAULT_BODY_FLUID [2700, 3300, 500, 10000, 6000] +#define DEFAULT_PLATELETS 600 +#define DEFAULT_BODY_FLUID [2700, 3300, 500, 10000, 6000, 600] + +#define DEFAULT_BLOOD_PRESSURE [80, 120] #define LITERS_TO_ML 1000 #define ML_TO_LITERS 1000 @@ -301,22 +330,48 @@ #define OXYGEN_PERCENTAGE_ARREST 80 #define OXYGEN_PERCENTAGE_FATAL 75 -// Breathing -#define VAR_SURFACE_AREA 400 -#define GET_KAT_SURFACE_AREA(unit) (VAR_SURFACE_AREA - (((unit getVariable [QEGVAR(breathing,pneumothorax), 0]) * 75))) +// Brain +#define VAR_CMR QEGVAR(brain,CMR) // Cerebral Metabolic Rate (%) +#define VAR_CBF QEGVAR(brain,CBF) // Cerebral Blood Flow +#define VAR_CVR QEGVAR(brain,CVR) // Cerebral Vascular Resistance +#define VAR_ICP QEGVAR(brain,ICP) // Intracranial Pressure +#define VAR_CPR QEGVAR(brain,CPR) // Cerebral Perfusion Rate +#define VAR_RO2 QEGVAR(brain,rO2) // Brain O2 saturation +#define VAR_CONCUSSION QEGVAR(brain,concussion) -#define VAR_RESPIRATORY_DEPTH QEGVAR(vitals,respiratoryDepth) -#define GET_KAT_RESPIRATORY_DEPTH(unit) (unit getVariable [QEGVAR(vitals,respiratoryDepth), 10]) + +#define GET_CMR(unit) (unit getVariable [VAR_CMR, 100]) +#define GET_CBF(unit) (unit getVariable [VAR_CBF, 800]) +#define GET_CVR(unit) (unit getVariable [VAR_CVR, 0.1]) +#define GET_ICP(unit) (unit getVariable [VAR_ICP, 15]) +#define GET_CPR(unit) (unit getVariable [VAR_CPR, 100]) +#define GET_RO2(unit) (unit getVariable [VAR_RO2, 80]) +#define GET_CONCUSSION(unit) (unit getVariable [VAR_CONCUSSION, 0]) + +// Breathing +#define VAR_SURFACE_AREA QEGVAR(breathing,lungSurfaceArea) +#define GET_KAT_SURFACE_AREA(unit) ((unit getVariable [VAR_SURFACE_AREA, 400]) - (((unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 0) + (unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 1)) * 20) + (((unit getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]] select 0) + (unit getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]] select 1)) * 60)) #define VAR_BLOOD_GAS QEGVAR(circulation,bloodGas) #define VAR_BREATHING_RATE QEGVAR(breathing,breathRate) +#define VAR_EFFECTIVE_CALCUIM QEGVAR(pharma,effectiveCa) +#define VAR_MAP QEGVAR(circulation,map) #define GET_BLOOD_GAS(unit) (unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]) +#define GET_PACO2(unit) ((unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]) select 0) #define GET_PAO2(unit) ((unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]) select 1) #define GET_KAT_SPO2(unit) (((unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]) select 2) * 100) #define GET_PH(unit) ((unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]) select 4) #define GET_ETCO2(unit) ((unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]) select 5) +#define GET_CA(unit) (unit getVariable [VAR_EFFECTIVE_CALCUIM, 2.4]) #define GET_BREATHING_RATE(unit) (unit getVariable [VAR_BREATHING_RATE, 15]) +#define GET_MAP(unit) (unit getVariable [VAR_MAP, 93]) + +#define VAR_RESPIRATORY_DEPTH QEGVAR(vitals,respiratoryDepth) +#define GET_KAT_RESPIRATORY_DEPTH(unit) (unit getVariable [QEGVAR(vitals,respiratoryDepth), 10]) + +#define HAS_LUNG_INJURY(unit) ((_unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 0 > 0) || (_unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 1 > 0) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 0) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 1) || ((_unit getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]] select 0) > 0) || ((_unit getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]] select 1) > 0)); + // Circulation #define VAR_INTERNAL_BLEEDING QEGVAR(circulation,internalBleeding) @@ -324,33 +379,277 @@ #define VAR_BODY_FLUID QEGVAR(circulation,bodyFluid) #define GET_BODY_FLUID(unit) (unit getVariable [VAR_BODY_FLUID, DEFAULT_BODY_FLUID]) +#define GET_BODY_FLUID_ECB(unit) ((unit getVariable [VAR_BODY_FLUID, DEFAULT_BODY_FLUID]) select 0) +#define GET_BODY_FLUID_ECP(unit) ((unit getVariable [VAR_BODY_FLUID, DEFAULT_BODY_FLUID]) select 1) +#define GET_BODY_FLUID_SRBC(unit) ((unit getVariable [VAR_BODY_FLUID, DEFAULT_BODY_FLUID]) select 2) +#define GET_BODY_FLUID_ISP(unit) ((unit getVariable [VAR_BODY_FLUID, DEFAULT_BODY_FLUID]) select 3) +#define GET_BODY_FLUID_PLATELETS(unit) ((unit getVariable [VAR_BODY_FLUID, DEFAULT_BODY_FLUID]) select 5) + #define GET_BLOOD_VOLUME_LITERS(unit) ((GET_BODY_FLUID(unit) select 4) / 1000) #define GET_BLOOD_VOLUME_ML(unit) (GET_BODY_FLUID(unit) select 4) #define GET_SIMPLE_BLOOD_VOLUME(unit) (unit getVariable [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME]) -#define REDUCE_TOTAL_BLOOD_VOLUME(unit,volume) (unit setVariable [VAR_BODY_FLUID, [(GET_BODY_FLUID(unit) select 0) - (volume / 2), (GET_BODY_FLUID(unit) select 1) - (volume / 2), (GET_BODY_FLUID(unit) select 2), (GET_BODY_FLUID(unit) select 3), (GET_BODY_FLUID(unit) select 4) - volume], true]) +#define REDUCE_TOTAL_BLOOD_VOLUME(unit,volume) (unit setVariable [VAR_BODY_FLUID, [(GET_BODY_FLUID(unit) select 0) - (volume / 2), (GET_BODY_FLUID(unit) select 1) - (volume / 2), (GET_BODY_FLUID(unit) select 2), (GET_BODY_FLUID(unit) select 3), ((GET_BODY_FLUID(unit) select 4) - volume), (GET_BODY_FLUID(unit) select 5)], true]) #undef GET_BLOOD_PRESSURE #define GET_BLOOD_PRESSURE(unit) ([unit] call EFUNC(circulation,getBloodPressure)) #define VAR_BLOODPRESSURE_CHANGE QEGVAR(circulation,bloodPressureChange) #define GET_BLOODPRESSURE_CHANGE(unit) (unit getVariable [VAR_BLOODPRESSURE_CHANGE, [0,0]]) +// Conversion +#define UNIT_CONVERT QEGVAR(conversion,currentlyConverted) +#define GET_CONVERT_STATUS(unit) (unit getVariable [UNIT_CONVERT, false]) + // Pharma #define VAR_VASOCONSTRICTION QEGVAR(pharma,alphaAction) #define GET_VASOCONSTRICTION(unit) (unit getVariable [VAR_VASOCONSTRICTION, 1]) +#define VAR_LOCAL_ANESTHESIA QEGVAR(pharma,localAnesthesia) +#define GET_LOCAL_ANESTHESIA(unit,partindex) ((unit getVariable [VAR_LOCAL_ANESTHESIA, DEFAULT_LOCAL_ANESTHESIA]) select _partindex) + +#define VAR_FENT_PATCH QEGVAR(pharma,fentanylPatch) +#define GET_FENT_PATCH(unit,partindex) ((unit getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partindex) +#define HAS_FENT_PATCH(unit,partindex) ((GET_FENT_PATCH(unit,partindex)) > 0 ) +// Statemachine +#define VAR_SEIZURE QEGVAR(statemachine,inSeizure) +#define IN_SEIZURE(unit) (unit getVariable [VAR_SEIZURE, false]) + //Surgery -#define STRING_BODY_PARTS ["head", "body", "left arm", "right arm", "left leg", "right leg"] +#define STRING_BODY_PARTS ["head", "neck", "chest", "body", "left arm", "upper left arm", "right arm", "upper right arm", "left leg", "upper leftleg", "right leg", "upper right leg"] #define GET_REBOA_VOLUME(unit) ([unit] call EFUNC(surgery,reboaVolume)) //Feedback #define VAR_PP QEGVAR(feedback,ppEffect) #define GET_PP(unit) (unit getVariable [VAR_PP, 0]) -#define IS_AIRPOISONED(unit) (unit getVariable [QEGVAR(chemical,airPoisoning), false]) -#define IN_TEARGAS(unit) (unit getVariable [QEGVAR(chemical,CSGas), 0]) +#define KAT_DEFAULT_HEART_RATE(unit) (_unit getVariable [QEGVAR(circulation,defaultHeartRate), 80]) //Ophthalmology #define GET_DUST_INJURY(unit) ((unit getVariable [QEGVAR(ophthalmology,dustInjuryLight), 0]) + (unit getVariable [QEGVAR(ophthalmology,dustInjuryHeavy), 0])) -#define GET_EYE_INJURIES(unit) (unit getVariable [QEGVAR(ophthalmology,eyeInjuries), [1,1]]) \ No newline at end of file +#define GET_EYE_INJURIES(unit) (unit getVariable [QEGVAR(ophthalmology,eyeInjuries), [1,1]]) + +//Hitpoints + +#undef ALL_BODY_PARTS +#undef ALL_SELECTIONS +#undef ALL_HITPOINTS + +#define ALL_BODY_PARTS ["head", "neck", "chest", "body", "leftarm", "upperleftarm", "rightarm", "upperrightarm", "leftleg", "upperleftleg", "rightleg", "upperrightleg"] +#define ALL_SELECTIONS ["head", "neck", "chest", "body", "hand_l", "uhand_l", "hand_r", "uhand_r", "leg_l", "uleg_l", "leg_r", "uleg_r"] +#define ALL_HITPOINTS ["HitHead", "HitNeck", "HitChest", "HitAbdomen", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg" "HitUpperUpperLeftArm", "HitUpperRightArm", "HitUpperLeftLeg", "HitUpperRightLeg"] + +#undef HITPOINT_INDEX_BODY +#undef HITPOINT_INDEX_LARM +#undef HITPOINT_INDEX_RARM +#undef HITPOINT_INDEX_LLEG +#undef HITPOINT_INDEX_RLEG + +#undef DEFAULT_TOURNIQUET_VALUES +#undef DEFAULT_FRACTURE_VALUES +#undef DEFAULT_BODYPART_DAMAGE_VALUES + +#define HITPOINT_INDEX_NECK 1 +#define HITPOINT_INDEX_CHEST 2 +#define HITPOINT_INDEX_BODY 3 +#define HITPOINT_INDEX_LARM 4 +#define HITPOINT_INDEX_ULARM 5 +#define HITPOINT_INDEX_RARM 6 +#define HITPOINT_INDEX_URARM 7 +#define HITPOINT_INDEX_LLEG 8 +#define HITPOINT_INDEX_ULLEG 9 +#define HITPOINT_INDEX_RLEG 10 +#define HITPOINT_INDEX_URLEG 11 + +// Body points +// 0 Head +// 1 Neck +// 2 Chest (Above Diaphragm) +// 3 Body (Below Diaphragm) +// 4 Left Arm +// 5 Upper Left Arm +// 6 Right Arm +// 7 Upper Right Arm +// 8 Left Leg +// 9 Upper Left Leg +// 10 Right Leg +// 11 Upper Right Leg + +#define DEFAULT_APPLIEDPRESSURE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +#define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +#define DEFAULT_BODYPART_DAMAGE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +#define DEFAULT_BODY_BLEED_RATE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] +// Joint points +// 0 Left Shoulder +// 1 Left Elbow +// 2 Left Wrist +// 3 Right Shoulder +// 4 Right Elbow +// 5 Right Wrist +// 6 Left Hip +// 7 Left Knee +// 8 Left Ankle +// 9 Right Hip +// 10 Right Knee +// 11 Right Ankle + +// Joint Injury +// 0 No Injury +// 1 Inflamed Strain +// 2 Inflamed Sprain +// 3 Dislocation +// 4 Iced Strain +// 5 Iced Sprain +// 6 Stabilized Dislocation +// 7 Strain +// 8 Sprain +// 9 Reduced Dislocation +// 10 Wrapped Strain +// 11 Wrapped Sprain + +#define DEFAULT_JOINT_VALUES [[0,0,0],[0,0,0],[0,0,0],[0,0,0]] + +#define POS_X(N) ((N) * GUI_GRID_W + GUI_GRID_CENTER_X) +#define POS_Y(N) ((N) * GUI_GRID_H + GUI_GRID_CENTER_Y) +#define POS_W(N) ((N) * GUI_GRID_W) +#define POS_H(N) ((N) * GUI_GRID_H) + +#define PATIENT_INFO_IGUI_BASE_X (safeZoneX + POS_W(2)) +#define PATIENT_INFO_IGUI_BASE_Y (safeZoneY + POS_H(1)) +#define PATIENT_INFO_IGUI_X (profilenamespace getVariable ['TRIPLES(IGUI,GVAR(patientInfo),X)', 0]) +#define PATIENT_INFO_IGUI_Y (profilenamespace getVariable ['TRIPLES(IGUI,GVAR(patientInfo),Y)', 0]) +#define PATIENT_INFO_IGUI_OFFSET_X (PATIENT_INFO_IGUI_X - PATIENT_INFO_IGUI_BASE_X) +#define PATIENT_INFO_IGUI_OFFSET_Y (PATIENT_INFO_IGUI_Y - PATIENT_INFO_IGUI_BASE_Y) + +#undef BANDAGE_TIME_S +#undef BANDAGE_TIME_M +#undef BANDAGE_TIME_L +#undef BANDAGE_TIME_MOD_MEDIC +#undef BANDAGE_TIME_MOD_SELF + +#define BANDAGE_TIME_S 4 +#define BANDAGE_TIME_M 6 +#define BANDAGE_TIME_L 8 +#define BANDAGE_TIME_MOD_MEDIC 0.75 +#define BANDAGE_TIME_MOD_SELF 1.25 + +#define VAR_APPLIEDPRESSURE QEGVAR(hitpoints,appliedPressure) +#define GET_APPLIEDPRESSURE(unit) (unit getVariable [VAR_APPLIEDPRESSURE, DEFAULT_APPLIEDPRESSURE_VALUES]) +#define GET_APPLIEDPRESSURE_ON(unit,index) (GET_APPLIEDPRESSURE(unit) select index) +#define HAS_APPLIEDPRESSURE_ON(unit,index) ((GET_APPLIEDPRESSURE(unit) select index) > 0) + +#define VAR_BODY_BLEED_RATE QEGVAR(hitpoints,limbBleedRate) +#define GET_BODY_BLEED_RATE(unit) (unit getVariable [VAR_BODY_BLEED_RATE, DEFAULT_BODY_BLEED_RATE_VALUES]) +#define GET_BODY_PART_RATE(unit,index) (GET_BODY_BLEED_RATE(unit) select index) +#define HAS_LIMB_BLEEDING(unit,index) ((GET_BODY_BLEED_RATE(unit) select index) > 0) + +#define GET_JOINTS(unit) (unit getVariable [VAR_JOINTS, DEFAULT_JOINT_VALUES]) +#define GET_LIMB_JOINT(unit,limbindex) ((unit getVariable [VAR_JOINTS, DEFAULT_JOINT_VALUES]) select _limbindex) + + +#define INTERNAL_BLEEDING_RATE(unit,index) ([unit, index] call EFUNC(hitpoints,internalBleedingRate)) +#define PART_BLEEDING_RATE(unit,index) ([unit, index] call EFUNC(hitpoints,partBleedingRate)) + +#ifdef PRIORITY_HEAD +#undef PRIORITY_HEAD +#endif +#ifdef PRIORITY_BODY +#undef PRIORITY_BODY +#endif +#ifdef PRIORITY_LEFT_ARM +#undef PRIORITY_LEFT_ARM +#endif +#ifdef PRIORITY_RIGHT_ARM +#undef PRIORITY_RIGHT_ARM +#endif +#ifdef PRIORITY_LEFT_LEG +#undef PRIORITY_LEFT_LEG +#endif +#ifdef PRIORITY_RIGHT_LEG +#undef PRIORITY_RIGHT_LEG +#endif + + + + +#define PRIORITY_HEAD 4 +#define PRIORITY_NECK 3 +#define PRIORITY_BODY 5 +#define PRIORITY_CHEST 6 +#define PRIORITY_LEFT_ARM (1 + random 1) +#define PRIORITY_RIGHT_ARM (1 + random 1) +#define PRIORITY_UPPER_LEFT_ARM (1 + random 1) +#define PRIORITY_UPPER_RIGHT_ARM (1 + random 1) +#define PRIORITY_LEFT_LEG (1 + random 1) +#define PRIORITY_RIGHT_LEG (1 + random 1) +#define PRIORITY_UPPER_LEFT_LEG (1 + random 1) +#define PRIORITY_UPPER_RIGHT_LEG (1 + random 1) +#ifdef ADD_ACE_HITPOINTS +#undef ADD_ACE_HITPOINTS +#endif +#define ADD_ACE_HITPOINTS\ + class HitLeftArm: HitHands {\ + material = -1;\ + name = "LeftForeArm";\ + radius = 0.08;\ + visual = "injury_hands";\ + minimalHit = 0.01;\ + };\ + class HitRightArm: HitLeftArm {\ + name = "RightForeArm";\ + };\ + class HitUpperLeftArm: HitLeftArm {\ + name = "LeftArm";\ + };\ + class HitUpperRightArm: HitLeftArm {\ + name = "RightArm";\ + };\ + class HitUpperRollLeftArm: HitLeftArm {\ + name = "LeftArmRoll";\ + };\ + class HitUpperRollRightArm: HitLeftArm {\ + name = "RightArmRoll";\ + };\ + class HitLeftLeg: HitLegs {\ + material = -1;\ + name = "LeftLeg";\ + radius = 0.1;\ + visual = "injury_legs";\ + minimalHit = 0.01;\ + };\ + class HitRightLeg: HitLeftLeg {\ + name = "RightLeg";\ + };\ + class HitUpperLeftLeg: HitLeftLeg {\ + name = "L_Femur_hit";\ + };\ + class HitUpperRightLeg: HitLeftLeg {\ + name = "R_Femur_hit";\ + };\ + class HitLeftLegRoll: HitLeftLeg {\ + name = "LeftLegRoll";\ + };\ + class HitRightLegRoll: HitLeftLeg {\ + name = "RightLegRoll";\ + };\ + class HitLeftFoot: HitLeftLeg {\ + name = "LeftFoot";\ + };\ + class HitRightFoot: HitLeftLeg {\ + name = "RightFoot";\ + } +#undef FATAL_SUM_DAMAGE_WEIBULL_K +#undef FATAL_SUM_DAMAGE_WEIBULL_L +#define FATAL_SUM_DAMAGE_WEIBULL_K ACEGVAR(medical,const_fatalSumDamageWeibull_K) +#define FATAL_SUM_DAMAGE_WEIBULL_L ACEGVAR(medical,const_fatalSumDamageWeibull_L) + +#undef BLOOD_LOSS_RED_THRESHOLD +#undef BLOOD_LOSS_TOTAL_COLORS +#define BLOOD_LOSS_RED_THRESHOLD 0.5 +#define BLOOD_LOSS_TOTAL_COLORS 10 + +#define NOTMEDIC_LOWHR_THRESHOLD 50 +#define NOTMEDIC_LOWBP_THRESHOLD 90 + +#define HAS_AIRWAY(unit) (unit call EFUNC(airway,airwayCheck)) diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index f3c2f6941..404114b94 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -1,10 +1,24 @@ // COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp - +#ifdef MAINPREFIX +#undef MAINPREFIX +#endif #define MAINPREFIX x #define PREFIX kat #include "script_version.hpp" +#ifdef VERSION +#undef VERSION +#endif +#ifdef VERSION_STR +#undef VERSION_STR +#endif +#ifdef VERSION_AR +#undef VERSION_AR +#endif +#ifdef VERSION_CONFIG +#undef VERSION_CONFIG +#endif #define VERSION MAJOR.MINOR #define VERSION_STR MAJOR.MINOR.PATCH #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD @@ -17,7 +31,7 @@ #define REQUIRED_ACE_VERSION {3,18,0} #ifdef COMPONENT_BEAUTIFIED - #define COMPONENT_NAME QUOTE(KAT - ADV Medical: COMPONENT_BEAUTIFIED) + #define COMPONENT_NAME QUOTE(KAT - ADV Medical REDUX: COMPONENT_BEAUTIFIED) #else - #define COMPONENT_NAME QUOTE(KAT - ADV Medical: COMPONENT) + #define COMPONENT_NAME QUOTE(KAT - ADV Medical REDUX: COMPONENT) #endif diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index e8179e765..c2757f72a 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ -#define MAJOR 3 -#define MINOR 1 -#define PATCH 2 -#define BUILD 71 +#define MAJOR 1 +#define MINOR 2 +#define PATCH 0 +#define BUILD 0 diff --git a/addons/misc/ACE_Medical_Treatment_Actions.hpp b/addons/misc/ACE_Medical_Treatment_Actions.hpp index 40219ba8a..de53d039f 100644 --- a/addons/misc/ACE_Medical_Treatment_Actions.hpp +++ b/addons/misc/ACE_Medical_Treatment_Actions.hpp @@ -1,6 +1,5 @@ class ACE_Medical_Treatment_Actions { class SalineIV; - class BasicBandage; class SurgicalKit; class ApplyTourniquet; class SalineIV_Stand: SalineIV { diff --git a/addons/misc/CfgFunctions.hpp b/addons/misc/CfgFunctions.hpp index b1b6edfb4..dfe7bc38e 100644 --- a/addons/misc/CfgFunctions.hpp +++ b/addons/misc/CfgFunctions.hpp @@ -30,6 +30,33 @@ class CfgFunctions { class useItem { file = QPATHTOF(functions\fnc_useItem.sqf); }; + class bandageLocal { + file = QPATHTOF(functions\fnc_bandageLocal.sqf); + }; + class getBandageTime { + file = QPATHTOF(functions\fnc_getBandageTime.sqf); + }; + class findMostEffectiveWounds { + file = QPATHTOF(functions\fnc_findMostEffectiveWounds.sqf); + }; + class handleBandageOpening { + file = QPATHTOF(functions\fnc_handleBandageOpening.sqf); + }; + class canStitch { + file = QPATHTOF(functions\fnc_canStitch.sqf); + }; + class stitchWound { + file = QPATHTOF(functions\fnc_stitchWound.sqf); + }; + class getStitchTime { + file = QPATHTOF(functions\fnc_getStitchTime.sqf); + }; + class surgicalKitProgress { + file = QPATHTOF(functions\fnc_surgicalKitProgress.sqf); + }; + class isMedic { + file = QPATHTOF(functions\fnc_isMedic.sqf); + }; }; }; class ace_medical { @@ -38,6 +65,12 @@ class CfgFunctions { class setUnconscious { file = QPATHTOF(functions\fnc_setUnconscious.sqf); }; + class serializeState { + file = QPATHTOF(functions\fnc_serializeState.sqf); + }; + class deserializeState { + file = QPATHTOF(functions\fnc_deserializeState.sqf); + }; }; }; class overwrite_dogtags { @@ -49,16 +82,16 @@ class CfgFunctions { class canCheckDogtag { file = QPATHTOF(functions\fnc_canCheckDogtag.sqf); }; + class showDogtagData { + file = QPATHTOF(functions\fnc_showDogtagData.sqf); + }; }; }; - class overwrite_ace_medical_statemachine { - tag = "ace_medical_statemachine"; - class ace_medical_statemachine { - class conditionExecutionDeath { - file = QPATHTOF(functions\fnc_conditionExecutionDeath.sqf); - }; - class conditionSecondChance { - file = QPATHTOF(functions\fnc_conditionSecondChance.sqf); + class overwrite_medical_feedback { + tag = "ace_medical_feedback"; + class ace_medical_feedback { + class handleEffects { + file = QPATHTOF(functions\fnc_handleEffects.sqf); }; }; }; diff --git a/addons/misc/CfgMagazines.hpp b/addons/misc/CfgMagazines.hpp index 35b8aec49..be5def4a3 100644 --- a/addons/misc/CfgMagazines.hpp +++ b/addons/misc/CfgMagazines.hpp @@ -64,4 +64,18 @@ class CfgMagazines { lastRoundsTracer = 0; mass = 50; }; + class kat_MEDPACK_Magazine: CA_Magazine { + scope = 2; + scopeArsenal = 0; + author = "Miss Heda/Cplhardcore"; + displayName = CSTRING(MEDPACK_Display); + descriptionShort = CSTRING(MEDPACK_DESC); + picture = QPATHTOF(ui\MedicationCase.paa); + ammo = ""; + count = 255; + initSpeed = 0; + tracersEvery = 0; + lastRoundsTracer = 0; + mass = 25; + }; }; diff --git a/addons/misc/CfgVehicles.hpp b/addons/misc/CfgVehicles.hpp index 23c7cf8b7..e7b0af6a5 100644 --- a/addons/misc/CfgVehicles.hpp +++ b/addons/misc/CfgVehicles.hpp @@ -80,10 +80,6 @@ class CfgVehicles { class kat_miscSupplyCrate: ACE_medicalSupplyCrate { displayName = CSTRING(miscSupplyCrate_display); class TransportItems { - //chemical - MACRO_ADDITEM(kat_gasmaskFilter,15); - MACRO_ADDITEM(kat_sealant,15); - MACRO_ADDITEM(KAT_ChemicalDetector,15); //misc.FAK MACRO_ADDITEM(kat_IFAK,15); MACRO_ADDITEM(kat_AFAK,15); @@ -1146,8 +1142,8 @@ class CfgVehicles { class KAT_MFAK_Item { displayName = CSTRING(MFAK_Unpack); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,0)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,0)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,0)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,0)] call FUNC(FAK_unpack)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK.paa); @@ -1155,7 +1151,7 @@ class CfgVehicles { class MFAKInfo { displayName = CSTRING(FAK_DisplayItems); condition = QUOTE([ARR_2(_player,'kat_MFAK')] call ACEFUNC(common,hasItem)); - statement = QUOTE([ARR_2(_player,2)] call FUNC(FAK_displayContent)); + statement = QUOTE([ARR_2(_player,3)] call FUNC(FAK_displayContent)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK_DisplayItems.paa); @@ -1163,8 +1159,8 @@ class CfgVehicles { class Slot1 { displayName = CSTRING(FAK_Slot_1); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,1)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,1)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,1)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,1)] call FUNC(FAK_unpack)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK.paa); @@ -1172,51 +1168,51 @@ class CfgVehicles { class Slot2: Slot1 { displayName = CSTRING(FAK_Slot_2); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,2)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,2)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',23,2)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,2)] call FUNC(FAK_unpack)); }; class Slot3: Slot1 { displayName = CSTRING(FAK_Slot_3); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,3)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,3)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,3)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,3)] call FUNC(FAK_unpack)); }; class Slot4: Slot1 { displayName = CSTRING(FAK_Slot_4); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,4)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,4)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,4)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,4)] call FUNC(FAK_unpack)); }; class Slot5: Slot1 { displayName = CSTRING(FAK_Slot_5); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,5)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,5)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,5)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,5)] call FUNC(FAK_unpack)); }; class Slot6: Slot1 { displayName = CSTRING(FAK_Slot_6); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,6)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,6)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,6)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,6)] call FUNC(FAK_unpack)); }; class Slot7: Slot1 { displayName = CSTRING(FAK_Slot_7); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,7)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,7)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,7)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,7)] call FUNC(FAK_unpack)); }; class Slot8: Slot1 { displayName = CSTRING(FAK_Slot_8); - condition = QUOTE([ARR_4(_player,'kat_MFAK',2,8)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK',2,8)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK',3,8)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK',3,8)] call FUNC(FAK_unpack)); }; }; - class KAT_MFAK_Mag { + class KAT_MFAK_Mag { displayName = CSTRING(MFAK_Unpack); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,0)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,0)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,0)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,0)] call FUNC(FAK_unpack)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK.paa); @@ -1224,7 +1220,7 @@ class CfgVehicles { class MFAKInfo { displayName = CSTRING(FAK_DisplayItems); condition = QUOTE([ARR_2(_player,'kat_MFAK_Magazine')] call ACEFUNC(common,hasMagazine)); - statement = QUOTE([ARR_2(_player,2)] call FUNC(FAK_displayContent)); + statement = QUOTE([ARR_2(_player,3)] call FUNC(FAK_displayContent)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK_DisplayItems.paa); @@ -1232,8 +1228,8 @@ class CfgVehicles { class Slot1 { displayName = CSTRING(FAK_Slot_1); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,1)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,1)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,1)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,1)] call FUNC(FAK_unpack)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK.paa); @@ -1241,8 +1237,8 @@ class CfgVehicles { class Slot1_Repack { displayName = CSTRING(FAK_Slot_1_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,1)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,1)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,1)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,1)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,1)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,1)] call FUNC(FAK_repack)); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(ui\MFAK_Repack.paa); @@ -1250,86 +1246,274 @@ class CfgVehicles { class Slot2: Slot1 { displayName = CSTRING(FAK_Slot_2); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,2)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,2)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,2)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,2)] call FUNC(FAK_unpack)); }; class Slot2_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_2_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,2)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,2)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,2)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,2)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,2)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,2)] call FUNC(FAK_repack)); }; class Slot3: Slot1 { displayName = CSTRING(FAK_Slot_3); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,3)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,3)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,3)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,3)] call FUNC(FAK_unpack)); }; class Slot3_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_3_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,3)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,3)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,3)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,3)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,3)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,3)] call FUNC(FAK_repack)); }; class Slot4: Slot1 { displayName = CSTRING(FAK_Slot_4); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,4)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,4)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,4)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,4)] call FUNC(FAK_unpack)); }; class Slot4_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_4_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,4)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,4)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,4)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,4)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,4)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,4)] call FUNC(FAK_repack)); }; class Slot5: Slot1 { displayName = CSTRING(FAK_Slot_5); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,5)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,5)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,5)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,5)] call FUNC(FAK_unpack)); }; class Slot5_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_5_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,5)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,5)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,5)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,5)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,5)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,5)] call FUNC(FAK_repack)); }; class Slot6: Slot1 { displayName = CSTRING(FAK_Slot_6); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,6)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,6)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,6)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,6)] call FUNC(FAK_unpack)); }; class Slot6_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_6_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,6)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,6)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,6)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,6)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,6)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,6)] call FUNC(FAK_repack)); }; class Slot7: Slot1 { displayName = CSTRING(FAK_Slot_7); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,7)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,7)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,7)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,7)] call FUNC(FAK_unpack)); }; class Slot7_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_7_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,7)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,7)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,7)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,7)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,7)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,7)] call FUNC(FAK_repack)); }; class Slot8: Slot1 { displayName = CSTRING(FAK_Slot_8); - condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,8)] call FUNC(FAK_checkSlot)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,8)] call FUNC(FAK_unpack)); + condition = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,8)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,8)] call FUNC(FAK_unpack)); }; class Slot8_Repack: Slot1_Repack { displayName = CSTRING(FAK_Slot_8_Repack); - condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',2,8)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',2,8)] call FUNC(FAK_checkRepack)); - statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',2,8)] call FUNC(FAK_repack)); + condition = QUOTE(!([ARR_4(_player,'kat_MFAK_Magazine',3,8)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MFAK_Magazine',3,8)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MFAK_Magazine',3,8)] call FUNC(FAK_repack)); + }; + }; + class KAT_MEDPACK_Item { + displayName = CSTRING(MEDPACK_Unpack); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,0)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,0)] call FUNC(FAK_unpack)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MedicationCase.paa); + + class MEDPACKInfo { + displayName = CSTRING(FAK_DisplayItems); + condition = QUOTE([ARR_2(_player,'kat_MEDPACK')] call ACEFUNC(common,hasItem)); + statement = QUOTE([ARR_2(_player,2)] call FUNC(FAK_displayContent)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MFAK_DisplayItems.paa); + }; + + class Slot1 { + displayName = CSTRING(MEDPACK_Slot_1); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,1)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,1)] call FUNC(FAK_unpack)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MedicationCase.paa); + }; + + class Slot2: Slot1 { + displayName = CSTRING(MEDPACK_Slot_2); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,2)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,2)] call FUNC(FAK_unpack)); + }; + + class Slot3: Slot1 { + displayName = CSTRING(MEDPACK_Slot_3); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,3)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,3)] call FUNC(FAK_unpack)); + }; + + class Slot4: Slot1 { + displayName = CSTRING(MEDPACK_Slot_4); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,4)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,4)] call FUNC(FAK_unpack)); + }; + + class Slot5: Slot1 { + displayName = CSTRING(MEDPACK_Slot_5); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,5)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,5)] call FUNC(FAK_unpack)); + }; + + class Slot6: Slot1 { + displayName = CSTRING(MEDPACK_Slot_6); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,6)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,6)] call FUNC(FAK_unpack)); + }; + + class Slot7: Slot1 { + displayName = CSTRING(MEDPACK_Slot_7); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,7)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,7)] call FUNC(FAK_unpack)); + }; + + class Slot8: Slot1 { + displayName = CSTRING(MEDPACK_Slot_8); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK',2,8)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK',2,8)] call FUNC(FAK_unpack)); + }; + }; + + class KAT_MEDPACK_Mag { + displayName = CSTRING(MEDPACK_Unpack); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,0)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,0)] call FUNC(FAK_unpack)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MedicationCase.paa); + + class MEDPACKInfo { + displayName = CSTRING(FAK_DisplayItems); + condition = QUOTE([ARR_2(_player,'kat_MEDPACK_Magazine')] call ACEFUNC(common,hasMagazine)); + statement = QUOTE([ARR_2(_player,2)] call FUNC(FAK_displayContent)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MedicationCase.paa); + }; + + class Slot1 { + displayName = CSTRING(MEDPACK_Slot_1); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,1)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,1)] call FUNC(FAK_unpack)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MedicationCase.paa); + }; + + class Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_1_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,1)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,1)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,1)] call FUNC(FAK_repack)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; + showDisabled = 0; + icon = QPATHTOF(ui\MedicationCase.paa); + }; + + class Slot2: Slot1 { + displayName = CSTRING(MEDPACK_Slot_2); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,2)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,2)] call FUNC(FAK_unpack)); + }; + + class Slot2_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_2_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,2)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,2)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,2)] call FUNC(FAK_repack)); + }; + + class Slot3: Slot1 { + displayName = CSTRING(MEDPACK_Slot_3); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,3)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,3)] call FUNC(FAK_unpack)); + }; + + class Slot3_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_3_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,3)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,3)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,3)] call FUNC(FAK_repack)); + }; + + class Slot4: Slot1 { + displayName = CSTRING(MEDPACK_Slot_4); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,4)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,4)] call FUNC(FAK_unpack)); + }; + + class Slot4_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_4_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,4)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,4)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,4)] call FUNC(FAK_repack)); + }; + + class Slot5: Slot1 { + displayName = CSTRING(MEDPACK_Slot_5); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,5)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,5)] call FUNC(FAK_unpack)); + }; + + class Slot5_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_5_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,5)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,5)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,5)] call FUNC(FAK_repack)); + }; + + class Slot6: Slot1 { + displayName = CSTRING(MEDPACK_Slot_6); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,6)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,6)] call FUNC(FAK_unpack)); + }; + + class Slot6_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_6_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,6)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,6)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,6)] call FUNC(FAK_repack)); + }; + + class Slot7: Slot1 { + displayName = CSTRING(MEDPACK_Slot_7); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,7)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,7)] call FUNC(FAK_unpack)); + }; + + class Slot7_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_7_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,7)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,7)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,7)] call FUNC(FAK_repack)); + }; + + class Slot8: Slot1 { + displayName = CSTRING(MEDPACK_Slot_8); + condition = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,8)] call FUNC(FAK_checkSlot)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,8)] call FUNC(FAK_unpack)); + }; + + class Slot8_Repack: Slot1_Repack { + displayName = CSTRING(MEDPACK_Slot_8_Repack); + condition = QUOTE(!([ARR_4(_player,'kat_MEDPACK_Magazine',2,8)] call FUNC(FAK_checkSlot)) && [ARR_4(_player,'kat_MEDPACK_Magazine',2,8)] call FUNC(FAK_checkRepack)); + statement = QUOTE([ARR_4(_player,'kat_MEDPACK_Magazine',2,8)] call FUNC(FAK_repack)); }; }; }; diff --git a/addons/misc/CfgWeapons.hpp b/addons/misc/CfgWeapons.hpp index 43f09ce2b..7d17adaf7 100644 --- a/addons/misc/CfgWeapons.hpp +++ b/addons/misc/CfgWeapons.hpp @@ -81,7 +81,7 @@ class CfgWeapons { picture = QPATHTOF(ui\IFAK.paa); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 15; + mass = 20; }; }; @@ -91,7 +91,7 @@ class CfgWeapons { editorPreview = QPATHTOF(ui\AFAK.paa); picture = QPATHTOF(ui\AFAK.paa); class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 25; + mass = 40; }; }; @@ -101,7 +101,16 @@ class CfgWeapons { editorPreview = QPATHTOF(ui\MFAK.paa); picture = QPATHTOF(ui\MFAK.paa); class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 50; + mass = 100; + }; + }; + class kat_MEDPACK: kat_IFAK { + displayName = CSTRING(MEDPACK_Display); + descriptionShort = CSTRING(MEDPACK_DESC); + editorPreview = QPATHTOF(ui\MedicationCase.paa); + picture = QPATHTOF(ui\MedicationCase.paa); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 40; }; }; }; \ No newline at end of file diff --git a/addons/misc/XEH_PREP.hpp b/addons/misc/XEH_PREP.hpp index 368f98c5b..bb34273b9 100644 --- a/addons/misc/XEH_PREP.hpp +++ b/addons/misc/XEH_PREP.hpp @@ -1,15 +1,4 @@ -PREP(addIVbag); -PREP(addVehicleCarryLoadActions); -PREP(addVehicleUnloadCarryPatientActions); PREP(BubbleWrap); -PREP(canCheckDogtag); -PREP(canStitchFullBody); -PREP(carryObject); -PREP(checkArmbandCondition); -PREP(conditionExecutionDeath); -PREP(conditionIV); -PREP(conditionIVstand); -PREP(conditionSecondChance); PREP(FAK_ammoToArray); PREP(FAK_arrayToAmmo); PREP(FAK_checkRepack); @@ -18,29 +7,56 @@ PREP(FAK_displayContent); PREP(FAK_repack); PREP(FAK_unpack); PREP(FAK_updateContents); +PREP(addIVbag); +PREP(addVehicleCarryLoadActions); +PREP(addVehicleUnloadCarryPatientActions); +PREP(bandageLocal); +PREP(canCheckDogtag); +PREP(canStitch); +PREP(canStitchFullBody); +PREP(carryObject); +PREP(checkArmbandCondition); +PREP(conditionIV); +PREP(conditionIVstand); +PREP(deserializeState); +PREP(earRinging); +PREP(findMostEffectiveWounds); +PREP(getBandageTime); +PREP(getCurrentDosage); PREP(getDogtagData); +PREP(getFullBodyStitchableWoundTime); PREP(getFullBodyStitchableWounds); PREP(getMagazineAmmoCounts); +PREP(getStitchTime); PREP(getStitchTimeFullBody); PREP(groupID); +PREP(handleBandageOpening); +PREP(handleCoagReopening); +PREP(handleEffects); PREP(handleRespawn); PREP(handleTourniquetEffects); PREP(handleUnconscious); +PREP(handleWrappedReopening); PREP(incompatibilityWarning); PREP(init); +PREP(isMedic); PREP(removeIVbag); PREP(removeTourniquetTime); +PREP(serializeState); PREP(setTourniquetTime); PREP(setUnconscious); +PREP(showDogtagData); PREP(slingArmband); +PREP(stitchWound); PREP(stopCarryingPrompt); PREP(stringToArray); +PREP(surgicalKitProgress); PREP(surgicalKitProgressFullBody); PREP(switchMagItems); PREP(treatment); PREP(treatmentIV); PREP(treatmentSuccess); -PREP(unloadAndCarryPatient); PREP(unSlingArmband); +PREP(unloadAndCarryPatient); PREP(updateDamageEffects); PREP(useItem); \ No newline at end of file diff --git a/addons/misc/XEH_postInit.sqf b/addons/misc/XEH_postInit.sqf index 6084ed4a2..a458c0d21 100644 --- a/addons/misc/XEH_postInit.sqf +++ b/addons/misc/XEH_postInit.sqf @@ -28,7 +28,7 @@ if (GVAR(incompatibilityWarning)) then { call FUNC(incompatibilityWarning); }; -[QACEGVAR(medical_treatment,tourniquetLocal), LINKFUNC(setTourniquetTime)] call CBA_fnc_addEventHandler; +[QEGVAR(hitpoints,tourniquetLocal), LINKFUNC(setTourniquetTime)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_treatment,tourniquetRemove), LINKFUNC(removeTourniquetTime)] call CBA_fnc_addEventHandler; ["kat_Armband_Red_Cross_Item", "kat_Armband_Red_Cross_Goggles"] call ACEFUNC(common,registerItemReplacement); @@ -50,7 +50,7 @@ call FUNC(FAK_updateContents); ["baseline", { private _activeTourniquets = GET_TOURNIQUETS(ACE_player); if (GVAR(tourniquetEffects_Enable)) then { - ((_activeTourniquets select 2) + (_activeTourniquets select 3) min 1) + ((_activeTourniquets select 4) + (_activeTourniquets select 5) + (_activeTourniquets select 6) + (_activeTourniquets select 7) min 1) } else {0}; }, QUOTE(ADDON)] call ACEFUNC(common,addSwayFactor); diff --git a/addons/misc/config.cpp b/addons/misc/config.cpp index bc5d59b38..d623477db 100644 --- a/addons/misc/config.cpp +++ b/addons/misc/config.cpp @@ -4,9 +4,23 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; requiredVersion = REQUIRED_VERSION; - units[] = {}; - weapons[] = {}; - magazines[] = { }; + units[] = { + "kat_Armband_Red_Cross_Object", + "kat_Armband_Medic_Object", + "kat_Armband_Doctor_Object", + "kat_Armband_Kat_Object" + }; + weapons[] = { + "kat_Armband_Doctor_Item", + "kat_Armband_Medic_Item", + "kat_Armband_Red_Cross_Item", + "kat_Armband_Kat_Item", + "kat_IFAK", + "kat_AFAK", + "kat_MFAK", + "kat_MEDPACK", + }; + magazines[] = {}; requiredAddons[] = { "kat_main", "ace_medical", diff --git a/addons/misc/functions/fnc_FAK_ammoToArray.sqf b/addons/misc/functions/fnc_FAK_ammoToArray.sqf index c84217522..d6d40be7c 100644 --- a/addons/misc/functions/fnc_FAK_ammoToArray.sqf +++ b/addons/misc/functions/fnc_FAK_ammoToArray.sqf @@ -31,6 +31,10 @@ switch (_type) do { case 1: { // AFAK _start = 2; _divider = 32; + }; + case 2: { // MEDPACK + _start = 0; + _divider = 128; }; default {}; // MFAK }; diff --git a/addons/misc/functions/fnc_FAK_checkRepack.sqf b/addons/misc/functions/fnc_FAK_checkRepack.sqf index 34ca2674e..0d31e6887 100644 --- a/addons/misc/functions/fnc_FAK_checkRepack.sqf +++ b/addons/misc/functions/fnc_FAK_checkRepack.sqf @@ -88,6 +88,7 @@ private _requiredItems = []; switch (_type) do { case 0: {_requiredItems = missionNamespace getVariable [QGVAR(IFAKContents), []];}; // IFAK case 1: {_requiredItems = missionNamespace getVariable [QGVAR(AFAKContents), []];}; // AFAK + case 2: {_requiredItems = missionNamespace getVariable [QGVAR(MEDPACKContents), []];}; // MEDPACK default {_requiredItems = missionNamespace getVariable [QGVAR(MFAKContents), []];}; // MFAK }; diff --git a/addons/misc/functions/fnc_FAK_checkSlot.sqf b/addons/misc/functions/fnc_FAK_checkSlot.sqf index 94e1ba37b..c9903c47d 100644 --- a/addons/misc/functions/fnc_FAK_checkSlot.sqf +++ b/addons/misc/functions/fnc_FAK_checkSlot.sqf @@ -34,6 +34,7 @@ private _return = false; switch (_type) do { case 0: {_max = 15;}; // IFAK case 1: {_max = 63;}; // AFAK + case 2: {_max = 255;}; // MEDPACK default {}; // MFAK }; diff --git a/addons/misc/functions/fnc_FAK_displayContent.sqf b/addons/misc/functions/fnc_FAK_displayContent.sqf index 9dbafb1b8..797925241 100644 --- a/addons/misc/functions/fnc_FAK_displayContent.sqf +++ b/addons/misc/functions/fnc_FAK_displayContent.sqf @@ -30,6 +30,7 @@ private _nline = "
"; private _itemColor = ""; private _slotColor = ""; private _slotNameArray = missionNamespace getVariable [QGVAR(FAKSlotNames), []]; +private _MEDslotNameArray = missionNamespace getVariable [QGVAR(MEDPACKSlotNames), []]; private _slotName = ""; private _fnc_arrayToHexCode = { @@ -62,6 +63,11 @@ switch (_fakType) do { _slotColor = [(missionNamespace getVariable [QGVAR(AFAK_Slot_Color), []])] call _fnc_arrayToHexCode; _itemColor = [(missionNamespace getVariable [QGVAR(AFAK_Item_Color), []])] call _fnc_arrayToHexCode; }; + case 2: { + _fakContent = missionNamespace getVariable [QGVAR(MEDPACKContents), []]; + _slotColor = [(missionNamespace getVariable [QGVAR(MEDPACK_Slot_Color), []])] call _fnc_arrayToHexCode; + _itemColor = [(missionNamespace getVariable [QGVAR(MEDPACK_Item_Color), []])] call _fnc_arrayToHexCode; + }; default { _fakContent = missionNamespace getVariable [QGVAR(MFAKContents), []]; _slotColor = [(missionNamespace getVariable [QGVAR(MFAK_Slot_Color), []])] call _fnc_arrayToHexCode; @@ -83,15 +89,31 @@ switch (_fakType) do { } forEach _x; // for each item & number in slot x _slot = _slot + 1; - switch (_slot) do { - case 1: { _slotName = _slotNameArray select 0; }; - case 2: { _slotName = _slotNameArray select 1; }; - case 3: { _slotName = _slotNameArray select 2; }; - case 4: { _slotName = _slotNameArray select 3; }; - case 5: { _slotName = _slotNameArray select 4; }; - case 6: { _slotName = _slotNameArray select 5; }; - case 7: { _slotName = _slotNameArray select 6; }; - case 8: { _slotName = _slotNameArray select 7; }; + switch (_fakType) do { + case 2: { + switch (_slot) do { + case 1: { _slotName = _MEDslotNameArray select 0; }; + case 2: { _slotName = _MEDslotNameArray select 1; }; + case 3: { _slotName = _MEDslotNameArray select 2; }; + case 4: { _slotName = _MEDslotNameArray select 3; }; + case 5: { _slotName = _MEDslotNameArray select 4; }; + case 6: { _slotName = _MEDslotNameArray select 5; }; + case 7: { _slotName = _MEDslotNameArray select 6; }; + case 8: { _slotName = _MEDslotNameArray select 7; }; + }; + }; + default { + switch (_slot) do { + case 1: { _slotName = _slotNameArray select 0; }; + case 2: { _slotName = _slotNameArray select 1; }; + case 3: { _slotName = _slotNameArray select 2; }; + case 4: { _slotName = _slotNameArray select 3; }; + case 5: { _slotName = _slotNameArray select 4; }; + case 6: { _slotName = _slotNameArray select 5; }; + case 7: { _slotName = _slotNameArray select 6; }; + case 8: { _slotName = _slotNameArray select 7; }; + }; + }; }; if (_slot > 1) then {_firstnline = _nline}; diff --git a/addons/misc/functions/fnc_FAK_repack.sqf b/addons/misc/functions/fnc_FAK_repack.sqf index 502c84bc3..1b5f7603c 100644 --- a/addons/misc/functions/fnc_FAK_repack.sqf +++ b/addons/misc/functions/fnc_FAK_repack.sqf @@ -73,6 +73,11 @@ switch (_type) do { _itemList = missionNamespace getVariable [QGVAR(AFAKContents), []]; _max = 63; }; + case 2: { // AFAK + _FAKToAdd = "kat_MEDPACK"; + _itemList = missionNamespace getVariable [QGVAR(MEDPACKContents), []]; + _max = 255; + }; default { // MFAK _FAKToAdd = "kat_MFAK"; _itemList = missionNamespace getVariable [QGVAR(MFAKContents), []]; diff --git a/addons/misc/functions/fnc_FAK_unpack.sqf b/addons/misc/functions/fnc_FAK_unpack.sqf index d19e2d617..6cd998d19 100644 --- a/addons/misc/functions/fnc_FAK_unpack.sqf +++ b/addons/misc/functions/fnc_FAK_unpack.sqf @@ -76,6 +76,13 @@ switch (_type) do { _itemList = missionNamespace getVariable [QGVAR(AFAKContents), []]; _removeOnEmptyCondition = GVAR(AFAK_RemoveWhenEmpty); }; + case 2: { // MEDPACK + _FAKToAdd = "kat_MEDPACK_Magazine"; + _slotArray = [true,true,true,true,true,true,true,true]; + _container = [(missionNamespace getVariable [QGVAR(MEDPACK_Container), 0])] call _fnc_getContainer; + _itemList = missionNamespace getVariable [QGVAR(MEDPACKContents), []]; + _removeOnEmptyCondition = GVAR(MEDPACK_RemoveWhenEmpty); + }; default { // MFAK _FAKToAdd = "kat_MFAK_Magazine"; _slotArray = [true,true,true,true,true,true,true,true]; diff --git a/addons/misc/functions/fnc_FAK_updateContents.sqf b/addons/misc/functions/fnc_FAK_updateContents.sqf index f1d8afcb5..d6b6a0ae6 100644 --- a/addons/misc/functions/fnc_FAK_updateContents.sqf +++ b/addons/misc/functions/fnc_FAK_updateContents.sqf @@ -42,6 +42,17 @@ missionNamespace setVariable [QGVAR(MFAKContents), (missionNamespace getVariable [QGVAR(MFAKSeventhSlotItem), []]), (missionNamespace getVariable [QGVAR(MFAKEighthSlotItem), []])]]; +// MEDPACK +missionNamespace setVariable [QGVAR(MEDPACKContents), +[(missionNamespace getVariable [QGVAR(MEDPACKFirstSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKSecondSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKThirdSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKFourthSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKFifthSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKSixthSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKSeventhSlotItem), []]), +(missionNamespace getVariable [QGVAR(MEDPACKEighthSlotItem), []])]]; + // Get Slot Names (didn't wanna create a new file for this) missionNamespace setVariable [QGVAR(FAKSlotNames), [(LLSTRING(FAK_Slot_1_Hint)), @@ -53,3 +64,13 @@ missionNamespace setVariable [QGVAR(FAKSlotNames), (LLSTRING(FAK_Slot_7_Hint)), (LLSTRING(FAK_Slot_8_Hint))]]; +missionNamespace setVariable [QGVAR(MEDPACKSlotNames), +[(LLSTRING(MEDPACK_Slot_1_Hint)), +(LLSTRING(MEDPACK_Slot_2_Hint)), +(LLSTRING(MEDPACK_Slot_3_Hint)), +(LLSTRING(MEDPACK_Slot_4_Hint)), +(LLSTRING(MEDPACK_Slot_5_Hint)), +(LLSTRING(MEDPACK_Slot_6_Hint)), +(LLSTRING(MEDPACK_Slot_7_Hint)), +(LLSTRING(MEDPACK_Slot_8_Hint))]]; + diff --git a/addons/misc/functions/fnc_bandageLocal.sqf b/addons/misc/functions/fnc_bandageLocal.sqf new file mode 100644 index 000000000..3b058dcf3 --- /dev/null +++ b/addons/misc/functions/fnc_bandageLocal.sqf @@ -0,0 +1,94 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Local callback for bandaging a patient's open wounds. + * + * Arguments: + * 0: Patient + * 1: Body Part + * 2: Treatment + * 3: Bandage effectiveness coefficient (default: 1) + * + * Return Value: + * None + * + * Example: + * [player, "Head", "FieldDressing"] call ace_medical_treatment_fnc_bandageLocal + * + * Public: No + */ + +params ["_patient", "_bodyPart", "_bandage", ["_bandageEffectiveness", 1, [0]]]; +TRACE_4("bandageLocal",_patient,_bodyPart,_bandage,_bandageEffectiveness); +_bodyPart = toLowerANSI _bodyPart; + +private _openWounds = GET_OPEN_WOUNDS(_patient); +private _woundsOnPart = _openWounds getOrDefault [_bodyPart, []]; +if (_woundsOnPart isEqualTo []) exitWith {}; + +// Figure out which injuries for this bodypart are the best choice to bandage +private _targetWounds = [_patient, _bandage, _bodyPart, _bandageEffectiveness * ACEGVAR(medical_treatment,bandageEffectiveness)] call ACEFUNC(medical_treatment,findMostEffectiveWounds); + +// Everything is patched up on this body part already +if (count _targetWounds == 0) exitWith {}; + +private _treatedDamage = 0; +private _clearConditionCache = false; + +{ + private _wound = _x; + _wound params ["_classID", "_amountOf", "_bleeding", "_damage"]; + _y params ["_effectiveness", "_woundIndex", "_impact"]; + + // clear condition cache if we stopped all bleeding for this injury + if (!_clearConditionCache) then { + _clearConditionCache = (_effectiveness >= _amountOf); + }; + + // Reduce the amount this injury is present + (_woundsOnPart select _woundIndex) set [1, _amountOf - _impact]; + + // Store treated damage for clearing trauma + _treatedDamage = _treatedDamage + (_impact * _damage); + + // Handle reopening bandaged wounds + if (_impact > 0 && {ACEGVAR(medical_treatment,advancedBandages) == 2}) then { + switch (true) do { + case ((toLower _bandage) find "wrapped" != -1): { + [_patient, _impact, _bodyPart, _woundIndex, _wound, _bandage] call FUNC(handleWrappedReopening); + }; + case ((toLower _bandage) find "bloodclot" != -1): { + [_patient, _impact, _bodyPart, _woundIndex, _wound, _bandage] call FUNC(handleCoagReopening); + }; + default { + [_patient, _impact, _bodyPart, _woundIndex, _wound, _bandage] call ACEFUNC(medical_treatment,handleBandageOpening); + }; + }; +}; +} forEach _targetWounds; + +_patient setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + +[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); + +// Check if we fixed limping from this treatment +if ( + ACEGVAR(medical,limping) == 1 + && {_clearConditionCache} + && {_bodyPart in ["leftleg", "rightleg", "upperleftleg", "upperrightleg"]} + && {_patient getVariable [QACEGVAR(medical,isLimping), false]} +) then { + [_patient] call ACEFUNC(medical_engine,updateDamageEffects); +}; + +if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + TRACE_2("trauma - clearing trauma after bandage",_bodyPart,_woundsOnPart); + [_patient, _bodyPart, -_treatedDamage] call ACEFUNC(medical_treatment,addTrauma); +}; + +// Reset treatment condition cache for nearby players if we stopped all bleeding +if (_clearConditionCache) then { + private _nearPlayers = (_patient nearEntities ["CAManBase", 6]) select {_x call ACEFUNC(common,isPlayer)}; + TRACE_1("clearConditionCaches: bandage",_nearPlayers); + [QEGVAR(interact_menu,clearConditionCaches), [], _nearPlayers] call CBA_fnc_targetEvent; +}; \ No newline at end of file diff --git a/addons/misc/functions/fnc_canStitch.sqf b/addons/misc/functions/fnc_canStitch.sqf new file mode 100644 index 000000000..09c7b2613 --- /dev/null +++ b/addons/misc/functions/fnc_canStitch.sqf @@ -0,0 +1,47 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam, mharis001, Brett Mayson + * Checks if the patient's body part can be stitched. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * ReturnValue: + * Can Stitch + * + * Example: + * [player, cursorTarget, "head"] call ace_medical_treatment_fnc_canStitch + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +if ((ACEGVAR(medical_treatment,consumeSurgicalKit) == 2) && {!([_medic, _patient, ["ACE_suture"]] call ACEFUNC(medical_treatment,hasItem))}) exitWith {false}; +private _unstitchableTypes = ["ETD", "Israeli_Bandage"]; +private _bandaged = GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]; +private _hasStitchableBandage = (_bandaged findIf { + _x params ["", "", "", "", "_type"]; + !(_type in _unstitchableTypes) +}) != -1; +private _isBleeding = false; +{ + _x params ["_woundClassID", "_amountOf", "_bleedingRate"]; + private _classIndex = _woundClassID / 10; + _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_amountOf > 0 && {_bleedingRate > 0} && {!(_className in ["InternalBleeding", "Evisceration"])}) then { + _isBleeding = true; + TRACE_4("canStitch - Bleeding from non-allowed wound",_woundClassID,_classIndex,_className,_isBleeding); + break; + }; + TRACE_4("canStitch",_woundClassID,_classIndex,_className,_isBleeding); + if (_isBleeding && !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"])) then {break}; +} forEach (GET_OPEN_WOUNDS(_patient) get _bodyPart); + +(!(_isBleeding) && ( + (_hasStitchableBandage)|| + (GET_COAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]) isNotEqualTo [] || + (GET_WRAPPED_WOUNDS(_patient) getOrDefault [_bodyPart, []]) isNotEqualTo [] +)) // return \ No newline at end of file diff --git a/addons/misc/functions/fnc_deserializeState.sqf b/addons/misc/functions/fnc_deserializeState.sqf new file mode 100644 index 000000000..9e1966e63 --- /dev/null +++ b/addons/misc/functions/fnc_deserializeState.sqf @@ -0,0 +1,204 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut + * Deserializes the medical state of a unit and applies it. + * + * Arguments: + * 0: Unit + * 1: State as JSON + * + * Return Value: + * None + * + * Example: + * [player, _json] call ace_medical_fnc_deserializeState + * + * Public: Yes + */ +params [["_unit", objNull, [objNull]], ["_json", "{}", [""]]]; +// Don't run in scheduled environment +if (canSuspend) exitWith { + [FUNC(deserializeState), _this] call CBA_fnc_directCall +}; +if (isNull _unit) exitWith { +}; +if (!local _unit) exitWith { + ERROR_1("unit [%1] is not local",_unit) }; + +// If unit is not initialized yet, wait until event is raised +if !(_unit getVariable [QACEGVAR(medical,initialized), false]) exitWith { + [QACEGVAR(medical,initialized), { + params ["_unit"]; + _thisArgs params ["_target"]; + + if (_unit == _target) then { + _thisArgs call FUNC(deserializeState); + [_thisType, _thisId] call CBA_fnc_removeEventHandler; + }; + }, _this] call CBA_fnc_addEventHandlerArgs; +}; + +private _state = [_json] call CBA_fnc_parseJSON; +// Set medical variables +{ + _x params ["_var", "_default"]; + private _value = _state getVariable _x; + + // Handle wound hashmaps deserialized as CBA_namespaces + if (typeName _value == "LOCATION") then { + private _keys = allVariables _value; + private _values = _keys apply {_value getVariable _x}; + _value = _keys createHashMapFromArray _values; + }; + + // Treat null as nil + if (_value isEqualTo objNull) then { + _value = _default; + }; + + _unit setVariable [_var, _value, true]; +} forEach [ + [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME], + [VAR_HEART_RATE, DEFAULT_HEART_RATE], + [VAR_BLOOD_PRESS, [80, 120]], + [VAR_PERIPH_RES, DEFAULT_PERIPH_RES], + // State transition should handle this + // [VAR_CRDC_ARRST, false], + [VAR_HEMORRHAGE, 0], + [VAR_PAIN, 0], + [VAR_IN_PAIN, false], + [VAR_PAIN_SUPP, 0], + [VAR_OPEN_WOUNDS, createHashMap], + [VAR_BANDAGED_WOUNDS, createHashMap], + [VAR_STITCHED_WOUNDS, createHashMap], + [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES], + // State transition should handle this + // [VAR_UNCON, false], + [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES], + [QACEGVAR(medical,occludedMedications), nil], + [QACEGVAR(medical,ivBags), nil], + [QACEGVAR(medical,triageLevel), 0], + [QACEGVAR(medical,triageCard), []], + [VAR_BODYPART_DAMAGE, DEFAULT_BODYPART_DAMAGE_VALUES], + [VAR_WRAPPED_WOUNDS, createHashMap], +[VAR_COAGED_WOUNDS, createHashMap], +[QACEGVAR(medical,isLimping), false], +[VAR_SPO2, DEFAULT_SPO2], +[VAR_OXYGEN_DEMAND, 0], +[VAR_VASOCONSTRICTION, 1], +[QEGVAR(airway,airway_item), ""], +[QEGVAR(airway,airway), false], +[QEGVAR(airway,clearedTime), 0], +[QEGVAR(airway,cricothyrotomy), 0], +[QEGVAR(airway,catastrophicAirway), [false, false]], +[QEGVAR(airway,obstruction), [0, 0, 0]], +[QEGVAR(airway,occlusion), [0, 0, 0]], +[QEGVAR(airway,occlusionMitigation), [false, false, false]], +[QEGVAR(airway,overstretch), false], +[QEGVAR(airway,recovery), false], +[QEGVAR(airway,wasOccluded), [0, 0, 0]], +[QEGVAR(airway,hasPuked), false], +[QEGVAR(airway,airwayStatus), [0, 0, 0]], +[QEGVAR(airway,isVisualized), false], +[QEGVAR(breathing,airwayStatus), 100], +[QEGVAR(breathing,pneumothorax), [0, 0]], +[QEGVAR(breathing,hemopneumothorax), [0, 0]], +[QEGVAR(breathing,tensionpneumothorax), [false, false]], +[QEGVAR(breathing,activeChestSeal), [false, false]], +[QEGVAR(breathing,deepPenetratingInjury), [false, false]], +[QEGVAR(breathing,etco2Monitor), []], +[QEGVAR(breathing,breathRate), 15], +[QEGVAR(breathing,nasalCannula), false], +[QEGVAR(breathing,lungSurfaceArea), 400], +[QEGVAR(breathing,chestTube), [0, 0]], +[QEGVAR(breathing,attachedVent), false], +[QEGVAR(breathing,attachedVentGUI), false], +[QEGVAR(breathing,paralysis), 0], +[QEGVAR(breathing,ventRate), 2], +[QEGVAR(breathing,TRALI), 0], +[QEGVAR(circulation,cprCount), 2], +[QEGVAR(circulation,heartRestart), false], +[QEGVAR(circulation,cardiacArrestType), 0], +[QEGVAR(circulation,bodyFluid), DEFAULT_BODY_FLUID], +[QEGVAR(circulation,isPerformingCPR), false], +[QEGVAR(circulation,OxygenationPeriod), 0], +[QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(circulation,defaultHeartRate), 80], +[QEGVAR(circulation,bloodGas), DEFAULT_BLOOD_GAS], +[QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0,0]], +[QEGVAR(circulation,ABGmenuShow), false], +[QEGVAR(circulation,ht), []], +[QEGVAR(circulation,effusion), 0], +[QEGVAR(circulation,attachedLucas), false], +[QEGVAR(circulation,attachedLucasState), false], +[QEGVAR(ophthalmology,dustInjuryLight), 0], +[QEGVAR(ophthalmology,dustInjuryHeavy), 0], +[QEGVAR(ophthalmology,eyeInjuries), [1,1]], +[QEGVAR(ophthalmology,eyeInjurySevere), false], + + +[QEGVAR(pharma,alphaAction), 1], + +[QEGVAR(pharma,IV), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,IVflow), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]], + +[QEGVAR(pharma,IVincomingFlowAmount), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,active), false], +[QEGVAR(pharma,IVPharma_PFH), 0], +[QEGVAR(pharma,IVmenuActive), false], + +[QEGVAR(pharma,externalPh), 0], +[QEGVAR(pharma,pH), 0], + +[QEGVAR(pharma,opioidFactor), 0], +[QEGVAR(pharma,opioidDepression), 0], + +[QEGVAR(pharma,kidneyFail), false], +[QEGVAR(pharma,kidneyArrest), false], +[QEGVAR(pharma,kidneyPressure), false], + +[QEGVAR(pharma,respiratoryRate), 1], +[QEGVAR(pharma,heartContractility), 1], +[QEGVAR(pharma,nauseaMult), 1], + +[VAR_LOCAL_ANESTHESIA, DEFAULT_LOCAL_ANESTHESIA], +[QEGVAR(pharma,activeEtomidateLoadingDose), false], +[QEGVAR(surgery,fractures), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(surgery,lidocaine), false], +[QEGVAR(surgery,etomidate), false], +[QEGVAR(surgery,sedated), 0], +[QEGVAR(surgery,imaging), false], +[QEGVAR(surgery,reboa), false], +[QEGVAR(surgery,surgicalBlock), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(vitals,respiratoryDepth), DEFAULT_RESPIRATORY_DEPTH], +[QEGVAR(vitals,currentWeight), 80] + +]; + +// Reset timers +_unit setVariable [QACEGVAR(medical,lastWakeUpCheck), nil]; + +// Convert medications offset to time +private _medications = _state getVariable [VAR_MEDICATIONS, []]; +{ + _x set [1, _x#1 + CBA_missionTime]; +} forEach _medications; +_unit setVariable [VAR_MEDICATIONS, _medications, true]; + +// Update effects +[_unit] call FUNC(updateDamageEffects); +[_unit] call EFUNC(circulation,updateWoundBloodLoss); + +// Transition within statemachine +private _currentState = [_unit, ACEGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +private _targetState = _state getVariable [QGVAR(statemachineState), "Default"]; +[_unit, ACEGVAR(medical,STATE_MACHINE), _currentState, _targetState] call CBA_statemachine_fnc_manualTransition; + +// Manually call wake up tranisition if necessary +if (_currentState in ["Unconscious", "CardiacArrest"] && {_targetState in ["Default", "Injured"]}) then { + [_unit, false] call ACEFUNC(medical_status,setUnconsciousState); +}; + +_state call CBA_fnc_deleteNamespace; \ No newline at end of file diff --git a/addons/misc/functions/fnc_earRinging.sqf b/addons/misc/functions/fnc_earRinging.sqf new file mode 100644 index 000000000..e858178b5 --- /dev/null +++ b/addons/misc/functions/fnc_earRinging.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg + * Handle new sound souce near ace_player and apply hearing damage. + * + * Arguments: + * 0: Strength of ear ringing + * + * Return Value: + * None + * + * Example: + * 10 call ace_hearing_fnc_earRinging + * + * Public: No + */ + +params ["_strength"]; + +if (_strength < 0.05) exitWith {}; +if (!isNull curatorCamera) exitWith {}; +if (player != ACE_player) exitWith {}; + +TRACE_2("adding",_strength * GVAR(damageCoefficent),GVAR(deafnessDV)); + + +ACEGVAR(hearing,deafnessDV) = ACEGVAR(hearing,deafnessDV) + (_strength); \ No newline at end of file diff --git a/addons/misc/functions/fnc_findMostEffectiveWounds.sqf b/addons/misc/functions/fnc_findMostEffectiveWounds.sqf new file mode 100644 index 000000000..6fedb7273 --- /dev/null +++ b/addons/misc/functions/fnc_findMostEffectiveWounds.sqf @@ -0,0 +1,93 @@ +#include "..\script_component.hpp" +/* + * Author: kymckay, LinkIsGrim + * Finds the most effective wounds to bandage on the given bodypart of the patient for the given bandage type and remaining overall bandage effectiveness. + * + * Arguments: + * 0: Patient + * 1: Treatment classname + * 2: Body part + * 3: Amount of bandage remaining (default: 1) + * 4: Wounds found from prior runs of the function (default: Empty Hashmap) + * + * Return Value: + * [Wound, [Effectiveness, Index, Impact]] of : + * + * Example: + * [cursorObject, "FieldDressing", "rightleg"] call ace_medical_treatment_fnc_findMostEffectiveWounds + * + * Public: No + */ + +params ["_patient", "_bandage", "_bodyPart", ["_bandageRemaining", 1], ["_foundWounds", createHashMap]]; +TRACE_1("findMostEffectiveWounds",count _foundWounds); + +// Get the default effectiveness for the used bandage +private _config = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Bandaging"; +private _effectiveness = getNumber (_config >> "effectiveness"); + +if (isClass (_config >> _bandage)) then { + _config = (_config >> _bandage); + + if (isNumber (_config >> "effectiveness")) then { + _effectiveness = getNumber (_config >> "effectiveness"); + }; +}; + +// Iterate over open wounds to find the most effective target +private _openWounds = GET_OPEN_WOUNDS(_patient) getOrDefault [_bodyPart, []]; +if (_openWounds isEqualTo []) exitWith {_foundWounds}; + +private _wound = EMPTY_WOUND; +private _woundIndex = -1; +private _effectivenessFound = -1; +private _impactFound = -1; + +{ + // Ignore iterated wounds + if (_x in _foundWounds) then {continue}; + _x params ["_classID", "_amountOf", "_bleeding", "_damage"]; + + private _woundEffectiveness = _effectiveness; + + // Select the classname from the wound classname storage + private _classTest = ACEGVAR(medical_damage,woundClassNamesComplex); + private _className = ACEGVAR(medical_damage,woundClassNamesComplex) select _classID; + + // Get the effectiveness of the bandage on this wound type + if (isClass (_config >> _className)) then { + private _woundTreatmentConfig = _config >> _className; + + if (isNumber (_woundTreatmentConfig >> "effectiveness")) then { + _woundEffectiveness = getNumber (_woundTreatmentConfig >> "effectiveness"); + }; + } else { + // Basic medical bandage just has a base level config (same effectiveness for all wound types) + if (_bandage != "BasicBandage") then { + WARNING_2("No config for wound type [%1] config base [%2]",_className,_config); + }; + }; + + // Multiply by bandageRemaining in case this is a rollover + _woundEffectiveness = _woundEffectiveness * _bandageRemaining; + + // Track most effective found so far + if ((_woundEffectiveness * _amountOf * _bleeding) > (_effectivenessFound * (_wound select 1) * (_wound select 2))) then { + _effectivenessFound = _woundEffectiveness; + _impactFound = _amountOf min _effectivenessFound; + _woundIndex = _forEachIndex; + _wound = _x; + }; +} forEach _openWounds; + +if (_woundIndex isEqualTo -1) exitWith {_foundWounds}; + +_bandageRemaining = _bandageRemaining - (_impactFound/_effectivenessFound); +_foundWounds set [_wound, [_effectivenessFound, _woundIndex, _impactFound]]; + +// recursion, run function again to find next most effective wound +if (ACEGVAR(medical_treatment,bandageRollover) && {_bandageRemaining > 0}) then { + [_patient, _bandage, _bodyPart, _bandageRemaining, _foundWounds] call FUNC(findMostEffectiveWounds); +}; + +_foundWounds // return \ No newline at end of file diff --git a/addons/misc/functions/fnc_getBandageTime.sqf b/addons/misc/functions/fnc_getBandageTime.sqf new file mode 100644 index 000000000..6f84b16a8 --- /dev/null +++ b/addons/misc/functions/fnc_getBandageTime.sqf @@ -0,0 +1,123 @@ +#include "..\script_component.hpp" +/* + * Author: kymckay + * Calculates the time to bandage a wound based on it's size, the patient and the medic. + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * + * Return Value: + * Treatment Time + * + * Example: + * [player, cursorTarget, "head", "FieldDressing"] call ace_medical_treatment_fnc_getBandageTime + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_bandage"]; + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; +if (_partIndex < 0) exitWith { ERROR_1("invalid partIndex - %1",_this); 0 }; + +private _targetWounds = [_patient, _bandage, _bodyPart] call ACEFUNC(medical_treatment,findMostEffectiveWounds); +TRACE_1("findMostEffectiveWounds",_targetWounds); + +private _woundCount = count _targetWounds; +private _woundKeys = keys _targetWounds; +private _woundValue = _targetWounds get (_woundKeys select 0); +private _woundAmount = _woundValue select 2; +TRACE_3("_woundAmount",_woundAmount,_woundKeys,_woundValue); + +// Everything is patched up on this body part already +if (_woundCount == 0) exitWith {0}; + +// Base bandage time is based on wound size and remaining percentage +private _bandageTimesArray = [BANDAGE_TIME_S, BANDAGE_TIME_M, BANDAGE_TIME_L]; +private _bandageTime = 0; + +{ + private _wound = _x; + _wound params ["_classID", "", "_amountOf"]; + _y params ["_effectiveness", "", "_impact"]; + private _category = (_classID % 10); + + // Base bandage time is based on wound size and remaining percentage + private _woundTime = _bandageTimesArray select _category; + + // Scale bandage time based on amount left and effectiveness (less time if only a little wound left) + // Basic bandage treatment will have a very high effectiveness and can be ignored + if (GVAR(advancedBandages != 0)) then { + _woundTime = _woundTime * linearConversion [0, _effectiveness, _impact, 0.666, 1, true]; + }; + TRACE_1("bandageTime0",_woundTime); + private _classIndex = _classID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + TRACE_1("bandageTime0.5",_className); + if (_className in ["InternalBleeding"]) then { + _bandageTime = _bandageTime; + TRACE_1("bandageTime0.6",_bandageTime); + } else { + _bandageTime = _bandageTime + _woundTime; + TRACE_2("bandageTime0.7",_bandageTime,_woundTime); + }; +} forEach _targetWounds; +TRACE_1("bandageTime1",_bandageTime); + +switch (true) do { + case (_bandage in ["Israeli_Bandage"]): { + _bandageTime = _bandageTime * 0.9; + TRACE_1("bandageTime4",_bandageTime); + }; + case (_bandage in ["ETD"]): { + _bandageTime = _bandageTime; + TRACE_1("bandageTime4",_bandageTime); + }; + case (_bandage in ["Compressed_Gauze", "fourByfour_Gauze", "Burn_Dressing"]): { + _bandageTime = _bandageTime * 0.75; + TRACE_1("bandageTime4",_bandageTime); + }; + case (_bandage in ["Hemostatic_Gauze"]): { + _bandageTime = _bandageTime * 0.9; + TRACE_1("bandageTime4",_bandageTime); + }; + case (_bandage == "Adhesive_Bandage"): { + _bandageTime = _bandageTime * 0.5; + TRACE_1("bandageTime4",_bandageTime); + }; + default {_bandageTime = _bandageTime}; + }; + +if (_woundCount > 1) then { + _bandageTime = _bandageTime - (2 * _woundCount); +}; +if (_woundAmount > 1) then { + _bandageTime = _bandageTime * ((1 + (_woundAmount * 0.2)) min 2); +}; +TRACE_2("bandageTimeAmount",_bandageTime,_woundAmount); +if ([_medic] call ACEFUNC(medical_treatment,isMedic)) then { + _bandageTime = _bandageTime * BANDAGE_TIME_MOD_MEDIC; +}; +TRACE_1("bandageTime2",_bandageTime); +// Bandaging yourself requires more work +if (_medic == _patient) then { + _bandageTime = _bandageTime * BANDAGE_TIME_MOD_SELF; +}; +switch (true) do { + case (_bandage in ["Israeli_Bandage"]): { + _bandageTime = _bandageTime max 6; + TRACE_1("bandageTime4",_bandageTime); + }; + case (_bandage in ["ETD"]): { + _bandageTime = _bandageTime max 12; + TRACE_1("bandageTime4",_bandageTime); + }; + default {_bandageTime = _bandageTime}; + }; + +TRACE_2("bandageTime5",_bandageTime,_woundCount); +// Nobody can bandage instantly +_bandageTime max 3 \ No newline at end of file diff --git a/addons/misc/functions/fnc_getCurrentDosage.sqf b/addons/misc/functions/fnc_getCurrentDosage.sqf new file mode 100644 index 000000000..249026bd4 --- /dev/null +++ b/addons/misc/functions/fnc_getCurrentDosage.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror, Cplhardcore + * Gets effective count of medications in a unit's system + * (each medication dose is scaled from 0..1 based on time till max effect and max time in system) + * + * Arguments: + * 0: The patient + * 1: Medication (not case sensitive) + * 2: Get raw count (true) or effect ratio (false) (default: true) + * + * Returns Value: + * 0: Dose Count + * 1: Medication effectiveness (0-1) + * + * + * Example: + * [player, "Epinephrine"] call kat_misc_fnc_getCurrentDosage + * + * Public: No + */ + +params ["_target", "_medication"]; +private _medDose = 0; +{ + _x params ["_xMed", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", "", "", "", "_dose"]; + if (_xMed == _medication) then { + private _timeInSystem = CBA_missionTime - _timeAdded; + // as used in handleUnitVitals, a medication effectiveness will start low, ramp up to timeTillMaxEffect, and then drop off + _effectiveness = (((_timeInSystem / _timeTillMaxEffect) ^ 2) min 1) * (_maxTimeInSystem - _timeInSystem) / _maxTimeInSystem; + _medDose = _medDose + (_dose * _effectiveness); + }; +} forEach (_target getVariable [VAR_MEDICATIONS, []]); + +TRACE_5("getMedicationCount",_target,_medication,_dose,_effectiveness,_medDose); + +_medDose \ No newline at end of file diff --git a/addons/misc/functions/fnc_getDogtagData.sqf b/addons/misc/functions/fnc_getDogtagData.sqf index a05ee5f45..f086b1ae5 100644 --- a/addons/misc/functions/fnc_getDogtagData.sqf +++ b/addons/misc/functions/fnc_getDogtagData.sqf @@ -20,13 +20,10 @@ params ["_target"]; -// Check if the data was already created -private _dogTagData = _target getVariable QACEGVAR(dogtags,dogtagData); -if (!isNil "_dogTagData") exitWith {_dogTagData}; - // Create dog tag data once for the unit: nickname, code (eg. 135-13-900) and blood type private _targetName = [_target, false, true] call ACEFUNC(common,getName); private _targetBlood = _target call EFUNC(circulation,bloodType); +private _targetWeight = _target getVariable [QEGVAR(vitals,currentWeight), 80]; switch (_targetBlood) do { case "O": {_targetBlood = "0+"}; @@ -42,7 +39,7 @@ switch (_targetBlood) do { private _dogTagData = [ _targetName, _targetBlood, //EDIT by Katalam switch name to target objective //EDIT 2 changed called function, old: ace_dogtags_fnc_bloodType //EDIT 3 working solution for added rhesus factor - _target call FUNC(groupID) //EDIT changed called function, old: ace_dogtags_fnc_ssns + _targetWeight ]; // Store it _target setVariable [QACEGVAR(dogtags,dogtagData), _dogTagData, true]; diff --git a/addons/misc/functions/fnc_getFullBodyStitchableWoundTime.sqf b/addons/misc/functions/fnc_getFullBodyStitchableWoundTime.sqf new file mode 100644 index 000000000..87739539e --- /dev/null +++ b/addons/misc/functions/fnc_getFullBodyStitchableWoundTime.sqf @@ -0,0 +1,82 @@ +#include "..\script_component.hpp" +/* + * Author: kymckay + * Returns a hashmap of the stitchable wounds that the given unit has on each body part. + * A stitchable wound is a bandaged wound on a body part that does not have any bleeding wounds. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Stitchable Wounds + * + * Example: + * [player] call kat_misc_fnc_getFullBodyStitchableWoundTime + * + * Public: No + */ + +params ["_unit"]; + +// First determine which body parts have a bleeding wound +private _bleedingBodyParts = createHashMap; +{ + private _isBleeding = _y findIf { + _x params ["_woundClassID", "_amountOf", "_bleedingRate"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + (_amountOf > 0 && {_bleedingRate > 0} && !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"])); + } != -1; + + if (_isBleeding) then { + _bleedingBodyParts set [_x, true]; + }; +} forEach GET_OPEN_WOUNDS(_unit); +private _totalAmount = 0; +// Any bandaged wound on a body part not bleeding is stitchable +private _unstitchableTypes = ["ETD", "Israeli_Bandage"]; +private _stitchableWounds = createHashMap; +{ + if (!(_x in _bleedingBodyParts) && {_y isNotEqualTo []}) then { + private _filteredWounds = _y select { + _x params ["_woundClassID", "_amountOf", "_bleedingRate", "", "_type"]; + !(_type in _unstitchableTypes); + _totalAmount = _totalAmount + (_amountOf max 1); + }; + + if (_filteredWounds isNotEqualTo []) then { + _stitchableWounds set [_x, _filteredWounds]; + }; + }; +} forEach GET_BANDAGED_WOUNDS(_unit); + +{ + if (!(_x in _bleedingBodyParts) && {_y isNotEqualTo []}) then { + private _filteredWounds = _y select { + _x params ["_woundClassID", "_amountOf", "_bleedingRate", "", "_type"]; + !(_type in _unstitchableTypes); + _totalAmount = _totalAmount + (_amountOf max 1); + }; + + if (_filteredWounds isNotEqualTo []) then { + _stitchableWounds set [_x, _filteredWounds]; + }; + }; +} forEach GET_COAGED_WOUNDS(_unit); + +{ + if (!(_x in _bleedingBodyParts) && {_y isNotEqualTo []}) then { + private _filteredWounds = _y select { + _x params ["_woundClassID", "_amountOf", "_bleedingRate", "", "_type"]; + !(_type in _unstitchableTypes); + _totalAmount = _totalAmount + (_amountOf max 1); + }; + + if (_filteredWounds isNotEqualTo []) then { + _stitchableWounds set [_x, _filteredWounds]; + }; + }; +} forEach GET_WRAPPED_WOUNDS(_unit); + + +_totalAmount \ No newline at end of file diff --git a/addons/misc/functions/fnc_getFullBodyStitchableWounds.sqf b/addons/misc/functions/fnc_getFullBodyStitchableWounds.sqf index c512f0643..b7749ad2e 100644 --- a/addons/misc/functions/fnc_getFullBodyStitchableWounds.sqf +++ b/addons/misc/functions/fnc_getFullBodyStitchableWounds.sqf @@ -22,8 +22,10 @@ params ["_unit"]; private _bleedingBodyParts = createHashMap; { private _isBleeding = _y findIf { - _x params ["", "_amountOf", "_bleedingRate"]; - _amountOf > 0 && {_bleedingRate > 0} + _x params ["_woundClassID", "_amountOf", "_bleedingRate"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + (_amountOf > 0 && {_bleedingRate > 0} && !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"])); } != -1; if (_isBleeding) then { @@ -32,11 +34,46 @@ private _bleedingBodyParts = createHashMap; } forEach GET_OPEN_WOUNDS(_unit); // Any bandaged wound on a body part not bleeding is stitchable +private _unstitchableTypes = ["ETD", "Israeli_Bandage"]; private _stitchableWounds = createHashMap; { if (!(_x in _bleedingBodyParts) && {_y isNotEqualTo []}) then { - _stitchableWounds set [_x, _y]; + private _filteredWounds = _y select { + _x params ["_woundClassID", "_amountOf", "_bleedingRate", "", "_type"]; + !(_type in _unstitchableTypes) + }; + + if (_filteredWounds isNotEqualTo []) then { + _stitchableWounds set [_x, _filteredWounds]; + }; }; } forEach GET_BANDAGED_WOUNDS(_unit); +{ + if (!(_x in _bleedingBodyParts) && {_y isNotEqualTo []}) then { + private _filteredWounds = _y select { + _x params ["_woundClassID", "_amountOf", "_bleedingRate", "", "_type"]; + !(_type in _unstitchableTypes) + }; + + if (_filteredWounds isNotEqualTo []) then { + _stitchableWounds set [_x, _filteredWounds]; + }; + }; +} forEach GET_COAGED_WOUNDS(_unit); + +{ + if (!(_x in _bleedingBodyParts) && {_y isNotEqualTo []}) then { + private _filteredWounds = _y select { + _x params ["_woundClassID", "_amountOf", "_bleedingRate", "", "_type"]; + !(_type in _unstitchableTypes) + }; + + if (_filteredWounds isNotEqualTo []) then { + _stitchableWounds set [_x, _filteredWounds]; + }; + }; +} forEach GET_WRAPPED_WOUNDS(_unit); + + _stitchableWounds \ No newline at end of file diff --git a/addons/misc/functions/fnc_getStitchTime.sqf b/addons/misc/functions/fnc_getStitchTime.sqf new file mode 100644 index 000000000..253ae32d7 --- /dev/null +++ b/addons/misc/functions/fnc_getStitchTime.sqf @@ -0,0 +1,56 @@ +#include "..\script_component.hpp" +/* + * Author: kymckay + * Calculates the Surgical Kit treatment time based on the amount of stitchable wounds. + * + * Arguments: + * 0: Medic (not used) + * 1: Patient + * 2: Body Part + * + * Return Value: + * Treatment Time + * + * Example: + * [player, cursorObject, "head"] call ace_medical_treatment_fnc_getStitchTime + * + * Public: No + */ + +params ["", "_patient", "_bodyPart"]; + +private _unstitchableTypes = ["ETD", "Israeli_Bandage"]; + +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]; +private _clottedWounds = GET_COAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]; +private _wrappedWounds = GET_WRAPPED_WOUNDS(_patient) getOrDefault [_bodyPart, []]; +private _amountOf = 0; + +private _stitchableWounds = _bandagedWounds select { + _x params ["_woundClassID", "_amountOfWounds", "_bleedingRate", "", "_type"]; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + _amountOf = _amountOf + (_amountOfWounds max 1); + !(_type in _unstitchableTypes) && !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"]); +}; + +private _stitchableClottedWounds = _clottedWounds select { + _x params ["_woundClassID", "_amountOfWounds", "_bleedingRate", "", "_type"]; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + _amountOf = _amountOf + (_amountOfWounds max 1); + !(_type in _unstitchableTypes) && !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"]); +}; + +private _stitchableWrappedWounds = _wrappedWounds select { + _x params ["_woundClassID", "_amountOfWounds", "_bleedingRate", "", "_type"]; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + _amountOf = _amountOf + (_amountOfWounds max 1);; + !(_type in _unstitchableTypes) && !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"]); +}; +TRACE_1("AmountOf",_amountOf); +_amountOf * ACEGVAR(medical_treatment,woundStitchTime) \ No newline at end of file diff --git a/addons/misc/functions/fnc_getStitchTimeFullBody.sqf b/addons/misc/functions/fnc_getStitchTimeFullBody.sqf index cc4f2c2dc..2a2127037 100644 --- a/addons/misc/functions/fnc_getStitchTimeFullBody.sqf +++ b/addons/misc/functions/fnc_getStitchTimeFullBody.sqf @@ -18,10 +18,8 @@ params ["", "_patient"]; -private _stitchableTotal = 0; +private _amount = 0; -{ - _stitchableTotal = _stitchableTotal + count _y; -} forEach (_patient call FUNC(getFullBodyStitchableWounds)); +private _amount = _patient call FUNC(getFullBodyStitchableWoundTime); -_stitchableTotal * ACEGVAR(medical_treatment,woundStitchTime); +_amount * ACEGVAR(medical_treatment,woundStitchTime); diff --git a/addons/misc/functions/fnc_groupID.sqf b/addons/misc/functions/fnc_groupID.sqf index 8c1ba7bd4..464667099 100644 --- a/addons/misc/functions/fnc_groupID.sqf +++ b/addons/misc/functions/fnc_groupID.sqf @@ -24,5 +24,5 @@ if (_unit getVariable [QGVAR(loadout), nil] isEqualType "") exitWith { private _loadout = _unit getVariable QGVAR(loadout); format ["%1: %2", _groupID, _loadout]; }; -private _loadout = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); +private _loadout = getText (configOf _unit >> "displayName"); format ["%1: %2", _groupID, _loadout]; diff --git a/addons/misc/functions/fnc_handleBandageOpening.sqf b/addons/misc/functions/fnc_handleBandageOpening.sqf new file mode 100644 index 000000000..eba99632d --- /dev/null +++ b/addons/misc/functions/fnc_handleBandageOpening.sqf @@ -0,0 +1,197 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Handles the bandage of a patient. + * + * Arguments: + * 0: The target + * 1: The impact + * 2: Body part + * 3: Injury index + * 4: Injury + * 5: Used Bandage type + * 6: New Bandage Optional, default is true + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage", ["_isNew", true]]; +TRACE_6("handleBandageOpening",_target,_impact,_part,_injuryIndex,_injury,_bandage); + +_injury params ["_classID", "_amountOf", "_bleeding", "_damage"]; + +private _className = ACEGVAR(medical_damage,woundClassNamesComplex) select _classID; +private _reopeningChance = DEFAULT_BANDAGE_REOPENING_CHANCE; +private _reopeningMinDelay = DEFAULT_BANDAGE_REOPENING_MIN_DELAY; +private _reopeningMaxDelay = DEFAULT_BANDAGE_REOPENING_MAX_DELAY; + +// Get the default values for the used bandage +private _config = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Bandaging"; + +if (isClass (_config >> _bandage)) then { + _config = _config >> _bandage; + _reopeningChance = getNumber (_config >> "reopeningChance"); + _reopeningMinDelay = getNumber (_config >> "reopeningMinDelay"); + _reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay; +} else { + WARNING_2("No config for bandage [%1] config base [%2]",_bandage,_config); +}; + +if (isClass (_config >> _className)) then { + private _woundTreatmentConfig = _config >> _className; + + if (isNumber (_woundTreatmentConfig >> "reopeningChance")) then { + _reopeningChance = getNumber (_woundTreatmentConfig >> "reopeningChance"); + }; + + if (isNumber (_woundTreatmentConfig >> "reopeningMinDelay")) then { + _reopeningMinDelay = getNumber (_woundTreatmentConfig >> "reopeningMinDelay"); + }; + + if (isNumber (_woundTreatmentConfig >> "reopeningMaxDelay")) then { + _reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay; + }; +} else { + WARNING_2("No config for wound type [%1] config base [%2]",_className,_config); +}; +TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay); + +private _bandagedWounds = GET_BANDAGED_WOUNDS(_target); + +private _exist = false; +{ + _x params ["_id", "_amountOf", "", "", "_oldBandage"]; + if ((_id == _classID) && (_oldBandage == _bandage)) exitWith { + _x set [1, _amountOf + _impact]; + TRACE_2("adding to existing bandagedWound",_id,_part); + _exist = true; + }; +} forEach (_bandagedWounds getOrDefault [_part, []]); + +if (!_exist) then { + TRACE_2("adding new bandagedWound",_classID,_part); + private _bandagedInjury = +_injury; + _bandagedInjury set [1, _impact]; + _bandagedInjury set [4, _bandage]; + _bandagedInjury set [5, _injuryIndex]; + (_bandagedWounds getOrDefault [_part, [], true]) pushBack _bandagedInjury; +}; + + +_target setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; + +// _reopeningChance = 1; +// _reopeningMinDelay = 5; +// _reopeningMaxDelay = 6; +private _delay = ((_reopeningMinDelay + random (_reopeningMaxDelay - _reopeningMinDelay)) * ((1 - _bleeding) max 0.7)); +TRACE_1("",_reopeningChance); +// Check if we are ever going to reopen this +if (random 1 <= _reopeningChance * ACEGVAR(medical_treatment,woundReopenChance)) then { + TRACE_1("Will open",_delay); + [{ + params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; + TRACE_5("reopen delay finished",_target,_impact,_part,_injuryIndex,_injury); + + private _openWounds = GET_OPEN_WOUNDS(_target); + private _woundsOnPart = _openWounds getOrDefault [_part, []]; + if (count _woundsOnPart - 1 < _injuryIndex) exitWith { TRACE_2("index bounds",_injuryIndex,count _woundsOnPart); }; + + _injury params ["_classID"]; + + private _selectedInjury = _woundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "", "_selDamage"]; + if (_selClassID == _classID) then { // matching the IDs + private _bandagedWounds = GET_BANDAGED_WOUNDS(_target); + private _exist = false; + { + _x params ["_id", "_amountOf"]; + if (_id == _classID) exitWith { + TRACE_2("bandagedWound exists",_id,_classID); + _x set [1, 0 max (_amountOf - _impact)]; + _exist = true; + }; + } forEach (_bandagedWounds getOrDefault [_part, []]); + TRACE_2("Before openWound update",_openWounds,_bandagedWounds); + if (_exist) then { + TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); + _selectedInjury set [1, _selAmount + _impact]; + TRACE_3("Reopening Wound2",_selectedInjury,_impact,_selAmount); + _target setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; + _target setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_target] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _part; + + // Re-add trauma and damage visuals + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_target, _part, _selDamage * _impact] call ACEFUNC(medical_treatment,addTrauma); + }; + + // Check if we gained limping from this wound re-opening + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_target] call FUNC(updateDamageEffects); + }; + }; + TRACE_2("After openWound update",_openWounds,_bandagedWounds); + } else { + TRACE_3("no match",_selectedInjury,_classID,_part); + }; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; +} else { + private _delay = _delay * (random [1.5, 2, 3]); + TRACE_1("Will open",_delay); + [{ + params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; + TRACE_5("reopen delay finished",_target,_impact,_part,_injuryIndex,_injury); + + private _openWounds = GET_OPEN_WOUNDS(_target); + private _woundsOnPart = _openWounds getOrDefault [_part, []]; + if (count _woundsOnPart - 1 < _injuryIndex) exitWith { TRACE_2("index bounds",_injuryIndex,count _woundsOnPart); }; + + _injury params ["_classID"]; + + private _selectedInjury = _woundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "", "_selDamage"]; + if (_selClassID == _classID) then { // matching the IDs + private _bandagedWounds = GET_BANDAGED_WOUNDS(_target); + private _exist = false; + { + _x params ["_id", "_amountOf"]; + if (_id == _classID) exitWith { + TRACE_2("bandagedWound exists",_id,_classID); + _x set [1, 0 max (_amountOf - _impact)]; + _exist = true; + }; + } forEach (_bandagedWounds getOrDefault [_part, []]); + TRACE_2("Before openWound update",_openWounds,_bandagedWounds); + if (_exist) then { + TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); + _selectedInjury set [1, _selAmount + _impact]; + TRACE_3("Reopening Wound2",_selectedInjury,_impact,_selAmount); + _target setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; + _target setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_target] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _part; + + // Re-add trauma and damage visuals + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_target, _part, _selDamage * _impact] call ACEFUNC(medical_treatment,addTrauma); + }; + + // Check if we gained limping from this wound re-opening + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_target] call FUNC(updateDamageEffects); + }; + }; + TRACE_2("After openWound update",_openWounds,_bandagedWounds); + } else { + TRACE_3("no match",_selectedInjury,_classID,_part); + }; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; +}; \ No newline at end of file diff --git a/addons/misc/functions/fnc_handleCoagReopening.sqf b/addons/misc/functions/fnc_handleCoagReopening.sqf new file mode 100644 index 000000000..924c91664 --- /dev/null +++ b/addons/misc/functions/fnc_handleCoagReopening.sqf @@ -0,0 +1,185 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Handles the Coag Bandage of a patient. + * + * Arguments: + * 0: The target + * 1: The impact + * 2: Body part + * 3: Injury index + * 4: Injury + * 5: Used Bandage type + * 6: New Bandage Optional, default is true + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage", ["_isNew", true]]; +TRACE_6("handleBandageOpening",_target,_impact,_part,_injuryIndex,_injury,_bandage); + +_injury params ["_classID", "_amountOf", "_bleeding", "_damage"]; + +private _className = ACEGVAR(medical_damage,woundClassNamesComplex) select _classID; +private _reopeningChance = DEFAULT_BANDAGE_REOPENING_CHANCE; +private _reopeningMinDelay = DEFAULT_BANDAGE_REOPENING_MIN_DELAY; +private _reopeningMaxDelay = DEFAULT_BANDAGE_REOPENING_MAX_DELAY; + +// Get the default values for the used bandage +private _config = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Bandaging"; + +if (isClass (_config >> _bandage)) then { + _config = _config >> _bandage; + _reopeningChance = getNumber (_config >> "reopeningChance"); + _reopeningMinDelay = getNumber (_config >> "reopeningMinDelay"); + _reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay; +} else { + WARNING_2("No config for bandage [%1] config base [%2]",_bandage,_config); +}; + +if (isClass (_config >> _className)) then { + private _woundTreatmentConfig = _config >> _className; + + if (isNumber (_woundTreatmentConfig >> "reopeningChance")) then { + _reopeningChance = getNumber (_woundTreatmentConfig >> "reopeningChance"); + }; + + if (isNumber (_woundTreatmentConfig >> "reopeningMinDelay")) then { + _reopeningMinDelay = getNumber (_woundTreatmentConfig >> "reopeningMinDelay"); + }; + + if (isNumber (_woundTreatmentConfig >> "reopeningMaxDelay")) then { + _reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay; + }; +} else { + WARNING_2("No config for wound type [%1] config base [%2]",_className,_config); +}; +TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay); + +private _bandagedWounds = GET_COAGED_WOUNDS(_target); + +if (_isNew) then { + TRACE_2("adding new bandagedWound",_classID,_part); + private _bandagedInjury = +_injury; + _bandagedInjury set [1, _impact]; + _bandagedInjury set [4, _bandage]; + _bandagedInjury set [5, CBA_missionTime]; + (_bandagedWounds getOrDefault [_part, [], true]) pushBack _bandagedInjury; + _target setVariable [VAR_COAGED_WOUNDS, _bandagedWounds, true]; +}; + +// _reopeningChance = 1; +// _reopeningMinDelay = 5; +// _reopeningMaxDelay = 6; +private _delay = ((_reopeningMinDelay + random (_reopeningMaxDelay - _reopeningMinDelay)) * (1 - _bleeding)); +TRACE_1("",_reopeningChance); +// Check if we are ever going to reopen this +if (random 1 <= _reopeningChance * ACEGVAR(medical_treatment,woundReopenChance)) then { + TRACE_1("Will open",_delay); + [{ + params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; + TRACE_5("reopen delay finished",_target,_impact,_part,_injuryIndex,_injury); + + private _openWounds = GET_OPEN_WOUNDS(_target); + private _woundsOnPart = _openWounds getOrDefault [_part, []]; + if (count _woundsOnPart - 1 < _injuryIndex) exitWith { TRACE_2("index bounds",_injuryIndex,count _woundsOnPart); }; + + _injury params ["_classID", "", "", "", "", "_time"]; + + private _selectedInjury = _woundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "", "_selDamage", "", "_selTime"]; + if ((_selClassID == _classID) && (_selTime == _time)) then { // matching the IDs + private _bandagedWounds = GET_COAGED_WOUNDS(_target); + private _exist = false; + { + _x params ["_id", "_amountOf"]; + if (_id == _classID) exitWith { + TRACE_2("bandagedWound exists",_id,_classID); + _x set [1, 0 max (_amountOf - _impact)]; + _exist = true; + }; + } forEach (_bandagedWounds getOrDefault [_part, []]); + TRACE_2("Before openWound update",_openWounds,_bandagedWounds); + if (_exist) then { + TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); + _selectedInjury set [1, _selAmount + _impact]; + TRACE_3("Reopening Wound2",_selectedInjury,_impact,_selAmount); + _target setVariable [VAR_COAGED_WOUNDS, _bandagedWounds, true]; + _target setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_target] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _part; + + // Re-add trauma and damage visuals + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_target, _part, _selDamage * _impact] call ACEFUNC(medical_treatment,addTrauma); + }; + + // Check if we gained limping from this wound re-opening + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_target] call FUNC(updateDamageEffects); + }; + }; + TRACE_2("After openWound update",_openWounds,_bandagedWounds); + } else { + TRACE_3("no match",_selectedInjury,_classID,_part); + }; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; +} else { + private _delay = _delay * (random [1.5, 2, 3]); + TRACE_1("Will open",_delay); + [{ + params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; + TRACE_5("reopen delay finished",_target,_impact,_part,_injuryIndex,_injury); + + private _openWounds = GET_OPEN_WOUNDS(_target); + private _woundsOnPart = _openWounds getOrDefault [_part, []]; + if (count _woundsOnPart - 1 < _injuryIndex) exitWith { TRACE_2("index bounds",_injuryIndex,count _woundsOnPart); }; + + _injury params ["_classID", "", "", "", "", "_time"]; + + private _selectedInjury = _woundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "", "_selDamage", "", "_selTime"]; + if ((_selClassID == _classID) && (_selTime == _time)) then { // matching the IDs + private _bandagedWounds = GET_BANDAGED_WOUNDS(_target); + private _exist = false; + { + _x params ["_id", "_amountOf"]; + if (_id == _classID) exitWith { + TRACE_2("bandagedWound exists",_id,_classID); + _x set [1, 0 max (_amountOf - _impact)]; + _exist = true; + }; + } forEach (_bandagedWounds getOrDefault [_part, []]); + TRACE_2("Before openWound update",_openWounds,_bandagedWounds); + if (_exist) then { + TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); + _selectedInjury set [1, _selAmount + _impact]; + TRACE_3("Reopening Wound2",_selectedInjury,_impact,_selAmount); + _target setVariable [VAR_COAGED_WOUNDS, _bandagedWounds, true]; + _target setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_target] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _part; + + // Re-add trauma and damage visuals + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_target, _part, _selDamage * _impact] call ACEFUNC(medical_treatment,addTrauma); + }; + + // Check if we gained limping from this wound re-opening + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_target] call FUNC(updateDamageEffects); + }; + }; + TRACE_2("After openWound update",_openWounds,_bandagedWounds); + } else { + TRACE_3("no match",_selectedInjury,_classID,_part); + }; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; +}; \ No newline at end of file diff --git a/addons/misc/functions/fnc_handleEffects.sqf b/addons/misc/functions/fnc_handleEffects.sqf new file mode 100644 index 000000000..e4bbbd203 --- /dev/null +++ b/addons/misc/functions/fnc_handleEffects.sqf @@ -0,0 +1,75 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut + * Handles any visual effects of medical. + * Note: Heart beat sounds run in a different PFH - see fnc_effectHeartBeat. + * + * Arguments: + * 0: Manual, instant update (default: false) + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_feedback_fnc_handleEffects + * + * Public: No + */ +params [["_manualUpdate", false]]; + +if (ACEGVAR(common,OldIsCamera) || {!alive ACE_player}) exitWith { + [false, 0] call ACEFUNC(medical_feedback,effectUnconscious); + [false] call ACEFUNC(medical_feedback,effectPain); + [false] call ACEFUNC(medical_feedback,effectBloodVolume); + [false] call ACEFUNC(medical_feedback,effectBloodVolumeIcon); + [false] call ACEFUNC(medical_feedback,effectBleeding); +}; + +BEGIN_COUNTER(handleEffects); + +// - Current state info ------------------------------------------------------- +private _bleedingStrength = GET_BLOOD_LOSS(ACE_player); +private _bloodVolume = GET_BLOOD_VOLUME_LITERS(ACE_player); +private _unconscious = IS_UNCONSCIOUS(ACE_player); +private _heartRate = GET_HEART_RATE(ACE_player); +private _pain = GET_PAIN_PERCEIVED(ACE_player); +private _wounds = GET_OPEN_WOUNDS(ACE_player); +private _bleedRates = ACE_player getVariable [VAR_BODY_BLEED_RATE, [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _hasExternalBleeding = (selectMax _bleedRates) > 0; +// Indicate if unit is bleeding at all +if (_hasExternalBleeding) then { + _bleedingStrength = _bleedingStrength; +} else { + _bleedingStrength = 0; +}; + +if ((!ACEGVAR(medical_feedback,heartBeatEffectRunning)) && {_heartRate != 0} && {(_heartRate > 160) || {_heartRate < 60}}) then { + TRACE_1("Starting heart beat effect",_heartRate); + ACEGVAR(medical_feedback,heartBeatEffectRunning) = true; + [] call ACEFUNC(medical_feedback,effectHeartBeat); +}; + +// - Visual effects ----------------------------------------------------------- +[_unconscious, 2] call ACEFUNC(medical_feedback,effectUnconscious); +[ + true, + linearConversion [BLOOD_VOLUME_CLASS_2_HEMORRHAGE, BLOOD_VOLUME_CLASS_4_HEMORRHAGE, _bloodVolume, 0, 1, true] +] call ACEFUNC(medical_feedback,effectBloodVolume); +[ + true, + ceil linearConversion [ + BLOOD_VOLUME_CLASS_2_HEMORRHAGE, BLOOD_VOLUME_CLASS_4_HEMORRHAGE, + _bloodVolume, + 0, 6, true + ] +] call ACEFUNC(medical_feedback,effectBloodVolumeIcon); + +[!_unconscious, _pain] call ACEFUNC(medical_feedback,effectPain); +[!_unconscious, _bleedingStrength, _manualUpdate] call ACEFUNC(medical_feedback,effectBleeding); + +// - Tourniquets, fractures and splints indication --------------------------------------- +if (ACEGVAR(medical_feedback,enableHUDIndicators)) then { + [] call ACEFUNC(medical_feedback,handleHUDIndicators); +}; + +END_COUNTER(handleEffects); \ No newline at end of file diff --git a/addons/misc/functions/fnc_handleRespawn.sqf b/addons/misc/functions/fnc_handleRespawn.sqf index 0204b8673..c1d15cf34 100644 --- a/addons/misc/functions/fnc_handleRespawn.sqf +++ b/addons/misc/functions/fnc_handleRespawn.sqf @@ -31,4 +31,4 @@ _unit setVariable [QGVAR(Tourniquet_LegNecrosis), 0]; _unit setVariable [QGVAR(Tourniquet_PFH), -1]; _unit setVariable [QGVAR(Tourniquet_LegNecrosis_Threshold), 0, true]; -[QGVAR(handleRespawn), _unit] call CBA_fnc_localEvent; +[QGVAR(handleRespawn), _unit] call CBA_fnc_localEvent; \ No newline at end of file diff --git a/addons/misc/functions/fnc_handleTourniquetEffects.sqf b/addons/misc/functions/fnc_handleTourniquetEffects.sqf index 01f9f3316..a49271b4d 100644 --- a/addons/misc/functions/fnc_handleTourniquetEffects.sqf +++ b/addons/misc/functions/fnc_handleTourniquetEffects.sqf @@ -36,11 +36,11 @@ private _tourniquetPFH = [{ private _tourniquet_ArmNecrosis = _unit getVariable [QGVAR(Tourniquet_ArmNecrosis), 0]; private _tourniquet_LegNecrosis = _unit getVariable [QGVAR(Tourniquet_LegNecrosis), 0]; - private _activeTourniquets = GET_TOURNIQUETS(_unit); - private _armTourniquets = (_activeTourniquets select 2) + (_activeTourniquets select 3); - private _legTourniquets = (_activeTourniquets select 4) + (_activeTourniquets select 5); + private _activeTourniquets = GET_KAT_TOURNIQUETS(_unit); + private _armTourniquets = (_activeTourniquets select 4) + (_activeTourniquets select 5) + (_activeTourniquets select 6) + (_activeTourniquets select 7); + private _legTourniquets = (_activeTourniquets select 8) + (_activeTourniquets select 9) + (_activeTourniquets select 10) + (_activeTourniquets select 11); - if (_armTourniquets > 1) then { + if (_armTourniquets > 0) then { _tourniquet_ArmNecrosis = _tourniquet_ArmNecrosis + (0.16 * GVAR(tourniquetEffects_PositiveMultiplier)); if (_tourniquet_ArmNecrosis >= 100) then { _tourniquet_ArmNecrosis = 100; @@ -53,7 +53,7 @@ private _tourniquetPFH = [{ }; }; - if (_legTourniquets > 1) then { + if (_legTourniquets > 0) then { _tourniquet_LegNecrosis = _tourniquet_LegNecrosis + (0.16 * GVAR(tourniquetEffects_PositiveMultiplier)); if (_tourniquet_LegNecrosis >= 100) then { diff --git a/addons/misc/functions/fnc_handleWrappedReopening.sqf b/addons/misc/functions/fnc_handleWrappedReopening.sqf new file mode 100644 index 000000000..c71c3d87b --- /dev/null +++ b/addons/misc/functions/fnc_handleWrappedReopening.sqf @@ -0,0 +1,199 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Handles the Coag Bandage of a patient. + * + * Arguments: + * 0: The target + * 1: The impact + * 2: Body part + * 3: Injury index + * 4: Injury + * 5: Used Bandage type + * 6: New Bandage Optional, default is true + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage", ["_isNew", true]]; +TRACE_6("handleBandageOpening",_target,_impact,_part,_injuryIndex,_injury,_bandage); + +_injury params ["_classID", "_amountOf", "_bleeding", "_damage"]; + +private _className = ACEGVAR(medical_damage,woundClassNamesComplex) select _classID; +private _reopeningChance = DEFAULT_BANDAGE_REOPENING_CHANCE; +private _reopeningMinDelay = DEFAULT_BANDAGE_REOPENING_MIN_DELAY; +private _reopeningMaxDelay = DEFAULT_BANDAGE_REOPENING_MAX_DELAY; + +// Get the default values for the used bandage +private _config = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Bandaging"; + +if (isClass (_config >> _bandage)) then { + _config = _config >> _bandage; + _reopeningChance = getNumber (_config >> "reopeningChance"); + _reopeningMinDelay = getNumber (_config >> "reopeningMinDelay"); + _reopeningMaxDelay = getNumber (_config >> "reopeningMaxDelay") max _reopeningMinDelay; +} else { + WARNING_2("No config for bandage [%1] config base [%2]",_bandage,_config); +}; + +if (isClass (_config >> _className)) then { + private _woundTreatmentConfig = _config >> _className; + + if (isNumber (_woundTreatmentConfig >> "reopeningChance")) then { + _reopeningChance = getNumber (_woundTreatmentConfig >> "reopeningChance"); + }; + + if (isNumber (_woundTreatmentConfig >> "reopeningMinDelay")) then { + _reopeningMinDelay = getNumber (_woundTreatmentConfig >> "reopeningMinDelay"); + }; + + if (isNumber (_woundTreatmentConfig >> "reopeningMaxDelay")) then { + _reopeningMaxDelay = getNumber (_woundTreatmentConfig >> "reopeningMaxDelay") max _reopeningMinDelay; + }; +} else { + WARNING_2("No config for wound type [%1] config base [%2]",_className,_config); +}; +TRACE_5("configs",_bandage,_className,_reopeningChance,_reopeningMinDelay,_reopeningMaxDelay); + +private _bandagedWounds = GET_WRAPPED_WOUNDS(_target); + +private _exist = false; +{ + _x params ["_id", "_amountOf", "", "", "_oldBandage"]; + if ((_id == _classID) && (_oldBandage == _bandage)) exitWith { + _x set [1, _amountOf + _impact]; + TRACE_2("adding to existing bandagedWound",_id,_part); + _exist = true; + }; +} forEach (_bandagedWounds getOrDefault [_part, []]); + +if (!_exist) then { + TRACE_2("adding new bandagedWound",_classID,_part); + private _bandagedInjury = +_injury; + _bandagedInjury set [1, _impact]; + _bandagedInjury set [4, _bandage]; + (_bandagedWounds getOrDefault [_part, [], true]) pushBack _bandagedInjury; +}; + + +_target setVariable [VAR_WRAPPED_WOUNDS, _bandagedWounds, true]; + +// _reopeningChance = 1; +// _reopeningMinDelay = 5; +// _reopeningMaxDelay = 6; +private _delay = ((_reopeningMinDelay + random (_reopeningMaxDelay - _reopeningMinDelay)) * (1 - _bleeding)); +if (EGVAR(hitpoints,longTermBandages)) then { + _delay = _delay * random [3, 6, 10]; +}; +TRACE_2("delay",_reopeningChance,_delay); +// Check if we are ever going to reopen this +if (random 1 <= _reopeningChance * ACEGVAR(medical_treatment,woundReopenChance)) then { + TRACE_1("Will open",_delay); + [{ + params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; + TRACE_5("reopen delay finished",_target,_impact,_part,_injuryIndex,_injury); + + private _openWounds = GET_OPEN_WOUNDS(_target); + private _woundsOnPart = _openWounds getOrDefault [_part, []]; + if (count _woundsOnPart - 1 < _injuryIndex) exitWith { TRACE_2("index bounds",_injuryIndex,count _woundsOnPart); }; + + _injury params ["_classID"]; + private _fixedClassID = floor _classID; + private _selectedInjury = _woundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "", "_selDamage"]; + if (_selClassID == _fixedClassID) then { // matching the IDs + private _bandagedWounds = GET_WRAPPED_WOUNDS(_target); + private _exist = false; + { + _x params ["_id", "_amountOf"]; + if (_id == _classID) exitWith { + TRACE_2("bandagedWound exists",_id,_classID); + _x set [1, 0 max (_amountOf - _impact)]; + _exist = true; + }; + } forEach (_bandagedWounds getOrDefault [_part, []]); + TRACE_2("Before openWound update",_openWounds,_bandagedWounds); + if (_exist) then { + TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); + _selectedInjury set [1, _selAmount + _impact]; + TRACE_3("Reopening Wound2",_selectedInjury,_impact,_selAmount); + _target setVariable [VAR_WRAPPED_WOUNDS, _bandagedWounds, true]; + _target setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_target] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _part; + + // Re-add trauma and damage visuals + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_target, _part, _selDamage * _impact] call ACEFUNC(medical_treatment,addTrauma); + }; + + // Check if we gained limping from this wound re-opening + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_target] call FUNC(updateDamageEffects); + }; + }; + TRACE_2("After openWound update",_openWounds,_bandagedWounds); + } else { + TRACE_3("no match",_selectedInjury,_classID,_part); + }; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; +} else { + private _delay = _delay * (random [1.5, 2, 3]); + TRACE_1("Will open",_delay); + [{ + params ["_target", "_impact", "_part", "_injuryIndex", "_injury"]; + TRACE_5("reopen delay finished",_target,_impact,_part,_injuryIndex,_injury); + + private _openWounds = GET_OPEN_WOUNDS(_target); + private _woundsOnPart = _openWounds getOrDefault [_part, []]; + if (count _woundsOnPart - 1 < _injuryIndex) exitWith { TRACE_2("index bounds",_injuryIndex,count _woundsOnPart); }; + + _injury params ["_classID"]; + + private _selectedInjury = _woundsOnPart select _injuryIndex; + _selectedInjury params ["_selClassID", "_selAmount", "", "_selDamage"]; + if (_selClassID == _classID) then { // matching the IDs + private _bandagedWounds = GET_BANDAGED_WOUNDS(_target); + private _exist = false; + { + _x params ["_id", "_amountOf"]; + if (_id == _classID) exitWith { + TRACE_2("bandagedWound exists",_id,_classID); + _x set [1, 0 max (_amountOf - _impact)]; + _exist = true; + }; + } forEach (_bandagedWounds getOrDefault [_part, []]); + TRACE_2("Before openWound update",_openWounds,_bandagedWounds); + if (_exist) then { + TRACE_2("Reopening Wound",_bandagedWounds,_openWounds); + _selectedInjury set [1, _selAmount + _impact]; + TRACE_3("Reopening Wound2",_selectedInjury,_impact,_selAmount); + _target setVariable [VAR_WRAPPED_WOUNDS, _bandagedWounds, true]; + _target setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; + + [_target] call ACEFUNC(medical_status,updateWoundBloodLoss); + + private _partIndex = ALL_BODY_PARTS find _part; + + // Re-add trauma and damage visuals + if (ACEGVAR(medical_treatment,clearTrauma) == 2) then { + [_target, _part, _selDamage * _impact] call ACEFUNC(medical_treatment,addTrauma); + }; + + // Check if we gained limping from this wound re-opening + if ((ACEGVAR(medical,limping) == 1) && {_partIndex > 7}) then { + [_target] call FUNC(updateDamageEffects); + }; + }; + TRACE_2("After openWound update",_openWounds,_bandagedWounds); + } else { + TRACE_3("no match",_selectedInjury,_classID,_part); + }; + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; +}; \ No newline at end of file diff --git a/addons/misc/functions/fnc_incompatibilityWarning.sqf b/addons/misc/functions/fnc_incompatibilityWarning.sqf index c86de5558..4d58f714b 100644 --- a/addons/misc/functions/fnc_incompatibilityWarning.sqf +++ b/addons/misc/functions/fnc_incompatibilityWarning.sqf @@ -23,9 +23,9 @@ private _foundIncompatibleAddons = []; _foundIncompatibleAddons append [_x]; //Incompatible addons //Here is the Wiki page with current list: https://github.com/Tomcat-SG/KAM/wiki/Incompatible-addons -}; } forEach ["KATMEDICALSTATIC","kat_evac","KATMEDICALsteth","adv_aceCPR","aceP_main"]; +}; } forEach ["KATMEDICALSTATIC","kat_evac","KATMEDICALsteth","adv_aceCPR","aceP_main", "kat_chemical", "AAA"]; -if ((count _foundIncompatibleAddons) > 0) then { +if (_foundIncompatibleAddons isNotEqualTo []) then { diag_log format [LLSTRING(incompatibilityWarning_Desc), _foundIncompatibleAddons]; private _text = format [LLSTRING(incompatibilityWarning_Desc), _foundIncompatibleAddons]; if (hasInterface) then { diff --git a/addons/misc/functions/fnc_isMedic.sqf b/addons/misc/functions/fnc_isMedic.sqf new file mode 100644 index 000000000..a8a738337 --- /dev/null +++ b/addons/misc/functions/fnc_isMedic.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, KoffeinFlummi + * Checks if the unit is a medic of the given level. + * Medic Levels: 0 - None, 1 - Medic, 2 - Doctor + * + * Arguments: + * 0: Unit + * 1: Medic Level (default: 1) + * + * Return Value: + * Is Medic + * + * Example: + * [player] call ace_medical_treatment_fnc_isMedic + * + * Public: No + */ + +params ["_unit", ["_medicN", 1]]; + +private _class = _unit getVariable [QACEGVAR(medical,medicClass), parseNumber (_unit getUnitTrait "medic")]; + +if (_class >= _medicN) exitWith {true}; +if (!GVAR(locationsBoostTraining)) exitWith {false}; + +if ((IN_MED_VEHICLE(_unit)) || (IN_MED_FACILITY(_unit)) || ( + (_unit nearEntities 10) findIf { + _x getVariable [QACEGVAR(medical,isMedicalVehicle), false] + } > -1 +)) then { + _class = _class + 1; // Boost medical training by one: untrained becomes medic, medic becomes doctor +}; + +_class >= _medicN \ No newline at end of file diff --git a/addons/misc/functions/fnc_removeTourniquetTime.sqf b/addons/misc/functions/fnc_removeTourniquetTime.sqf index 42071f0c8..1e0cac642 100644 --- a/addons/misc/functions/fnc_removeTourniquetTime.sqf +++ b/addons/misc/functions/fnc_removeTourniquetTime.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _tourniquetsDisplay = _patient getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0]]; +private _tourniquetsDisplay = _patient getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]]; _tourniquetsDisplay set [_partIndex, 0]; diff --git a/addons/misc/functions/fnc_serializeState.sqf b/addons/misc/functions/fnc_serializeState.sqf new file mode 100644 index 000000000..f73641d4c --- /dev/null +++ b/addons/misc/functions/fnc_serializeState.sqf @@ -0,0 +1,155 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut + * Serializes the medical state of a unit into a string. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Serialized state as JSON string + * + * Example: + * [player] call ace_medical_fnc_serializeState + * + * Public: Yes + */ +params [["_unit", objNull, [objNull]]]; + +private _state = [] call CBA_fnc_createNamespace; + +// For variables, see: EFUNC(medical_status,initUnit) +{ + _x params ["_var"]; + _state setVariable [_var, _unit getVariable _x]; +} forEach [ + [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME], + [VAR_HEART_RATE, DEFAULT_HEART_RATE], + [VAR_BLOOD_PRESS, [80, 120]], + [VAR_PERIPH_RES, DEFAULT_PERIPH_RES], + [VAR_HEMORRHAGE, 0], + [VAR_PAIN, 0], + [VAR_IN_PAIN, false], + [VAR_PAIN_SUPP, 0], + [VAR_OPEN_WOUNDS, createHashMap], + [VAR_BANDAGED_WOUNDS, createHashMap], + [VAR_STITCHED_WOUNDS, createHashMap], + [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES], + [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES], + [QACEGVAR(medical,occludedMedications), nil], + [QACEGVAR(medical,ivBags), nil], + [QACEGVAR(medical,triageLevel), 0], + [QACEGVAR(medical,triageCard), []], + [VAR_BODYPART_DAMAGE, DEFAULT_BODYPART_DAMAGE_VALUES], + [VAR_WRAPPED_WOUNDS, createHashMap], +[VAR_COAGED_WOUNDS, createHashMap], +[QACEGVAR(medical,isLimping), false], +[VAR_SPO2, DEFAULT_SPO2], +[VAR_OXYGEN_DEMAND, 0], +[VAR_VASOCONSTRICTION, 1], +[QEGVAR(airway,airway_item), ""], +[QEGVAR(airway,airway), false], +[QEGVAR(airway,clearedTime), 0], +[QEGVAR(airway,cricothyrotomy), 0], +[QEGVAR(airway,catastrophicAirway), [false, false]], +[QEGVAR(airway,obstruction), [0, 0, 0]], +[QEGVAR(airway,occlusion), [0, 0, 0]], +[QEGVAR(airway,occlusionMitigation), [false, false, false]], +[QEGVAR(airway,overstretch), false], +[QEGVAR(airway,recovery), false], +[QEGVAR(airway,wasOccluded), [0, 0, 0]], +[QEGVAR(airway,hasPuked), false], +[QEGVAR(airway,airwayStatus), [0, 0, 0]], +[QEGVAR(airway,isVisualized), false], +[QEGVAR(breathing,airwayStatus), 100], +[QEGVAR(breathing,pneumothorax), [0, 0]], +[QEGVAR(breathing,hemopneumothorax), [0, 0]], +[QEGVAR(breathing,tensionpneumothorax), [false, false]], +[QEGVAR(breathing,activeChestSeal), [false, false]], +[QEGVAR(breathing,deepPenetratingInjury), [false, false]], +[QEGVAR(breathing,etco2Monitor), []], +[QEGVAR(breathing,breathRate), 15], +[QEGVAR(breathing,nasalCannula), false], +[QEGVAR(breathing,lungSurfaceArea), 400], +[QEGVAR(breathing,chestTube), [0, 0]], +[QEGVAR(breathing,attachedVent), false], +[QEGVAR(breathing,attachedVentGUI), false], +[QEGVAR(breathing,paralysis), 0], +[QEGVAR(breathing,ventRate), 2], +[QEGVAR(breathing,TRALI), 0], +[QEGVAR(circulation,cprCount), 2], +[QEGVAR(circulation,heartRestart), false], +[QEGVAR(circulation,cardiacArrestType), 0], +[QEGVAR(circulation,bodyFluid), DEFAULT_BODY_FLUID], +[QEGVAR(circulation,isPerformingCPR), false], +[QEGVAR(circulation,OxygenationPeriod), 0], +[QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(circulation,defaultHeartRate), 80], +[QEGVAR(circulation,bloodGas), DEFAULT_BLOOD_GAS], +[QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0,0]], +[QEGVAR(circulation,ABGmenuShow), false], +[QEGVAR(circulation,ht), []], +[QEGVAR(circulation,effusion), 0], +[QEGVAR(circulation,attachedLucas), false], +[QEGVAR(circulation,attachedLucasState), false], +[QEGVAR(ophthalmology,dustInjuryLight), 0], +[QEGVAR(ophthalmology,dustInjuryHeavy), 0], +[QEGVAR(ophthalmology,eyeInjuries), [1,1]], +[QEGVAR(ophthalmology,eyeInjurySevere), false], + + +[QEGVAR(pharma,alphaAction), 1], + +[QEGVAR(pharma,IV), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,IVflow), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]], + +[QEGVAR(pharma,IVincomingFlowAmount), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(pharma,active), false], +[QEGVAR(pharma,IVPharma_PFH), 0], +[QEGVAR(pharma,IVmenuActive), false], + +[QEGVAR(pharma,externalPh), 0], +[QEGVAR(pharma,pH), 0], + +[QEGVAR(pharma,opioidFactor), 0], +[QEGVAR(pharma,opioidDepression), 0], + +[QEGVAR(pharma,kidneyFail), false], +[QEGVAR(pharma,kidneyArrest), false], +[QEGVAR(pharma,kidneyPressure), false], + +[QEGVAR(pharma,respiratoryRate), 1], +[QEGVAR(pharma,heartContractility), 1], +[QEGVAR(pharma,nauseaMult), 1], + +[VAR_LOCAL_ANESTHESIA, DEFAULT_LOCAL_ANESTHESIA], +[QEGVAR(pharma,activeEtomidateLoadingDose), false], +[QEGVAR(surgery,fractures), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(surgery,lidocaine), false], +[QEGVAR(surgery,etomidate), false], +[QEGVAR(surgery,sedated), 0], +[QEGVAR(surgery,imaging), false], +[QEGVAR(surgery,reboa), false], +[QEGVAR(surgery,surgicalBlock), [0,0,0,0,0,0,0,0,0,0,0,0]], +[QEGVAR(vitals,respiratoryDepth), DEFAULT_RESPIRATORY_DEPTH], +[QEGVAR(vitals,currentWeight), 80] +]; + +// Convert medications time to offset +private _medications = _unit getVariable [VAR_MEDICATIONS, []]; +{ + _x set [1, _x#1 - CBA_missionTime]; +} forEach _medications; +_state setVariable [VAR_MEDICATIONS, _medications]; + +// Medical statemachine state +private _currentState = [_unit, ACEGVAR(medical,STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +if (_currentState == "Dazed") then { _currentState = "Unconscious"; }; +_state setVariable [QACEGVAR(medical,statemachineState), _currentState]; + +// Serialize & return +private _json = [_state] call CBA_fnc_encodeJSON; +_state call CBA_fnc_deleteNamespace; +_json \ No newline at end of file diff --git a/addons/misc/functions/fnc_setTourniquetTime.sqf b/addons/misc/functions/fnc_setTourniquetTime.sqf index ddf6def4b..ef31bc5a6 100644 --- a/addons/misc/functions/fnc_setTourniquetTime.sqf +++ b/addons/misc/functions/fnc_setTourniquetTime.sqf @@ -19,7 +19,7 @@ params ["_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _tourniquetsDisplay = _patient getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0]]; +private _tourniquetsDisplay = _patient getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]]; _tourniquetsDisplay set [_partIndex, ([dayTime, "HH:MM"] call BIS_fnc_timeToString)]; diff --git a/addons/misc/functions/fnc_setUnconscious.sqf b/addons/misc/functions/fnc_setUnconscious.sqf index 7bfb86318..df4df8998 100644 --- a/addons/misc/functions/fnc_setUnconscious.sqf +++ b/addons/misc/functions/fnc_setUnconscious.sqf @@ -50,7 +50,7 @@ if (_knockOut) then { KAT_forceWakeup = true; [{ params [["_unit", objNull]]; - if ((alive _unit) && {_unit call EFUNC(vitals,hasStableVitals)}) then { + if ((alive _unit) && {_unit call EFUNC(vitals,hasStableVitals)} && !(GET_CONVERT_STATUS(_unit))) then { [QACEGVAR(medical,WakeUp), _unit] call CBA_fnc_localEvent; KAT_forceWakeup = false; } else { @@ -65,7 +65,9 @@ if (_knockOut) then { [QACEGVAR(medical,knockOut), _unit] call CBA_fnc_localEvent; } else { - [QACEGVAR(medical,WakeUp), _unit] call CBA_fnc_localEvent; + if !(GET_CONVERT_STATUS(_unit)) then { + [QACEGVAR(medical,WakeUp), _unit] call CBA_fnc_localEvent; + }; }; true diff --git a/addons/misc/functions/fnc_showDogtagData.sqf b/addons/misc/functions/fnc_showDogtagData.sqf new file mode 100644 index 000000000..d859dfbaf --- /dev/null +++ b/addons/misc/functions/fnc_showDogtagData.sqf @@ -0,0 +1,43 @@ +#include "..\script_component.hpp" +/* + * Author: SzwedzikPL + * Shows dog tag. + * + * Arguments: + * 0: Dog tag data + * 1: Display as double tag + * + * Return Value: + * None + * + * Example: + * [["name", "610-27-5955", "A POS"], true] call ace_dogtags_fnc_showDogtag + * + * Public: No + */ + +disableSerialization; + +params ["_dogtagData", ["_doubleTags", false, [false]]]; + +if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {}; + +if (_doubleTags) then { + (QACEGVAR(dogtags,tag) call BIS_fnc_rscLayer) cutRsc [QACEGVAR(dogtags,doubleTag), "PLAIN", 1, true]; +} else { + (QACEGVAR(dogtags,tag) call BIS_fnc_rscLayer) cutRsc [QACEGVAR(dogtags,singleTag), "PLAIN", 1, true]; +}; + +private _display = uiNamespace getVariable [QACEGVAR(dogtags,tag), displayNull]; + +if (isNull _display) exitWith {}; + +private _control = _display displayCtrl 1001; +_dogtagData params ["_name", "_bloodType", "_weight", "_code"]; + +// If data doesn't exist or body has no name, set name as "unknown" +if (_name == "") then { + _name = ACELSTRING(common,unknown); +}; + +_control ctrlSetStructuredText parseText format ["%1
%2
%3 Kg", toUpper _name, _bloodType, _weight]; \ No newline at end of file diff --git a/addons/misc/functions/fnc_stitchWound.sqf b/addons/misc/functions/fnc_stitchWound.sqf new file mode 100644 index 000000000..4b485521f --- /dev/null +++ b/addons/misc/functions/fnc_stitchWound.sqf @@ -0,0 +1,132 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, mharis001, LinkIsGrim + * Stitches a wound (either the first or a specific wound) from a body part. + * + * Arguments: + * 0: Patient + * 1: Body Part + * 2: Wound Array, will close first wound on body part if empty (default: []) + * + * Return Value: + * Wound was stitched + * + * Example: + * [player, "head"] call ace_medical_treatment_fnc_stitchWound + * + * Public: No + */ + +params ["_patient", "_bodyPart", ["_treatedWound", []]]; + +// Fetch wounds per body part +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); +private _wrappedWounds = GET_WRAPPED_WOUNDS(_patient); +private _coagWounds = GET_COAGED_WOUNDS(_patient); + +private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []]; +private _wrappedWoundsOnPart = _wrappedWounds getOrDefault [_bodyPart, []]; +private _coagWoundsOnPart = _coagWounds getOrDefault [_bodyPart, []]; + +private _unstitchableTypes = ["ETD", "Israeli_Bandage"]; + +// Combine all wounds into one array for processing +private _allWounds = []; +{ + private _woundArray = _x select 0; + private _woundSource = _x select 1; + { + _allWounds pushBack [_x, _forEachIndex, _woundSource]; // [wound, index, source] + } forEach _woundArray; +} forEach [ + [_bandagedWoundsOnPart, "bandaged"], + [_wrappedWoundsOnPart, "wrapped"], + [_coagWoundsOnPart, "coag"] +]; + +private _treatedSource = ""; +private _woundIndex = -1; + +if (_treatedWound isEqualTo []) then { + { + _x params ["_wound", "_index", "_source"]; + _wound params ["_treatedID", "", "", "", "_type"]; + + private _classIndex = _treatedID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + if (!(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"]) && !(_type in _unstitchableTypes)) exitWith { + _treatedWound = _wound; + _woundIndex = _index; + _treatedSource = _source; + }; + } forEach _allWounds; +}; + +// Exit if no valid wound found +if (_woundIndex == -1) exitWith { false }; + +// Remove wound from the correct array +private _sourceArray = switch (_treatedSource) do { + case "bandaged": { _bandagedWoundsOnPart }; + case "wrapped": { _wrappedWoundsOnPart }; + case "coag": { _coagWoundsOnPart }; +}; + +_treatedWound params ["_treatedID", "_treatedAmountOf", "", "_treatedDamageOf"]; + +// Amount stitched this action +private _stitchedAmount = _treatedAmountOf min 1; + +// Reduce wound amount +private _remaining = _treatedAmountOf - _stitchedAmount; + +if (_remaining <= 0) then { + _sourceArray deleteAt _woundIndex; +} else { + _treatedWound set [1, _remaining]; +}; +// Extract wound data +_treatedWound params ["_treatedID", "_treatedAmountOf", "", "_treatedDamageOf"]; + +// Update stitched wounds +private _stitchedWounds = GET_STITCHED_WOUNDS(_patient); +private _stitchedWoundsOnPart = _stitchedWounds getOrDefault [_bodyPart, [], true]; + +private _stitchedIndex = _stitchedWoundsOnPart findIf { + _x params ["_classID"]; + _classID == _treatedID +}; + +if (_stitchedIndex == -1) then { + private _newStitched = +_treatedWound; + _newStitched set [1, _stitchedAmount]; + _stitchedWoundsOnPart pushBack _newStitched; +} else { + private _existingWound = _stitchedWoundsOnPart select _stitchedIndex; + _existingWound set [1, (_existingWound select 1) + _stitchedAmount]; +}; + +// Clear trauma if enabled +if (GVAR(clearTrauma) == 1) then { + [_patient, _bodyPart, -(_treatedDamageOf * _treatedAmountOf)] call ACEFUNC(medical_treatment,addTrauma); +} else { + [_patient, _bodyPart, -((_treatedDamageOf * _treatedAmountOf) * 0.5)] call ACEFUNC(medical_treatment,addTrauma); +}; + +// Save updated wound data +_patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; +_patient setVariable [VAR_WRAPPED_WOUNDS, _wrappedWounds, true]; +_patient setVariable [VAR_COAGED_WOUNDS, _coagWounds, true]; +_patient setVariable [VAR_STITCHED_WOUNDS, _stitchedWounds, true]; + +// Limb recheck if necessary +if ( + ACEGVAR(medical,limping) == 2 + && { _patient getVariable [QEGVAR(medical,isLimping), false] } + && { _bodyPart in ["leftleg", "rightleg", "upperleftleg", "upperrightleg"] } +) then { + [QEGVAR(medical_engine,updateDamageEffects), _patient, _patient] call CBA_fnc_targetEvent; +}; + +true \ No newline at end of file diff --git a/addons/misc/functions/fnc_surgicalKitProgress.sqf b/addons/misc/functions/fnc_surgicalKitProgress.sqf new file mode 100644 index 000000000..e2bc767f1 --- /dev/null +++ b/addons/misc/functions/fnc_surgicalKitProgress.sqf @@ -0,0 +1,76 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut, mharis001 + * Handles the surgical kit treatment by periodically closing bandaged wounds. + * + * Arguments: + * 0: Arguments + * 0: Medic + * 1: Patient + * 2: Body Part + * 1: Elapsed Time + * 2: Total Time + * + * Return Value: + * Continue Treatment + * + * Example: + * [[objNull, player], 5, 10] call ace_medical_treatment_fnc_surgicalKitProgress + * + * Public: No + */ +params ["_args", "_elapsedTime", "_totalTime"]; +_args params ["_medic", "_patient", "_bodyPart"]; + +if (_totalTime - _elapsedTime > ([_patient, _patient, _bodyPart] call FUNC(getStitchTime)) - ACEGVAR(medical_treatment,woundStitchTime)) exitWith {true}; +// Get all wounds +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); +private _wrappedWounds = GET_WRAPPED_WOUNDS(_patient); +private _coagWounds = GET_COAGED_WOUNDS(_patient); +private _stitchedWounds = GET_STITCHED_WOUNDS(_patient); + +// Select wounds on given body part +private _unstitchableTypes = ["ETD", "Israeli_Bandage"]; +private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []]; +private _wrappedWoundsOnPart = _wrappedWounds getOrDefault [_bodyPart, []]; +private _coagWoundsOnPart = _coagWounds getOrDefault [_bodyPart, []]; + +private _allWounds = []; +{ + _x params ["_woundArray", "_woundSource"]; + + { + if ( + _woundSource != "bandaged" + || { + _x params ["", "", "", "", "_type"]; + !(_type in _unstitchableTypes) + } + ) then { + _allWounds pushBack [_x, _forEachIndex, _woundSource]; + }; + } forEach _woundArray; + +} forEach [ + [_bandagedWoundsOnPart, "bandaged"], + [_wrappedWoundsOnPart, "wrapped"], + [_coagWoundsOnPart, "coag"] +]; +// Stop treatment if there are no wounds that can be stitched remaining +if (_allWounds isEqualTo []) exitWith {false}; + +// Stitch the first possible wound on the body part +private _stitched = [_patient, _bodyPart] call FUNC(stitchWound); + +if (!_stitched) exitWith { + ERROR_1("failed to stitch wound on unit - %1",_patient); + false +}; + +// Consume a suture for the next wound if one exists, stop stitching if none are left +if (GVAR(consumeSurgicalKit) == 2 && {_bandagedWoundsOnPart isNotEqualTo []}) then { + ([_medic, _patient, ["ACE_suture"]] call FUNC(useItem)) params ["_user"]; + !isNull _user +} else { + true +} \ No newline at end of file diff --git a/addons/misc/functions/fnc_surgicalKitProgressFullBody.sqf b/addons/misc/functions/fnc_surgicalKitProgressFullBody.sqf index dbb91adfe..e625e3981 100644 --- a/addons/misc/functions/fnc_surgicalKitProgressFullBody.sqf +++ b/addons/misc/functions/fnc_surgicalKitProgressFullBody.sqf @@ -24,70 +24,118 @@ _args params ["_medic", "_patient"]; private _stitchableWounds = _patient call FUNC(getFullBodyStitchableWounds); -// Stop treatment if there are no wounds that can be stitched remaining -if (_stitchableWounds isEqualTo createHashMap) exitWith {false}; +if (_stitchableWounds isEqualTo createHashMap) exitWith { false }; -// Not enough time has elapsed to stitch a wound -if (_totalTime - _elapsedTime > ([_patient, _patient] call FUNC(getStitchTimeFullBody)) - ACEGVAR(medical_treatment,woundStitchTime)) exitWith {true}; +if ( + _totalTime - _elapsedTime > + ([_patient, _patient] call FUNC(getStitchTimeFullBody)) - ACEGVAR(medical_treatment,woundStitchTime) +) exitWith { true }; -private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); -private _stitchedWounds = GET_STITCHED_WOUNDS(_patient); +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); +private _wrappedWounds = GET_WRAPPED_WOUNDS(_patient); +private _coagWounds = GET_COAGED_WOUNDS(_patient); +private _stitchedWounds = GET_STITCHED_WOUNDS(_patient); -// Remove the first stitchable wound from the bandaged wounds private _bodyPart = (keys _stitchableWounds) select 0; -private _bandagedWoundsOnPart = _bandagedWounds get _bodyPart; -private _treatedWound = _bandagedWoundsOnPart deleteAt (count _bandagedWoundsOnPart - 1); + +private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_bodyPart, []]; +private _wrappedWoundsOnPart = _wrappedWounds getOrDefault [_bodyPart, []]; +private _coagWoundsOnPart = _coagWounds getOrDefault [_bodyPart, []]; + +private _allWounds = []; +{ + _x params ["_array", "_source"]; + { + _allWounds pushBack [_x, _forEachIndex, _source]; + } forEach _array; +} forEach [ + [_bandagedWoundsOnPart, "bandaged"], + [_wrappedWoundsOnPart, "wrapped"], + [_coagWoundsOnPart, "coag"] +]; + +private _treatedWound = []; +private _treatedIndex = -1; +private _treatedSource = ""; + +for "_i" from ((count _allWounds) - 1) to 0 step -1 do { + _allWounds select _i params ["_wound", "_index", "_source"]; + _wound params ["_treatedID", "", "", "", "_type"]; + + private _classIndex = _treatedID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + if ( + !(_className in ["InternalBleeding", "Evisceration", "Thermal_Burn"]) + && !(_type in ["ETD", "Israeli_Bandage"]) + ) exitWith { + _treatedWound = _wound; + _treatedIndex = _index; + _treatedSource = _source; + }; +}; + +if (_treatedIndex == -1) exitWith { false }; +private _sourceArray = switch (_treatedSource) do { + case "bandaged": { _bandagedWoundsOnPart }; + case "wrapped": { _wrappedWoundsOnPart }; + case "coag": { _coagWoundsOnPart }; +}; _treatedWound params ["_treatedID", "_treatedAmountOf", "", "_treatedDamageOf"]; -// Check if we need to add a new stitched wound or increase the amount of an existing one -private _woundIndex = (_stitchedWounds getOrDefault [_bodyPart, []]) findIf { +private _stitchedAmount = _treatedAmountOf min 1; +private _remaining = _treatedAmountOf - _stitchedAmount; + +if (_remaining <= 0) then { + _sourceArray deleteAt _treatedIndex; +} else { + _treatedWound set [1, _remaining]; +}; + +private _stitchedWoundsOnPart = _stitchedWounds getOrDefault [_bodyPart, [], true]; + +private _stitchedIndex = _stitchedWoundsOnPart findIf { _x params ["_classID"]; _classID == _treatedID }; -if (_woundIndex == -1) then { - (_stitchedWounds getOrDefault [_bodyPart, [], true]) pushBack _treatedWound; +if (_stitchedIndex == -1) then { + _stitchedWoundsOnPart pushBack [ + _treatedID, + _stitchedAmount, + 0, + _treatedDamageOf, + "Stitched" + ]; } else { - private _wound = (_stitchedWounds get _bodyPart) select _woundIndex; - _wound set [1, (_wound select 1) + _treatedAmountOf]; + private _existing = _stitchedWoundsOnPart select _stitchedIndex; + _existing set [1, (_existing select 1) + _stitchedAmount]; }; -if (ACEGVAR(medical_treatment,clearTrauma) == 1) then { - private _partIndex = ALL_BODY_PARTS find _bodyPart; - TRACE_2("clearTrauma - clearing trauma after stitching",_bodyPart,_treatedWound); - private _bodyPartDamage = _patient getVariable [QACEGVAR(medical,bodyPartDamage), []]; - _bodyPartDamage set [_partIndex, (_bodyPartDamage select _partIndex) - (_treatedDamageOf * _treatedAmountOf)]; - _patient setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; - TRACE_2("clearTrauma - healed damage",_bodyPart,_treatedDamageOf); - - switch (_bodyPart) do { - case "head": { [_patient, true, false, false, false] call ACEFUNC(medical_engine,updateBodyPartVisuals); }; - case "body": { [_patient, false, true, false, false] call ACEFUNC(medical_engine,updateBodyPartVisuals); }; - case "leftarm"; - case "rightarm": { [_patient, false, false, true, false] call ACEFUNC(medical_engine,updateBodyPartVisuals); }; - default { [_patient, false, false, false, true] call ACEFUNC(medical_engine,updateBodyPartVisuals); }; - }; +private _trauma = _treatedDamageOf * _stitchedAmount; +if (GVAR(clearTrauma) == 1) then { + [_patient, _bodyPart, -_trauma] call ACEFUNC(medical_treatment,addTrauma); +} else { + [_patient, _bodyPart, -(_trauma * 0.5)] call ACEFUNC(medical_treatment,addTrauma); }; _patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; +_patient setVariable [VAR_WRAPPED_WOUNDS, _wrappedWounds, true]; +_patient setVariable [VAR_COAGED_WOUNDS, _coagWounds, true]; _patient setVariable [VAR_STITCHED_WOUNDS, _stitchedWounds, true]; -// Check if we fixed limping by stitching this wound (only for leg wounds) if ( ACEGVAR(medical,limping) == 2 - && {_patient getVariable [QACEGVAR(medical,isLimping), false]} - && {_bodyPart isEqualTo "leftleg" || _bodyPart isEqualTo "rightleg"} + && { _patient getVariable [QEGVAR(medical,isLimping), false] } + && { _bodyPart in ["leftleg", "rightleg", "upperleftleg", "upperrightleg"] } ) then { - TRACE_3("Updating damage effects",_patient,_bodyPart,local _patient); - [QACEGVAR(medical_engine,updateDamageEffects), _patient, _patient] call CBA_fnc_targetEvent; + [QEGVAR(medical_engine,updateDamageEffects), _patient, _patient] + call CBA_fnc_targetEvent; }; -// Consume a suture for the next wound if one exists, stop stitching if none are left -if (ACEGVAR(medical_treatment,consumeSurgicalKit) == 2) then { - // Don't consume a suture if there are no more wounds to stitch - if (count (values _stitchableWounds) isEqualTo 1) exitWith {false}; - ([_medic, _patient, ["ACE_suture"]] call ACEFUNC(medical_treatment,useItem)) params ["_user"]; +if (GVAR(consumeSurgicalKit) == 2) then { + ([_medic, _patient, ["ACE_suture"]] call FUNC(useItem)) params ["_user"]; !isNull _user } else { true -} +}; \ No newline at end of file diff --git a/addons/misc/functions/fnc_treatment.sqf b/addons/misc/functions/fnc_treatment.sqf index b674d2a97..bf84caa6b 100644 --- a/addons/misc/functions/fnc_treatment.sqf +++ b/addons/misc/functions/fnc_treatment.sqf @@ -26,7 +26,7 @@ params ["_medic", "_patient", "_bodyPart", "_classname", "_extraArgs"]; if (uiNamespace getVariable [QACEGVAR(interact_menu,cursorMenuOpened), false]) exitWith { [ACEFUNC(medical_treatment,treatment), _this] call CBA_fnc_execNextFrame; }; - +private _isInZeus = !isNull findDisplay 312; if !(call ACEFUNC(medical_treatment,canTreat)) exitWith {false}; private _config = configFile >> "ace_medical_treatment_actions" >> _classname; @@ -45,7 +45,26 @@ private _treatmentTime = if (isText (_config >> "treatmentTime")) then { }; if (_treatmentTime == 0) exitWith {false}; +if (_isInZeus) then { + _treatmentTime = 1; +}; +if (GVAR(treatmentModifiers)) then { + private _pain = GET_PAIN_PERCEIVED(_medic); + private _treatMult = linearConversion [0, 1, _pain, 1, 2]; + _treatmentTime = _treatmentTime * _treatMult; +}; + +if ((_medic getVariable [QEGVAR(airway,overstretching), false]) && (GVAR(treatmentModifiers))) then { + _treatmentTime = _treatmentTime + 3; +}; + +if ((_medic getVariable [QEGVAR(pharma,pressureIVApplied), false]) && (GVAR(treatmentModifiers))) then { + _treatmentTime = _treatmentTime + 3; +}; +if (((selectMax ((_medic getVariable [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES]) select [4, 4])) != 0) && (GVAR(treatmentModifiers))) then { + _treatmentTime = _treatmentTime * 1.25; +}; // Consume one of the treatment items if needed // Store item user so that used item can be returned on failure private _userAndItem = if (GET_NUMBER_ENTRY(_config >> "consumeItem") == 1) then { @@ -75,8 +94,6 @@ if (alive _patient) then { _userAndItem params ["_itemUser", "_usedItem", "_createLitter"]; -private _isInZeus = !isNull findDisplay 312; - if (_medic isNotEqualTo player || {!_isInZeus}) then { // Get treatment animation for the medic private _medicAnim = if (_medic isEqualTo _patient) then { @@ -158,7 +175,7 @@ if (_medic isNotEqualTo player || {!_isInZeus}) then { // Play a random treatment sound globally if defined // Don't attempt to play if sounds array is empty - if (isArray (_config >> "sounds") && count getArray (_config >> "sounds") != 0) then { + if (isArray (_config >> "sounds") && (getArray (_config >> "sounds") isNotEqualTo [])) then { selectRandom getArray (_config >> "sounds") params ["_file", ["_volume", 1], ["_pitch", 1], ["_distance", 10]]; GVAR(TreatmentSound) = playSound3D [_file, objNull, false, getPosASL _medic, _volume, _pitch, _distance]; diff --git a/addons/misc/functions/fnc_updateDamageEffects.sqf b/addons/misc/functions/fnc_updateDamageEffects.sqf index a7aac87ee..9e52f15c9 100644 --- a/addons/misc/functions/fnc_updateDamageEffects.sqf +++ b/addons/misc/functions/fnc_updateDamageEffects.sqf @@ -17,52 +17,95 @@ */ params [["_unit", objNull, [objNull]]]; - if (!local _unit) exitWith { ERROR_2("updateDamageEffects: Unit not local or null [%1:%2]",_unit,typeOf _unit); }; private _isLimping = false; private _hasLegSplint = false; private _noSprint = false; private _noJog = false; - +private _noThrow = false; +private _keepProne = false; +private _holsterWeapon = false; +private _aimFracture = 0; +private _armJointArray = GET_JOINTS(_unit) select [0, 2]; +private _legJointArray = GET_JOINTS(_unit) select [2, 2]; if (ACEGVAR(medical,fractures) > 0) then { private _fractures = GET_FRACTURES(_unit); TRACE_1("",_fractures); - if (((_fractures select 4) == 1) || {(_fractures select 5) == 1}) then { + if ((_fractures select 8) == 1 || (_fractures select 9) == 1 || (_fractures select 10) == 1 || (_fractures select 11) == 1) then { TRACE_1("limping because of fracture",_fractures); _isLimping = true; }; - private _aimFracture = 0; - if ((_fractures select 2) == 1) then { _aimFracture = _aimFracture + 4; }; - if ((_fractures select 3) == 1) then { _aimFracture = _aimFracture + 4; }; + if ((_fractures select 4) == 1) then { _aimFracture = _aimFracture + 4; }; + if ((_fractures select 5) == 1) then { _aimFracture = _aimFracture + 4; }; + if ((_fractures select 6) == 1) then { _aimFracture = _aimFracture + 4; }; + if ((_fractures select 7) == 1) then { _aimFracture = _aimFracture + 4; }; if (ACEGVAR(medical,fractures) in [2, 3]) then { // the limp with a splint will still cause effects // Block sprint / force walking based on fracture setting and leg splint status - _hasLegSplint = (_fractures select 4) == -1 || {(_fractures select 5) == -1}; + _hasLegSplint = (_fractures select 8) in [-1, -2, -3] || (_fractures select 9) in [-1, -2, -3] || (_fractures select 10) in [-1, -2, -3] || (_fractures select 11) in [-1, -2, -3]; if (ACEGVAR(medical,fractures) == 2) then { _noSprint = _hasLegSplint; } else { _noJog = _hasLegSplint; }; - if ((_fractures select 2) == -1) then { _aimFracture = _aimFracture + 2; }; - if ((_fractures select 3) == -1) then { _aimFracture = _aimFracture + 2; }; + if ((_fractures select 4) in [-1, -2, -3]) then { _aimFracture = _aimFracture + 2; }; + if ((_fractures select 5) in [-1, -2, -3]) then { _aimFracture = _aimFracture + 2; }; + if ((_fractures select 6) in [-1, -2, -3]) then { _aimFracture = _aimFracture + 2; }; + if ((_fractures select 7) in [-1, -2, -3]) then { _aimFracture = _aimFracture + 2; }; }; - _unit setVariable [QACEGVAR(medical_engine,aimFracture), _aimFracture, false]; // local only var, used in ace_medical's postInit to set ACE_setCustomAimCoef }; +if (EGVAR(hitpoints,JointChance) > 0) then { + { + {if (_x in [1, 4, 7]) then {_aimFracture = _aimFracture + 1};} forEach _x; + } forEach _armJointArray; + + { + {if (_x in [2, 5, 8]) then {_aimFracture = _aimFracture + 3};} forEach _x; + } forEach _armJointArray; + + { + {if (_x in [3, 6]) then {_aimFracture = _aimFracture + 6};} forEach _x; + } forEach _armJointArray; + + { + {if (_x == 9) then {_aimFracture = _aimFracture + 3};} forEach _x; + } forEach _armJointArray; + +}; + +_unit setVariable [QACEGVAR(medical_engine,aimFracture), _aimFracture, false]; // local only var, used in ace_medical's postInit to set ACE_setCustomAimCoef if (!_isLimping && {ACEGVAR(medical,limping) > 0}) then { private _openWounds = GET_OPEN_WOUNDS(_unit); - // Want a copy of combined arrays to prevent wound mixing private _legWounds = (_openWounds getOrDefault ["leftleg", []]) - + (_openWounds getOrDefault ["rightleg", []]); + + (_openWounds getOrDefault ["upperleftleg", []]) + + (_openWounds getOrDefault ["rightleg", []]) + + (_openWounds getOrDefault ["upperrightleg", []]); if (ACEGVAR(medical,limping) == 2) then { private _bandagedWounds = GET_BANDAGED_WOUNDS(_unit); _legWounds = _legWounds + (_bandagedWounds getOrDefault ["leftleg", []]) - + (_bandagedWounds getOrDefault ["rightleg", []]); + + (_bandagedWounds getOrDefault ["upperleftleg", []]) + + (_bandagedWounds getOrDefault ["rightleg", []]) + + (_bandagedWounds getOrDefault ["upperrightleg", []]); + + private _wrappedWounds = GET_WRAPPED_WOUNDS(_unit); + _legWounds = _legWounds + + (_wrappedWounds getOrDefault ["leftleg", []]) + + (_wrappedWounds getOrDefault ["upperleftleg", []]) + + (_wrappedWounds getOrDefault ["rightleg", []]) + + (_wrappedWounds getOrDefault ["upperrightleg", []]); + + private _coagWounds = GET_COAGED_WOUNDS(_unit); + _legWounds = _legWounds + + (_coagWounds getOrDefault ["leftleg", []]) + + (_coagWounds getOrDefault ["upperleftleg", []]) + + (_coagWounds getOrDefault ["rightleg", []]) + + (_coagWounds getOrDefault ["upperrightleg", []]); }; { @@ -90,6 +133,66 @@ if (_unit getVariable [QGVAR(Tourniquet_LegNecrosis_Threshold), 0] >= 60) then { if (_unit getVariable [QGVAR(Tourniquet_LegNecrosis_Threshold), 0] >= 90) then { _isLimping = true; }; +if (_unit getVariable [QEGVAR(hitpoints,evisceration), 0] > 0) then { + _isLimping = true; + _noJog = true; + _noSprint = true; +}; + +if ((_unit getVariable [QEGVAR(hitpoints,pelvicFracture), 0]) > 0) then { + _isLimping = true; + _noJog = true; + _noSprint = true; + _keepProne = true; +}; + +if ((_unit getVariable [QEGVAR(hitpoints,pelvicFracture), 0]) < 0) then { + _isLimping = true; + _noJog = true; + _noSprint = true; +}; + + + +private _hasLegDislocationInjury = _legJointArray findIf {_x findIf {_x == 3} != -1} != -1; +private _hasLegJointInjury = _legJointArray findIf {_x findIf {_x in [6, 9]} != -1} != -1; +private _hasLegSprainInjury = _legJointArray findIf {_x findIf {_x in [1, 4, 7]} != -1} != -1; +private _hasLegStrainInjury = _legJointArray findIf {_x findIf {_x in [2, 5, 8]} != -1} != -1; +private _hasArmDislocationInjury = _armJointArray findIf {_x findIf {_x == 3} != -1} != -1; +private _hasArmJointInjury = _armJointArray findIf {_x findIf {_x != 0} != -1} != -1; +TRACE_7("HasInjury",_hasLegSprainInjury,_hasLegStrainInjury,_hasLegDislocationInjury,_hasArmDislocationInjury,_hasArmJointInjury,_legJointArray,_armJointArray); + + +if (_hasLegStrainInjury) then { + _noSprint = true; +}; + + +if (_hasLegSprainInjury) then { + _noSprint = true; + _noJog = true; + _isLimping = true; +}; + +if (_hasLegDislocationInjury) then { + _isLimping = true; + _noJog = true; + _noSprint = true; + _keepProne = true; +}; + +if (_hasLegJointInjury) then { + _noSprint = true; + _noJog = true; +}; + +if (_hasArmDislocationInjury) then { + _noThrow = true; +}; + +if (_hasArmJointInjury) then { + _noThrow = true; +}; if (_unit getVariable [QEGVAR(surgery,reboa), false]) then { _isLimping = true; @@ -98,9 +201,30 @@ if (_unit getVariable [QEGVAR(surgery,reboa), false]) then { }; [_unit, "blockSprint", QACEGVAR(medical,fracture), _noSprint] call ACEFUNC(common,statusEffect_set); +[_unit, "blockThrow", QEGVAR(hitpoints,joints), _noThrow] call ACEFUNC(common,statusEffect_set); [_unit, "forceWalk", QACEGVAR(medical,fracture), _noJog] call ACEFUNC(common,statusEffect_set); _unit setVariable [QACEGVAR(medical,isLimping), _isLimping, true]; +_unit setVariable [QGVAR(keepProne), _keepProne, true]; +if (isNil {_unit getVariable [QGVAR(keepPronePFH), nil]}) then { + private _pfhID = [{ + _this params ["_args", "_pfhID"]; + _args params ["_unit"]; + + if (!alive _unit || {_unit != ACE_player} || {!(_unit getVariable [QGVAR(keepProne), false])}) exitWith { + _pfhID call CBA_fnc_removePerFrameHandler; + _unit setVariable [QGVAR(keepPronePFH), nil]; + }; + private _state = animationState _unit; + TRACE_1("State",_state); + if ((_state find "pne") == -1) then { + _unit playActionNow "PlayerProne"; + TRACE_2("State2",_state,_unit); + + }; + }, 0.05, [_unit]] call CBA_fnc_addPerFrameHandler; + _unit setVariable [QGVAR(keepPronePFH), _pfhID]; +}; // refresh private _isDamaged = _unit getHitPointDamage "HitLegs" >= DAMAGED_MIN_THRESHOLD && {_unit getHitPointDamage "HitLegs" != LIMPING_MIN_DAMAGE}; diff --git a/addons/misc/initSettings.inc.sqf b/addons/misc/initSettings.inc.sqf index 69b5270f7..b66522a8f 100644 --- a/addons/misc/initSettings.inc.sqf +++ b/addons/misc/initSettings.inc.sqf @@ -19,6 +19,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(treatmentModifiers), + "CHECKBOX", + [LLSTRING(SETTING_treatmentModifiers), LLSTRING(SETTING_treatmentModifiers_DESC)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_fnc_addSetting; + [ QGVAR(treatmentTimeDetachTourniquet), "SLIDER", @@ -248,7 +257,7 @@ "EDITBOX", [LLSTRING(SETTING_SecondSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_IFAK)], - "[['ACE_packingBandage', 5], ['ACE_quikclot', 5]]", + "[['ACE_tourniquet', 2]]", 1, { private _string = missionNamespace getVariable [QGVAR(IFAKSecondSlotItem), []]; @@ -264,7 +273,7 @@ "EDITBOX", [LLSTRING(SETTING_ThirdSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_IFAK)], - "[['kat_Painkiller', 1]]", + "[['kat_Painkiller', 1], ['kat_TXAAuto', 1], ['kat_phenylephrineAuto', 1], ['kat_fentPatch', 1]]", 1, { private _string = missionNamespace getVariable [QGVAR(IFAKThirdSlotItem), []]; @@ -280,7 +289,7 @@ "EDITBOX", [LLSTRING(SETTING_FourthSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_IFAK)], - "[['kat_chestSeal', 1]]", + "[['kat_chestSeal', 1], ['kat_ncdKit', 1], ['kat_guedel', 1], ['kat_NPA', 1]]", 1, { private _string = missionNamespace getVariable [QGVAR(IFAKFourthSlotItem), []]; @@ -602,4 +611,172 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [false], true -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting; + +// Remove MEDPACK when empty +[ + QGVAR(MEDPACK_RemoveWhenEmpty), + "CHECKBOX", + LLSTRING(SETTING_FAK_RemoveWhenEmpty), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + [true], + true +] call CBA_fnc_addSetting; + +//MEDPACK Container +[ + QGVAR(MEDPACK_Container), + "LIST", + [LLSTRING(SETTING_FAK_Container), LLSTRING(SETTING_FAK_Container_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + [[0, 1, 2, 3], [LLSTRING(SETTING_Container_Default), LLSTRING(SETTING_Container_Uniform), LLSTRING(SETTING_Container_Vest), LLSTRING(SETTING_Container_Backpack)], 0], + 2 +] call CBA_fnc_addSetting; + +//MEDPACK Slot Color +[ + QGVAR(MEDPACK_Slot_Color), + "COLOR", + [LLSTRING(SETTING_FAK_SlotColor), LLSTRING(SETTING_FAK_SlotColor_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + [0.56, 0.93, 0.56], + 2 +] call CBA_fnc_addSetting; + +//MEDPACK Item Color +[ + QGVAR(MEDPACK_Item_Color), + "COLOR", + [LLSTRING(SETTING_FAK_ItemColor), LLSTRING(SETTING_FAK_ItemColor_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + [0.67, 0.84, 0.90], + 2 +] call CBA_fnc_addSetting; + +//MEDPACK First Slot Item +[ + QGVAR(MEDPACKFirstSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKFirstSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['ACE_tourniquet', 6], ['ACE_splint', 4]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKFirstSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKFirstSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Second Slot Item +[ + QGVAR(MEDPACKSecondSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKSecondSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['ACE_packingBandage', 15], ['ACE_quikclot', 15], ['ACE_fieldDressing', 15]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKSecondSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKSecondSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Third Slot Item +[ + QGVAR(MEDPACKThirdSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKThirdSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['ACE_morphine', 6], ['kat_Painkiller', 2], ['kat_Penthrox', 2]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKThirdSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKThirdSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Fourth Item +[ + QGVAR(MEDPACKFourthSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKFourthSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['kat_chestSeal', 6], ['kat_aatKit', 3], ['kat_ncdKit', 3], ['kat_stethoscope', 1]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKFourthSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKFourthSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Fifth Item +[ + QGVAR(MEDPACKFifthSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKFifthSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['kat_larynx', 6]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKFifthSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKFifthSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Sixth Item +[ + QGVAR(MEDPACKSixthSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKSixthSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['ACE_epinephrine', 6], ['kat_IV_16', 4], ['kat_nitroglycerin', 2], ['kat_phenylephrine', 2], ['kat_atropine', 2], ['kat_naloxone', 2], ['kat_Carbonate', 1]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKSixthSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKSixthSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Seventh Item +[ + QGVAR(MEDPACKSeventhSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKSeventhSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['ACE_salineIV_250', 4], ['kat_IV_16', 4]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKSeventhSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKSeventhSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; + +//MEDPACK Eighth Item +[ + QGVAR(MEDPACKEighthSlotItem), + "EDITBOX", + [LLSTRING(SETTING_MEDPACKEighthSlot_Item), LLSTRING(SETTING_ItemSlot_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_MEDPACK)], + "[['kat_Pulseoximeter', 1], ['kat_pocketBVM', 1], ['kat_AED', 1]]", + 1, + { + private _string = missionNamespace getVariable [QGVAR(MEDPACKEighthSlotItem), []]; + private _array = parseSimpleArray _string; + missionNamespace setVariable [QGVAR(MEDPACKEighthSlotItem), _array, true]; + call FUNC(FAK_updateContents); + } +] call CBA_Settings_fnc_init; diff --git a/addons/misc/script_component.hpp b/addons/misc/script_component.hpp index 5a3f0c12a..3195818bb 100644 --- a/addons/misc/script_component.hpp +++ b/addons/misc/script_component.hpp @@ -18,9 +18,6 @@ #define MEDICAL_TREATMENT_ITEMS (call (uiNamespace getVariable [QACEGVAR(medical_treatment,treatmentItems), {[]}])) -#define DAMAGED_MIN_THRESHOLD 0.45 -#define LIMPING_MIN_DAMAGE 0.5 - // Animations that would be played slower than this are instead played exactly as slow as this. (= Progress bar will take longer than the slowed down animation). #define ANIMATION_SPEED_MIN_COEFFICIENT 0.5 diff --git a/addons/misc/stringtable.xml b/addons/misc/stringtable.xml index 65c46e306..0c8f1317b 100644 --- a/addons/misc/stringtable.xml +++ b/addons/misc/stringtable.xml @@ -421,6 +421,9 @@ Veriryhmälaastari A+ Bloedgroep lapje A+ + + Medication Case + Blood Group Patch B- Nášivka krevní skupiny B- @@ -1931,5 +1934,116 @@ [KAM] Oggetti vari [KAM] その他物資箱 + + Medication Case + + + The Medication Case can be unpacked to provide useful Medications, Syringes, and IV/IO's + + + Med Case + + + Syringe Section: + + + IV/IO Section: + + + Trauma Med Section: + + + Cardiac Med Section: + + + Surgery Med Section: + + + Pain Med Section: + + + Fluid Section: + + + Miscellaneous Section: + + + Unpack Syringe Section + + + Unpack IV/IO Section + + + Unpack Trauma Med Section + + + Unpack Cardiac Med Section + + + Unpack Surgery Med Section + + + Unpack Pain Med Section + + + Unpack Fluid Section + + + Unpack Miscellaneous Section + + + Repack Syringe Section + + + Repack IV/IO Section + + + Repack Trauma Med Section + + + Repack Cardiac Med Section + + + Repack Surgery Med Section + + + Repack Pain Med Section + + + Repack Fluid Section + + + Repack Miscellaneous Section + + + Syringe Section Items & Quantity + + + IV/IO Section Items & Quantity + + + Trauma Med Section Items & Quantity + + + Cardiac Med Section Items & Quantity + + + Surgery Med Section Items & Quantity + + + Pain Med Section Items & Quantity + + + Fluid Section Items & Quantity + + + Miscellaneous Section Items & Quantity + + + Injured Treatment Time Modifiers + + + Adds modifiers to treatment time if the medic is injured or providing continuous aid (Hyperextension or squeezing IV bag) + diff --git a/addons/misc/ui/MedicationCase.paa b/addons/misc/ui/MedicationCase.paa new file mode 100644 index 000000000..b769e7067 Binary files /dev/null and b/addons/misc/ui/MedicationCase.paa differ diff --git a/addons/ophthalmology/ACE_Medical_Treatment_Actions.hpp b/addons/ophthalmology/ACE_Medical_Treatment_Actions.hpp index 75dc19155..afd1d102d 100644 --- a/addons/ophthalmology/ACE_Medical_Treatment_Actions.hpp +++ b/addons/ophthalmology/ACE_Medical_Treatment_Actions.hpp @@ -11,7 +11,11 @@ class ACE_Medical_Treatment_Actions { items[] = { "ACE_salineIV", "ACE_salineIV_500", - "ACE_salineIV_250" + "ACE_salineIV_250", + "KAT_salineIV100", + "kat_RingersLactateIV", + "kat_RingersLactateIV_500", + "kat_RingersLactateIV_250", }; condition = QGETGVAR(enable,true); callbackSuccess = QFUNC(treatmentAdvanced_eyewash); @@ -54,4 +58,13 @@ class ACE_Medical_Treatment_Actions { condition = QFUNC(eyeShieldCondition); callbackSuccess = QFUNC(treatmentAdvanced_eyeShield); }; + class RemoveEyeShield: EyeWash { + displayName = CSTRING(eyeshieldremove_action); + displayNameProgress = CSTRING(eyeshieldremove_progress); + medicRequired = 0; + treatmentTime = QGVAR(eyeshield_treatment_time); + items[] = {}; + condition = QFUNC(eyeShieldRemoveCondition); + callbackSuccess = QFUNC(treatmentAdvanced_eyeShieldRemove); + }; }; diff --git a/addons/ophthalmology/RscTitles.hpp b/addons/ophthalmology/RscTitles.hpp index 2f49088b6..5ceab0129 100644 --- a/addons/ophthalmology/RscTitles.hpp +++ b/addons/ophthalmology/RscTitles.hpp @@ -25,7 +25,6 @@ #define FRAME_W(N) ((UI_GRID_W * (N)) * (1.7777 / (getResolution select 4))) #define FRAME_H(N) ((UI_GRID_H * (N))) -class RscText; class RscPicture; class RscTitles { @@ -37,7 +36,7 @@ class RscTitles fadeIn=0; fadeOut=1; duration = 10e10; - onLoad = "uiNamespace setVariable ['KAT_EyeShield', _this select 0];"; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(eyeShield),(_this select 0))]); class controls { class EyeShieldRight: RscPicture diff --git a/addons/ophthalmology/XEH_PREP.hpp b/addons/ophthalmology/XEH_PREP.hpp index c83453305..11c90cb29 100644 --- a/addons/ophthalmology/XEH_PREP.hpp +++ b/addons/ophthalmology/XEH_PREP.hpp @@ -1,4 +1,5 @@ PREP(eyeShieldCondition); +PREP(eyeShieldRemoveCondition); PREP(fullHealLocal); PREP(gui_updateInjuryListPart); PREP(handleDustInjury); @@ -6,4 +7,7 @@ PREP(handleExplosion); PREP(handleRespawn); PREP(init); PREP(treatmentAdvanced_eyeShield); +PREP(treatmentAdvanced_eyeShieldLocal); +PREP(treatmentAdvanced_eyeShieldRemove); +PREP(treatmentAdvanced_eyeShieldRemoveLocal); PREP(treatmentAdvanced_eyewash); \ No newline at end of file diff --git a/addons/ophthalmology/XEH_postInit.sqf b/addons/ophthalmology/XEH_postInit.sqf index 3c6291c17..e4493f11f 100644 --- a/addons/ophthalmology/XEH_postInit.sqf +++ b/addons/ophthalmology/XEH_postInit.sqf @@ -13,6 +13,9 @@ if (!hasInterface) exitWith {}; }] call CBA_fnc_addEventHandler; +[QGVAR(eyeShield), LINKFUNC(treatmentAdvanced_eyeShieldLocal)] call CBA_fnc_addEventHandler; +[QGVAR(eyeShieldRemove), LINKFUNC(treatmentAdvanced_eyeShieldRemoveLocal)] call CBA_fnc_addEventHandler; + [QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; diff --git a/addons/ophthalmology/config.cpp b/addons/ophthalmology/config.cpp index d8f0135dc..23b8f4302 100644 --- a/addons/ophthalmology/config.cpp +++ b/addons/ophthalmology/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; units[] = {}; weapons[] = { - "KAT_Eyewasher" + "kat_eyecovers", + "kat_eyecovers_right", + "kat_eyecovers_left" }; magazines[] = { }; requiredAddons[] = { diff --git a/addons/ophthalmology/functions/fnc_eyeShieldCondition.sqf b/addons/ophthalmology/functions/fnc_eyeShieldCondition.sqf index 7df3d2dac..dd5346d87 100644 --- a/addons/ophthalmology/functions/fnc_eyeShieldCondition.sqf +++ b/addons/ophthalmology/functions/fnc_eyeShieldCondition.sqf @@ -17,7 +17,7 @@ params ["_medic", "_patient"]; private _eyeInjuries = _patient getVariable [QGVAR(eyeInjuries), [1, 1]]; private _eyeInjurySevere = _patient getVariable [QGVAR(eyeInjurySevere), false]; -if (_eyeInjurySevere && (({_x == 0} count _eyeInjuries) == 1)) exitWith { +if (_eyeInjurySevere && (({_x != 1} count _eyeInjuries) > 0) && (isPlayer _patient)) exitWith { true }; diff --git a/addons/ophthalmology/functions/fnc_eyeShieldRemoveCondition.sqf b/addons/ophthalmology/functions/fnc_eyeShieldRemoveCondition.sqf new file mode 100644 index 000000000..03f6ac34d --- /dev/null +++ b/addons/ophthalmology/functions/fnc_eyeShieldRemoveCondition.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Sets condition for the Eye Shield + * + * Return Value: + * Boolean + * + * Example: + * [bob, patient] call kat_ophthalmology_fnc_eyeShieldCondition + * + * Public: No + */ + +params ["_medic", "_patient"]; + +if (((hmd _patient) == "kat_eyecovers_left") || ((hmd _patient) == "kat_eyecovers_right")) exitWith { + true +}; + +false \ No newline at end of file diff --git a/addons/ophthalmology/functions/fnc_handleDustInjury.sqf b/addons/ophthalmology/functions/fnc_handleDustInjury.sqf index 7f4dba02e..6ef45db5f 100644 --- a/addons/ophthalmology/functions/fnc_handleDustInjury.sqf +++ b/addons/ophthalmology/functions/fnc_handleDustInjury.sqf @@ -27,7 +27,7 @@ if (_cause in ["dust", "rotorWash"]) then { private _dustInjuryLight = _unit getVariable [QGVAR(dustInjuryLight), 0]; if (_random < GVAR(probability_dust_heavy)) then { - private _dustInjuryHeavy = _unit getVariable [QGVAR(dustInjuryLight), 0]; + private _dustInjuryHeavy = _unit getVariable [QGVAR(dustInjuryHeavy), 0]; _unit setVariable [QGVAR(dustInjuryHeavy), ((_dustInjuryHeavy + (random 1)) min 5), true]; } else { diff --git a/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShield.sqf b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShield.sqf index a8176c8fc..504a37f10 100644 --- a/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShield.sqf +++ b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShield.sqf @@ -11,57 +11,7 @@ * * Public: No */ - -params ["_medic", "_patient"]; - -private _eyeInjuries = _patient getVariable [QGVAR(eyeInjuries), [1, 1]]; - -#define IDC_LEFT_EYE_CONTROL 17103 -#define IDC_RIGHT_EYE_CONTROL 17102 - -"KAT_EyeShield" cutRsc ["KAT_EyeShield", "PLAIN", 0, true]; - - -private _fnc_applyEyeCover = { - params ["_patient", "_shieldItem", "_eyeDisplay"]; - // If patient has NVGs on, move them to the patient's inventory - if (hmd _patient != "") then { - _patient addItem (hmd _patient); - }; - - private _display = uiNamespace getVariable ["KAT_EyeShield", displayNull]; - private _activeEye = _display displayCtrl _eyeDisplay; - - _patient linkItem _shieldItem; - - _activeEye ctrlShow true; - _activeEye ctrlCommit 0; - - // Approximately 8 minutes to fully re-heal a damaged eye using the eyeshield - [{ - params ["_args", "_pfhID"]; - _args params ["_patient", "_activeEye", "_shieldItem"]; - - if ((hmd _patient) != _shieldItem) exitWith { - _pfhID call CBA_fnc_removePerFrameHandler; - "KAT_EyeShield" cutText ["","PLAIN",0,true]; - }; - - private _eyeInjury = _patient getVariable [QGVAR(eyeInjuries), [1, 1]]; - _patient setVariable [QGVAR(eyeInjuries), [(((_eyeInjury select 0) + 0.002) min 1), (_eyeInjury select 1)], true]; - }, 1, [ - _patient, - _activeEye, - _shieldItem - ]] call CBA_fnc_addPerFrameHandler; -}; - -if ((_eyeInjuries select 0) == 0) then { - [_patient, "kat_eyecovers_left", IDC_LEFT_EYE_CONTROL] call _fnc_applyEyeCover; -} else { - [_patient, "kat_eyecovers_right", IDC_RIGHT_EYE_CONTROL] call _fnc_applyEyeCover; -}; +params ["_medic", "_patient"]; -[_patient, LLSTRING(eyeshield_item)] call ACEFUNC(medical_treatment,addToTriageCard); -[_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), LLSTRING(eyeshield_item)]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file +[QGVAR(eyeShield), [_medic, _patient], _patient] call CBA_fnc_targetEvent; diff --git a/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldLocal.sqf b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldLocal.sqf new file mode 100644 index 000000000..c6326de67 --- /dev/null +++ b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldLocal.sqf @@ -0,0 +1,86 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Handles the placement of the eye shield + * + * Return Value: + * None + * + * Example: + * [bob, patient] call kat_ophthalmology_fnc_treatmentAdvanced_eyeShieldLocal + * + * Public: No + */ + +params ["_medic", "_patient"]; + +#define IDC_LEFT_EYE_CONTROL 17103 +#define IDC_RIGHT_EYE_CONTROL 17102 + +private _eyeInjuries = _patient getVariable [QGVAR(eyeInjuries), [1, 1]]; + +// Show the overlay +private _fnc_applyEyeCover = { + params ["_patient", "_eyeDisplay", "_shieldItem"]; + + // Handle NVGs properly + private _nvg = hmd _patient; + if (_nvg != "") then { + _patient unlinkItem _nvg; + _patient addItem _nvg; + }; + + // Create a local layer for this client only + private _layer = ["KAT_EyeShield"] call BIS_fnc_rscLayer; + _layer cutRsc ["KAT_EyeShield", "PLAIN", 0, true]; + + // Apply the eye cover item + _patient linkItem _shieldItem; + + // Start healing PFH (runs locally) + [{ + params ["_args", "_pfhID"]; + _args params ["_patient", "_shieldItem", "_layer"]; + + private _display = uiNamespace getVariable [QGVAR(eyeShield), displayNull]; + if (isNull _display) exitWith { + [_pfhID] call CBA_fnc_removePerFrameHandler; + }; + + private _eyeIndex = -1; + private _eyeCtrl = controlNull; + + switch (hmd _patient) do { + case "kat_eyecovers_left": { + _eyeIndex = 0; + _eyeCtrl = _display displayCtrl IDC_LEFT_EYE_CONTROL; + }; + case "kat_eyecovers_right": { + _eyeIndex = 1; + _eyeCtrl = _display displayCtrl IDC_RIGHT_EYE_CONTROL; + }; + }; + + if (_eyeIndex >= 0) then { + _eyeCtrl ctrlShow true; + _eyeCtrl ctrlCommit 0; + + private _eyeInjury = _patient getVariable [QGVAR(eyeInjuries), [1, 1]]; + _eyeInjury set [_eyeIndex, (_eyeInjury select _eyeIndex) + 0.002]; + _patient setVariable [QGVAR(eyeInjuries), _eyeInjury, true]; + } else { + _layer cutText ["", "PLAIN", 0, true]; + [_pfhID] call CBA_fnc_removePerFrameHandler; + }; + }, 1, [_patient, _shieldItem, _layer]] call CBA_fnc_addPerFrameHandler; +}; + +if ((_eyeInjuries select 0) == 0) then { + [_patient, IDC_LEFT_EYE_CONTROL, "kat_eyecovers_left"] call _fnc_applyEyeCover; +} else { + [_patient, IDC_RIGHT_EYE_CONTROL, "kat_eyecovers_right"] call _fnc_applyEyeCover; +}; + + +[_patient, LLSTRING(eyeshield_item)] call ACEFUNC(medical_treatment,addToTriageCard); +[_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), LLSTRING(eyeshield_item)]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldRemove.sqf b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldRemove.sqf new file mode 100644 index 000000000..19b41a9da --- /dev/null +++ b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldRemove.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Handles the placement of the eye shield + * + * Return Value: + * None + * + * Example: + * [bob, patient] call kat_ophthalmology_fnc_treatmentAdvanced_eyeShield + * + * Public: No + */ + +params ["_medic", "_patient"]; + +[QGVAR(eyeShieldRemove), [_medic, _patient], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldRemoveLocal.sqf b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldRemoveLocal.sqf new file mode 100644 index 000000000..f9c382e58 --- /dev/null +++ b/addons/ophthalmology/functions/fnc_treatmentAdvanced_eyeShieldRemoveLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Removes the eye shield from a patient + * + * Return Value: + * None + * + * Example: + * [bob, patient] call kat_ophthalmology_fnc_treatmentAdvanced_eyeShieldRemoveLocal + * + * Public: No + */ + +params ["_medic", "_patient"]; + +_patient unassignItem (hmd _patient); \ No newline at end of file diff --git a/addons/ophthalmology/stringtable.xml b/addons/ophthalmology/stringtable.xml index b0b9403bb..77555013e 100644 --- a/addons/ophthalmology/stringtable.xml +++ b/addons/ophthalmology/stringtable.xml @@ -64,6 +64,12 @@ Augenschild anwenden 眼帯を装着 + + Remove Eye Shield + + + Removing Eye Shield + Eye Shield Protection oculaire diff --git a/addons/pharma/ACE_Medical_Treatment.hpp b/addons/pharma/ACE_Medical_Treatment.hpp index 73f3a6a6b..b308fabc9 100644 --- a/addons/pharma/ACE_Medical_Treatment.hpp +++ b/addons/pharma/ACE_Medical_Treatment.hpp @@ -28,47 +28,116 @@ class ACE_ADDON(Medical_Treatment) { maxRelief = 0; // Reduction of damage from wounds opioidRelief = 0; + // How strong should opioid Respiratory Depression be be + opioidDepression = 0; // How strong should opioid visuals be opioidEffect = 0; + //multiplier to respiratory rate + respiratoryRate = 0; + //multiplier to contractility + contractility = 0; + //Is the medication dosaging based off of weight + weightBased = "false"; + //what dose corresponds to a weight of 80kg + weightDose = 20; + //if weightDose isnt 20 (default), what is the upper and lower range of doses + weightDoseMin = 10; //60kg + weightDoseMax = 30; //100kg + //maximum dose before medication effects are reduced + maximumEffectiveDose = 40; + //multiplier to nausea + nauseaMult = 0; + //is this drug a sedation drug + sedation = "false"; + paralysis = "false"; + bloodBased = "false"; + linear = "false"; class Epinephrine { painReduce = 0; - hrIncreaseLow[] = {10, 20}; - hrIncreaseNormal[] = {10, 50}; - hrIncreaseHigh[] = {10, 40}; + hrIncreaseLow[] = {5, 20}; + hrIncreaseNormal[] = {5, 20}; + hrIncreaseHigh[] = {5, 15}; timeInSystem = 120; timeTillMaxEffect = 10; - maxDose = 6; - maxDoseDeviation = 4; + dose = 1; + maxDose = 60; + maxDoseDeviation = 40; incompatibleMedication[] = {}; - alphaFactor = -0.15; + alphaFactor = -0.05; onOverDose = ""; + maximumEffectiveDose = 40; }; class EpinephrineIV { painReduce = 0; - hrIncreaseLow[] = {15, 30}; - hrIncreaseNormal[] = {10, 50}; - hrIncreaseHigh[] = {15, 40}; - timeInSystem = 120; + hrIncreaseLow[] = {5, 30}; + hrIncreaseNormal[] = {10, 30}; + hrIncreaseHigh[] = {5, 30}; + timeInSystem = 300; timeTillMaxEffect = 10; + dose = 1; maxDose = 4; maxDoseDeviation = 2; incompatibleMedication[] = {}; - alphaFactor = -0.3; + alphaFactor = -0.2; onOverDose = ""; + contractility = 1; }; class Morphine { + painReduce = 0.6; + hrIncreaseLow[] = {-2, -10}; + hrIncreaseNormal[] = {-5, -10}; + hrIncreaseHigh[] = {-10, -15}; + timeInSystem = 300; + timeTillMaxEffect = 60; + dose = 1; + maxDose = 20; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + viscosityChange = -0; + maximumEffectiveDose = 20; + nauseaMult = 0.2; + }; + class MorphineIV { painReduce = 0.8; - hrIncreaseLow[] = {-10, -20}; - hrIncreaseNormal[] = {-10, -30}; - hrIncreaseHigh[] = {-10, -35}; + hrIncreaseLow[] = {-5, -15}; + hrIncreaseNormal[] = {-5, -20}; + hrIncreaseHigh[] = {-5, -20}; timeInSystem = 900; timeTillMaxEffect = 30; - maxDose = 4; - maxDoseDeviation = 4; + dose = 1; + maxDose = 2; + maxDoseDeviation = 1; incompatibleMedication[] = {}; - viscosityChange = -10; - opioidRelief = 0.1; + viscosityChange = -15; + opioidRelief = 1.3; + }; + class Adenosine { + painReduce = 0; + hrIncreaseLow[] = {-4, -10}; + hrIncreaseNormal[] = {-5, -10}; + hrIncreaseHigh[] = {-5, -15}; + timeInSystem = 180; + timeTillMaxEffect = 30; + dose = 1; + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + viscosityChange = 0; + maximumEffectiveDose = 20; + }; + class AdenosineIV { + painReduce = 0; + hrIncreaseLow[] = {-7, -10}; + hrIncreaseNormal[] = {-15, -20}; + hrIncreaseHigh[] = {-15, -25}; + timeInSystem = 360; + timeTillMaxEffect = 15; + dose = 1; + maxDose = 20; + maxDoseDeviation = 2; + incompatibleMedication[] = {}; + viscosityChange = 0; }; class Carbonate { painReduce = 0; @@ -77,6 +146,7 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {15, 20}; timeInSystem = 30; timeTillMaxEffect = 2; + dose = 1; maxDose = 10; incompatibleMedication[] = {}; viscosityChange = 0; @@ -87,12 +157,28 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseLow[] = {0, 0}; hrIncreaseNormal[] = {0, 0}; hrIncreaseHigh[] = {0, 0}; - timeInSystem = 120; - timeTillMaxEffect = 5; + timeInSystem = 240; + timeTillMaxEffect = 30; + dose = 1; maxDose = 3; incompatibleMedication[] = {}; viscosityChange = 0; onOverDose = ""; + }; + class TXAAuto { + painReduce = 0; + hrIncreaseLow[] = {-2, -7}; + hrIncreaseNormal[] = {-2, -7}; + hrIncreaseHigh[] = {-2, -7}; + timeInSystem = 90; + timeTillMaxEffect = 5; + dose = 1; + maxDose = 40; + incompatibleMedication[] = {}; + viscosityChange = 0; + onOverDose = ""; + maximumEffectiveDose = 20; + bloodBased = "true"; }; class Norepinephrine { painReduce = 0; @@ -101,11 +187,13 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {5, 10}; timeInSystem = 360; timeTillMaxEffect = 15; + dose = 1; maxDose = 12; incompatibleMedication[] = {}; viscosityChange = 25; - alphaFactor = -0.3; + alphaFactor = -0.2; onOverDose = ""; + contractility = 0.7; }; class Phenylephrine { painReduce = 0; @@ -114,11 +202,12 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-10, -15}; timeInSystem = 360; timeTillMaxEffect = 15; + dose = 1; maxDose = 6; maxDoseDeviation = 4; incompatibleMedication[] = {}; viscosityChange = 50; - alphaFactor = -0.5; + alphaFactor = -0.4; onOverDose = ""; }; class PhenylephrineAuto { @@ -128,11 +217,13 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-10, -15}; timeInSystem = 360; timeTillMaxEffect = 15; - maxDose = 6; - maxDoseDeviation = 4; + dose = 1; + maxDose = 40; + maxDoseDeviation = 10; incompatibleMedication[] = {}; viscosityChange = 25; - alphaFactor = -0.3; + alphaFactor = -0.15; + maximumEffectiveDose = 20; }; class Nitroglycerin { painReduce = 0; @@ -141,12 +232,14 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {10, 15}; timeInSystem = 360; timeTillMaxEffect = 15; + dose = 1; maxDose = 6; maxDoseDeviation = 4; incompatibleMedication[] = {}; viscosityChange = -25; - alphaFactor = 0.3; + alphaFactor = 0.2; onOverDose = ""; + contractility = -0.3; }; class Fentanyl { painReduce = 1; @@ -155,6 +248,7 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-20, -10}; timeInSystem = 900; timeTillMaxEffect = 20; + dose = 1; maxDose = 1; maxDoseDeviation = 1; incompatibleMedication[] = {}; @@ -162,6 +256,8 @@ class ACE_ADDON(Medical_Treatment) { onOverDose = ""; opioidRelief = 0.2; opioidEffect = 0.18; + opioidDepression = 0.18; + contractility = -0.2; }; class Ketamine { painReduce = 0.8; @@ -170,12 +266,15 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {10, 15}; timeInSystem = 900; timeTillMaxEffect = 15; + dose = 1; maxDose = 2; maxDoseDeviation = 2; incompatibleMedication[] = {}; viscosityChange = 10; onOverDose = ""; opioidEffect = 0.17; + opioidDepression = 0.17; + contractility = 0.3; }; class Nalbuphine { painReduce = 0.6; @@ -184,12 +283,14 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-15, -5}; timeInSystem = 900; timeTillMaxEffect = 30; + dose = 1; maxDose = 2; maxDoseDeviation = 2; incompatibleMedication[] = {}; viscosityChange = -5; onOverDose = ""; opioidRelief = 0.1; + contractility = -0.2; }; class CWMP { painReduce = 0.2; @@ -198,12 +299,14 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {5, 10}; timeInSystem = 360; timeTillMaxEffect = 45; - maxDose = 6; - maxDoseDeviation = 4; + dose = 1; + maxDose = 60; + maxDoseDeviation = 40; incompatibleMedication[] = {}; viscosityChange = -5; onOverDose = ""; - maxRelief = 0.5; + maxRelief = 0.4; + maximumEffectiveDose = 60; }; class PainKillers { painReduce = 0.35; @@ -212,22 +315,27 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-5, -17}; timeInSystem = 420; timeTillMaxEffect = 60; - maxDose = 5; + dose = 1; + maxDose = 60; incompatibleMedication[] = {}; onOverDose = ""; maxRelief = 0.5; + maximumEffectiveDose = 60; }; class Atropine { painReduce = 0; - hrIncreaseLow[] = {20, 40}; + hrIncreaseLow[] = {10, 20}; hrIncreaseNormal[] = {10, 25}; hrIncreaseHigh[] = {5, 15}; timeInSystem = 120; timeTillMaxEffect = 30; - maxDose = 4; + dose = 1; + maxDose = 40; incompatibleMedication[]= {}; viscosityChange = 0; onOverDose = ""; + contractility = 0.2; + maximumEffectiveDose = 40; }; class Amiodarone { painReduce = 0; @@ -236,10 +344,12 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {0, 0, 0}; timeInSystem = 120; timeTillMaxEffect = 30; + dose = 1; maxDose = 4; incompatibleMedication[]= {}; viscosityChange = 0; onOverDose = ""; + contractility = -0.4; }; class Lidocaine { painReduce = 0.2; @@ -248,11 +358,13 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {0, 0, 0}; timeInSystem = 120; timeTillMaxEffect = 30; + dose = 1; maxDose = 2; maxDoseDeviation = 4; incompatibleMedication[]= {}; onOverDose = ""; maxRelief = 0.6; + contractility = -0.2; }; class EACA { painReduce = 0; @@ -260,7 +372,8 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseNormal[] = {0, 0}; hrIncreaseHigh[] = {0, 0}; timeInSystem = 600; - timeTillMaxEffect = 15; + timeTillMaxEffect = 60; + dose = 1; maxDose = 10; incompatibleMedication[] = {}; viscosityChange = 0; @@ -273,6 +386,7 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-20, -30}; timeInSystem = 60; timeTillMaxEffect = 5; + dose = 1; maxDose = 10; incompatibleMedication[] = {}; viscosityChange = 0; @@ -285,6 +399,7 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {0, 0}; timeInSystem = 60; timeTillMaxEffect = 5; + dose = 1; maxDose = 3; incompatibleMedication[] = {}; viscosityChange = 0; @@ -297,10 +412,12 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {0, 0}; timeInSystem = 60; timeTillMaxEffect = 5; + dose = 1; maxDose = 3; incompatibleMedication[] = {}; viscosityChange = -15; onOverDose = ""; + contractility = -0.1; }; class Pervitin { painReduce = 0.5; @@ -309,12 +426,15 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {15, 25}; timeInSystem = 600; timeTillMaxEffect = 5; - maxDose = 2; - maxDoseDeviation = 1; + dose = 1; + maxDose = 20; + maxDoseDeviation = 20; incompatibleMedication[] = {}; viscosityChange = 5; onOverDose = ""; opioidEffect = 0.2; + maximumEffectiveDose = 20; + nauseaMult = 0.2; }; class Caffeine { painReduce = 0; @@ -323,11 +443,14 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {5, 15}; timeInSystem = 1800; timeTillMaxEffect = 5; - maxDose = 4; - maxDoseDeviation = 4; + dose = 1; + maxDose = 60; + maxDoseDeviation = 20; incompatibleMedication[] = {}; viscosityChange = 0; onOverDose = ""; + respiratoryRate = 0.1; + maximumEffectiveDose = 60; }; class BubbleWrap { painReduce = 0.05; @@ -336,6 +459,7 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {0, 0}; timeInSystem = 300; timeTillMaxEffect = 5; + dose = 1; maxDose = 0; incompatibleMedication[] = {}; viscosityChange = 0; @@ -348,11 +472,701 @@ class ACE_ADDON(Medical_Treatment) { hrIncreaseHigh[] = {-5, -15}; timeInSystem = 300; timeTillMaxEffect = 20; - maxDose = 4; + dose = 1; + maxDose = 90; incompatibleMedication[] = {}; viscosityChange = 5; onOverDose = ""; maxRelief = 0.6; + maximumEffectiveDose = 60; + bloodBased = "true"; + }; + class Ondansetron { + painReduce = 0.0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 300; + timeTillMaxEffect = 15; + dose = 1; + viscosityChange = -0; + maximumEffectiveDose = 2; + nauseaMult = -0.4; + }; + class Succinylcholine { + painReduce = 0.0; + hrIncreaseLow[] = {15, 20}; + hrIncreaseNormal[] = {10, 20}; + hrIncreaseHigh[] = {10, 20}; + timeInSystem = 60; + timeTillMaxEffect = 5; + dose = 1; + viscosityChange = -0; + maximumEffectiveDose = 2; + }; + class Rocuronium { + painReduce = 0.0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 240; + timeTillMaxEffect = 20; + dose = 1; + viscosityChange = -0; + maximumEffectiveDose = 2; + }; + class Sugammadex { + painReduce = 0.0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 60; + timeTillMaxEffect = 15; + dose = 1; + viscosityChange = -0; + maximumEffectiveDose = 20; + }; + class syringe_TXA_5ml { + painReduce = 0; + hrIncreaseLow[] = {-2, -5}; + hrIncreaseNormal[] = {-2, -5}; + hrIncreaseHigh[] = {-2, -5}; + timeInSystem = 180; + timeTillMaxEffect = 5; + dose = 1; + viscosityChange = 0; + bloodBased = "true"; + }; + class syringe_TXA_10ml { + painReduce = 0; + hrIncreaseLow[] = {-2, -5}; + hrIncreaseNormal[] = {-2, -5}; + hrIncreaseHigh[] = {-2, -5}; + timeInSystem = 120; + timeTillMaxEffect = 20; + dose = 1; + viscosityChange = 0; + bloodBased = "true"; + }; + class syringe_EACA_5ml { + painReduce = 0; + hrIncreaseLow[] = {-2, -5}; + hrIncreaseNormal[] = {-2, -5}; + hrIncreaseHigh[] = {-2, -5}; + timeInSystem = 100; + timeTillMaxEffect = 35; + dose = 1; + viscosityChange = 0; + maximumEffectiveDose = 20; + bloodBased = "true"; + }; + class syringe_EpinephrineIV_5ml { + painReduce = 0; + hrIncreaseLow[] = {10, 15}; + hrIncreaseNormal[] = {10, 20}; + hrIncreaseHigh[] = {10, 20}; + timeInSystem = 180; + timeTillMaxEffect = 20; + dose = 1; + alphaFactor = -0.1; + contractility = 0.5; + maximumEffectiveDose = 30; + respiratoryRate = 0.2; + }; + class syringe_Phenylephrine_5ml { + painReduce = 0; + hrIncreaseLow[] = {2, 10}; + hrIncreaseNormal[] = {2, 15}; + hrIncreaseHigh[] = {2, 10}; + timeInSystem = 180; + timeTillMaxEffect = 15; + viscosityChange = 10; + dose = 1; + alphaFactor = -0.3; + maximumEffectiveDose = 30; + }; + class syringe_Fentanyl_5ml { + painReduce = 1; + hrIncreaseLow[] = {-5, -10}; + hrIncreaseNormal[] = {-10, -15}; + hrIncreaseHigh[] = {-10, -15}; + timeInSystem = 900; + timeTillMaxEffect = 20; + dose = 1; + viscosityChange = -10; + opioidRelief = 1.2; + opioidEffect = 0.11; + opioidDepression = 0.2; + respiratoryRate = -0.2; + contractility = -0.2; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.4; + bloodBased = "true"; + }; + class syringe_Ketamine_5ml { + painReduce = 0.8; + hrIncreaseLow[] = {5, 20}; + hrIncreaseNormal[] = {10, 20}; + hrIncreaseHigh[] = {5, 20}; + timeInSystem = 600; + timeTillMaxEffect = 15; + dose = 1; + viscosityChange = 10; + opioidEffect = 0.09; + opioidDepression = 0.09; + respiratoryRate = 0.2; + contractility = 0.1; + weightBased = "true"; + weightDose = 15; + weightDoseMin = 10; + weightDoseMax = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + bloodBased = "true"; + }; + class syringe_Nalbuphine_5ml { + painReduce = 0.6; + hrIncreaseLow[] = {-5, 0}; + hrIncreaseNormal[] = {-10, -5}; + hrIncreaseHigh[] = {-15, -5}; + timeInSystem = 600; + timeTillMaxEffect = 30; + dose = 1; + viscosityChange = -5; + opioidRelief = 1.1; + respiratoryRate = -0.1; + contractility = -0.1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + bloodBased = "true"; + }; + class syringe_AtropineIV_5ml { + painReduce = 0; + hrIncreaseLow[] = {5, 25}; + hrIncreaseNormal[] = {5, 20}; + hrIncreaseHigh[] = {5, 10}; + timeInSystem = 120; + timeTillMaxEffect = 30; + dose = 1; + viscosityChange = 0; + contractility = 0.1; + maximumEffectiveDose = 30; + }; + class syringe_Amiodarone_5ml { + painReduce = 0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 120; + timeTillMaxEffect = 30; + dose = 1; + viscosityChange = 0; + contractility = -0.2; + maximumEffectiveDose = 30; + bloodBased = "true"; + }; + class syringe_Lidocaine_5ml { + painReduce = 0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 120; + timeTillMaxEffect = 30; + dose = 1; + contractility = -0.1; + maximumEffectiveDose = 30; + }; + class syringe_Etomidate_5ml { + painReduce = 0.2; + hrIncreaseLow[] = {0, -5}; + hrIncreaseNormal[] = {-5, -10}; + hrIncreaseHigh[] = {-10, -15}; + timeInSystem = 60; + timeTillMaxEffect = 5; + dose = 1; + opioidDepression = 0.06; + viscosityChange = 0; + contractility = -0.05; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + bloodBased = "true"; + }; + class syringe_Flumazenil_5ml { + painReduce = 0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 60; + timeTillMaxEffect = 5; + dose = 1; + viscosityChange = 0; + maximumEffectiveDose = 30; + }; + class syringe_Lorazepam_5ml { + painReduce = 0; + hrIncreaseLow[] = {5, 10}; + hrIncreaseNormal[] = {5, 15}; + hrIncreaseHigh[] = {7, 15}; + timeInSystem = 30; + timeTillMaxEffect = 5; + dose = 1; + opioidDepression = 0.11; + viscosityChange = -5; + respiratoryRate = -0.1; + contractility = -0.1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + }; + class syringe_MorphineIV_5ml { + painReduce = 0.7; + hrIncreaseLow[] = {-5, -15}; + hrIncreaseNormal[] = {-5, -20}; + hrIncreaseHigh[] = {-5, -20}; + timeInSystem = 600; + timeTillMaxEffect = 15; + dose = 1; + viscosityChange = -7; + opioidRelief = 1.1; + respiratoryRate = -0.1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + }; + class syringe_AdenosineIV_5ml { + painReduce = 0; + hrIncreaseLow[] = {-3, -10}; + hrIncreaseNormal[] = {-7, -15}; + hrIncreaseHigh[] = {-7, -20}; + timeInSystem = 180; + timeTillMaxEffect = 15; + dose = 1; + viscosityChange = 0; + maximumEffectiveDose = 30; + }; + class syringe_Doxapram_5ml { + painReduce = 0; + hrIncreaseLow[] = {3, 10}; + hrIncreaseNormal[] = {5, 10}; + hrIncreaseHigh[] = {5, 15}; + timeInSystem = 180; + timeTillMaxEffect = 15; + dose = 1; + respiratoryRate = 0.40; + opioidDepression = -0.25; + maximumEffectiveDose = 30; + }; + class syringe_Ondansetron_5ml { + painReduce = 0.0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 300; + timeTillMaxEffect = 15; + dose = 1; + viscosityChange = -0; + nauseaMult = -0.7; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + }; + class syringe_Succinylcholine_5ml { + painReduce = 0.0; + hrIncreaseLow[] = {15, 20}; + hrIncreaseNormal[] = {10, 20}; + hrIncreaseHigh[] = {10, 20}; + timeInSystem = 120; + timeTillMaxEffect = 5; + dose = 1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + }; + class syringe_Rocuronium_5ml { + painReduce = 0.0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 300; + timeTillMaxEffect = 20; + dose = 1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + }; + class syringe_Sugammadex_5ml_20 { + painReduce = 0.0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 60; + timeTillMaxEffect = 15; + dose = 1; + maximumEffectiveDose = 30; + }; + class syringe_Metoprolol_5ml { + painReduce = 0.0; + hrIncreaseLow[] = {-4, -11}; + hrIncreaseNormal[] = {-8, -16}; + hrIncreaseHigh[] = {-12, -20}; + timeInSystem = 300; + timeTillMaxEffect = 5; + dose = 1; + alphaFactor = -0.15; + maximumEffectiveDose = 30; + }; + class syringe_Diazepam_5ml { + painReduce = 0; + hrIncreaseLow[] = {-2, 0}; + hrIncreaseNormal[] = {-3, -5}; + hrIncreaseHigh[] = {-3, -5}; + timeInSystem = 180; + timeTillMaxEffect = 5; + dose = 1; + respiratoryRate = -0.25; + maximumEffectiveDose = 30; + }; + class syringe_CalciumChloride_5ml { + painReduce = 0; + hrIncreaseLow[] = {10, 20}; + hrIncreaseNormal[] = {8, 15}; + hrIncreaseHigh[] = {5, 10}; + timeInSystem = 60; + timeTillMaxEffect = 5; + dose = 1; + alphaFactor = -0.04; + onOverDose = ""; + maximumEffectiveDose = 40; + }; + class syringe_CalciumGluconate_5ml { + painReduce = 0; + hrIncreaseLow[] = {5, 15}; + hrIncreaseNormal[] = {5, 15}; + hrIncreaseHigh[] = {3, 10}; + timeInSystem = 240; + timeTillMaxEffect = 15; + dose = 1; + alphaFactor = -0.02; + onOverDose = ""; + maximumEffectiveDose = 40; + }; + class syringe_Bicarbonate_5ml { + painReduce = 0; + hrIncreaseLow[] = {2, 8}; + hrIncreaseNormal[] = {2, 8}; + hrIncreaseHigh[] = {0, 5}; + timeInSystem = 120; + timeTillMaxEffect = 10; + dose = 1; + alphaFactor = 0.06; + onOverDose = ""; + maximumEffectiveDose = 40; + }; + class syringe_Alteplase_5ml_30 { + painReduce = 0; + hrIncreaseLow[] = {-4, -10}; + hrIncreaseNormal[] = {-5, -15}; + hrIncreaseHigh[] = {-5, -20}; + timeInSystem = 180; + timeTillMaxEffect = 30; + dose = 1; + maxDose = 40; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + viscosityChange = 0; + maximumEffectiveDose = 30; + }; + class syringe_Fentanyl_10ml { + painReduce = 1; + hrIncreaseLow[] = {-5, -10}; + hrIncreaseNormal[] = {-10, -15}; + hrIncreaseHigh[] = {-10, -15}; + timeInSystem = 300; + timeTillMaxEffect = 60; + dose = 1; + viscosityChange = -6; + onOverDose = ""; + opioidRelief = 1.1; + opioidEffect = 0.15; + opioidDepression = 0.15; + respiratoryRate = -0.2; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + bloodBased = "true"; + }; + class syringe_Ketamine_10ml { + painReduce = 0.8; + hrIncreaseLow[] = {5, 20}; + hrIncreaseNormal[] = {10, 25}; + hrIncreaseHigh[] = {5, 25}; + timeInSystem = 300; + timeTillMaxEffect = 30; + dose = 1; + viscosityChange = 10; + opioidEffect = 0.06; + opioidDepression = 0.06; + respiratoryRate = 0.15; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + bloodBased = "true"; + }; + class syringe_Nalbuphine_10ml { + painReduce = 0.6; + hrIncreaseLow[] = {-5, 0}; + hrIncreaseNormal[] = {-10, -5}; + hrIncreaseHigh[] = {-15, -5}; + timeInSystem = 300; + timeTillMaxEffect = 60; + dose = 1; + viscosityChange = -5; + opioidRelief = 1.1; + respiratoryRate = -0.1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + bloodBased = "true"; + }; + class syringe_Lidocaine_10ml { + painReduce = 0; + hrIncreaseLow[] = {0, 0}; + hrIncreaseNormal[] = {0, 0}; + hrIncreaseHigh[] = {0, 0}; + timeInSystem = 120; + timeTillMaxEffect = 30; + dose = 1; + maximumEffectiveDose = 30; + }; + class syringe_MorphineIV_10ml { + painReduce = 0.7; + hrIncreaseLow[] = {-5, -15}; + hrIncreaseNormal[] = {-5, -20}; + hrIncreaseHigh[] = {-5, -20}; + timeInSystem = 300; + timeTillMaxEffect = 30; + dose = 1; + viscosityChange = -10; + opioidRelief = 1.1; + respiratoryRate = -0.1; + weightBased = "true"; + weightDose = 20; + maximumEffectiveDose = 30; + nauseaMult = 0.3; + }; + class syringe_TXA { + maxDose = 40; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 20; + }; + class syringe_EACA { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 20; + }; + class syringe_Epinephrine { + maxDose = 40; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Norepinephrine { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Phenylephrine { + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Nitroglycerin { + maxDose = 60; + maxDoseDeviation = 30; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Atropine { + maxDose = 90; + maxDoseDeviation = 30; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Amiodarone { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Etomidate { + maxDose = 60; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Flumazenil { + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Lorazepam { + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Lidocaine { + maxDose = 60; + maxDoseDeviation = 30; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Fentanyl { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Ketamine { + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Nalbuphine { + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Morphine { + maxDose = 30; + maxDoseDeviation = 30; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Adenosine { + maxDose = 60; + maxDoseDeviation = 30; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Alteplase { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Doxapram { + maxDose = 30; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Ondansetron { + maxDose = 30; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Succinylcholine { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Rocuronium { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + weightBased = "true"; + }; + class syringe_Sugammadex { + maxDose = 30; + maxDoseDeviation = 10; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Metoprolol { + maxDose = 40; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_Diazepam { + maxDose = 30; + maxDoseDeviation = 20; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 30; + }; + class syringe_CalciumGluconate { + maxDose = 120; + maxDoseDeviation = 120; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 120; + }; + class syringe_CalciumChloride { + maxDose = 120; + maxDoseDeviation = 120; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 120; + }; + class syringe_Bicarbonate { + maxDose = 120; + maxDoseDeviation = 120; + incompatibleMedication[] = {}; + onOverDose = ""; + maximumEffectiveDose = 120; }; }; -}; +}; \ No newline at end of file diff --git a/addons/pharma/ACE_Medical_Treatment_Actions.hpp b/addons/pharma/ACE_Medical_Treatment_Actions.hpp index b0a03951e..780d9add3 100644 --- a/addons/pharma/ACE_Medical_Treatment_Actions.hpp +++ b/addons/pharma/ACE_Medical_Treatment_Actions.hpp @@ -1,41 +1,106 @@ class ACE_Medical_Treatment_Actions { - class BasicBandage; - class FieldDressing; + class BasicBandage { + removeFromInteractions = "false"; + }; class ApplyTourniquet; - class RemoveTourniquet; class Morphine; class CheckPulse; - class CPR; class BloodIV: BasicBandage { - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"Chest", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg", "Neck"}; medicRequired = QUOTE(ace_medical_treatment_medicIV); - condition = QUOTE(!(GVAR(RequireInsIV)) || FUNC(removeIV)); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -800, 16] call kat_pharma_fnc_fluid;"; + condition = QUOTE(!(GVAR(RequireInsIV)) || FUNC(removeIVCheck)); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class BloodIV_500: BloodIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -400, 8] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class BloodIV_250: BloodIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -200, 4] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class SalineIV: BloodIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 750, 0] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class SalineIV_500: SalineIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 350, 0] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class SalineIV_250: SalineIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class PlasmaIV: BloodIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -500, 20] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class PlasmaIV_500: PlasmaIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -250, 10] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class PlasmaIV_250: PlasmaIV { - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -100, 5] call kat_pharma_fnc_fluid;"; + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + }; + 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;"; + }; + class PackedRBCIV_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;"; + }; + 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;"; + }; + 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;"; + }; + 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;"; + }; + class HypertonicSalineIV_500: SalineIV { + displayName = CSTRING(Actions_Hypertonic_Saline_500); + items[] = {"kat_HypertonicSalineIV_500"}; + displayNameProgress = CSTRING(Transfusing_Hypertonic_Saline); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + }; + class HypertonicSalineIV_250: SalineIV { + displayName = CSTRING(Actions_Hypertonic_Saline_250); + items[] = {"kat_HypertonicSalineIV_250"}; + displayNameProgress = CSTRING(Transfusing_Hypertonic_Saline); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + }; + class HypertonicSalineIV_100: SalineIV { + displayName = CSTRING(Actions_Hypertonic_Saline_100); + items[] = {"kat_HypertonicSalineIV_100"}; + displayNameProgress = CSTRING(Transfusing_Hypertonic_Saline); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + }; + class HextendIV: SalineIV { + displayName = CSTRING(Actions_Hextend); + items[] = {"kat_HextendIV"}; + displayNameProgress = CSTRING(Transfusing_Hextend); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + }; + class HextendIV_500: SalineIV { + displayName = CSTRING(Actions_Hextend_500); + items[] = {"kat_HextendIV_500"}; + displayNameProgress = CSTRING(Transfusing_Hextend); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; + }; + class HextendIV_250: SalineIV { + displayName = CSTRING(Actions_Hextend_250); + items[] = {"kat_HextendIV_250"}; + displayNameProgress = CSTRING(Transfusing_Hextend); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag;"; }; class Epinephrine: Morphine { callbackSuccess = QFUNC(medication); @@ -134,42 +199,63 @@ class ACE_Medical_Treatment_Actions { callbackSuccess = QFUNC(treatmentAdvanced_Naloxone); sounds[] = {}; }; - class EACA: Carbonate { + /*class EACA: Carbonate { displayName = CSTRING(Take_EACA); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"Neck", "Chest", "Body", "LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_EACA); treatmentTime = QGVAR(treatmentTime_EACA); items[] = {"kat_EACA"}; - condition = QUOTE(!(GVAR(MedicationsRequireInsIV)) || FUNC(removeIV)); + condition = QUOTE(FUNC(AMSCheck)); callbackSuccess = QFUNC(medication); sounds[] = {}; }; class TXA: EACA { displayName = CSTRING(Take_TXA); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_TXA); treatmentTime = QGVAR(treatmentTime_TXA); items[] = {"kat_TXA"}; callbackSuccess = QFUNC(medication); sounds[] = {}; + };*/ + class TXAAuto: Morphine { + displayName = CSTRING(Take_TXAAuto); + displayNameProgress = CSTRING(Using); + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_TXAAuto); + items[] = {"kat_TXAAuto"}; + condition = ""; + treatmentTime = QGVAR(treatmentTime_TXAAuto); + callbackSuccess = QFUNC(medication); + sounds[] = {}; }; class SalineFlush: Carbonate { displayName = CSTRING(Saline_Flush); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"Neck", "Chest", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg", "Neck"}; allowSelfTreatment = 1; - medicRequired = 1; - treatmentTime = 3; + medicRequired = QGVAR(medLvl_SalineFlush); + treatmentTime = QGVAR(treatmentTime_SalineFlush); items[] = {}; condition = QUOTE((_patient getVariable [ARR_2(QQGVAR(IVplaced),true)]) && FUNC(salineCheck)); callbackSuccess = QFUNC(treatmentAdvanced_Flush); sounds[] = {}; }; + class SyringeSalineFlush: Carbonate { + displayName = CSTRING(Saline_Flush); + allowedSelections[] = {"Neck", "Chest", "LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_SalineFlush); + treatmentTime = QGVAR(treatmentTime_SalineFlush); + items[] = {"kat_syringe_salineIV_5ml_30"}; + condition = QUOTE(_patient getVariable [ARR_2(QQGVAR(IVplaced),true)]); + callbackSuccess = QFUNC(treatmentAdvanced_Flush); + sounds[] = {}; + }; class Inspect: Carbonate { displayName = CSTRING(Inspect_Catheter); category = "examine"; - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"Neck", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 1; medicRequired = 1; treatmentTime = 2; @@ -180,9 +266,42 @@ class ACE_Medical_Treatment_Actions { animationMedicProne = ""; sounds[] = {}; }; - class Norepinephrine: EACA { + class ManualPressureBag: BasicBandage { + displayName = CSTRING(ManualPressure_displayName); + displayNameProgress = CSTRING(ManualPressure_progress); + allowedSelections[] = {"Neck", "Chest", "LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; + category = "advanced"; + treatmentTime = 1; + medicRequired = 0; + items[] = {}; + icon = ""; + condition = QUOTE(([ARR_3(_player,_patient,_bodyPart)] call FUNC(hasIVbag))); + callbackSuccess = QFUNC(treatmentAdvanced_ManualBagPressure); + }; + class ApplyPressureBag: BasicBandage { + displayName = CSTRING(Apply_PressureBag); + displayNameProgress = CSTRING(Applying_PressureBag); + category = "advanced"; + allowedSelections[] = {"Chest", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg", "Neck"}; + medicRequired = QACEGVAR(medical_treatment,medicIV); + treatmentTime = 6; + items[] = {"kat_pressureBag"}; + condition = QUOTE(([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV)) && !([ARR_2(_patient,_bodyPart)] call FUNC(removePressure))); + callbackSuccess = QFUNC(treatmentAdvanced_applyPressureBag); + }; + class RemovePressureBag: BasicBandage { + displayName = CSTRING(Remove_PressureBag); + displayNameProgress = CSTRING(Removing_PressureBag); + category = "advanced"; + allowedSelections[] = {"Chest", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg", "Neck"}; + medicRequired = QACEGVAR(medical_treatment,medicIV); + treatmentTime = 6; + items[] = {}; + condition = QUOTE([ARR_2(_patient,_bodyPart)] call FUNC(removePressure)); + callbackSuccess = QFUNC(treatmentAdvanced_RemovePressureBag); + }; + /*class Norepinephrine: EACA { displayName = CSTRING(Take_Norep); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Norepinephrine); treatmentTime = QGVAR(treatmentTime_Norepinephrine); @@ -193,28 +312,27 @@ class ACE_Medical_Treatment_Actions { class Phenylephrine: EACA { displayName = CSTRING(Take_Phenyl); displayNameProgress = CSTRING(Using); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Phenylephrine); treatmentTime = QGVAR(treatmentTime_Phenylephrine); items[] = {"kat_phenylephrine"}; callbackSuccess = QFUNC(medication); sounds[] = {}; - }; + };*/ class PhenylephrineAuto: Morphine { displayName = CSTRING(Take_Phenyl_Auto); displayNameProgress = CSTRING(Using); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; items[] = {"kat_phenylephrineAuto"}; condition = ""; - treatmentTime = 5; + medicRequired = QGVAR(medLvl_PhenylephrineAuto); + treatmentTime = QGVAR(treatmentTime_PhenylephrineAuto); callbackSuccess = QFUNC(medication); sounds[] = {}; }; - class Nitroglycerin: EACA { + /*class Nitroglycerin: EACA { displayName = CSTRING(Take_Nitro); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Nitroglicerin); treatmentTime = QGVAR(treatmentTime_Nitroglycerin); @@ -224,7 +342,6 @@ class ACE_Medical_Treatment_Actions { }; class Amiodarone: EACA { displayName = CSTRING(Take_Amiodarone); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Amiodarone); treatmentTime = QGVAR(treatmentTime_Amiodarone); @@ -234,18 +351,17 @@ class ACE_Medical_Treatment_Actions { }; class Lidocaine: EACA { displayName = CSTRING(Take_Lidocaine); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Lidocain); treatmentTime = QGVAR(treatmentTime_Lidocaine); items[] = {"kat_lidocaine"}; callbackSuccess = QFUNC(medication); sounds[] = {}; - }; + };*/ class Atropine: Morphine { displayName = CSTRING(Take_Atropine); displayNameProgress = CSTRING(Using); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Atropine); treatmentTime = QGVAR(treatmentTime_Atropine); @@ -254,9 +370,17 @@ class ACE_Medical_Treatment_Actions { callbackSuccess = QFUNC(medication); sounds[] = {}; }; + /*class AtropineIV: EACA { + displayName = CSTRING(Take_AtropineIV); + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_AtropineIV); + treatmentTime = QGVAR(treatmentTime_AtropineIV); + items[] = {"kat_atropineIV"}; + callbackSuccess = QFUNC(medication); + sounds[] = {}; + }; class Ketamine: EACA { displayName = CSTRING(Take_Ketamine); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Ketamine); treatmentTime = QGVAR(treatmentTime_Ketamine); @@ -266,7 +390,6 @@ class ACE_Medical_Treatment_Actions { }; class Fentanyl: EACA { displayName = CSTRING(Take_Fentanyl); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Fentanyl); treatmentTime = QGVAR(treatmentTime_Fentanyl); @@ -276,7 +399,6 @@ class ACE_Medical_Treatment_Actions { }; class Nalbuphine: EACA { displayName = CSTRING(Take_Nalbuphine); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_Nalbuphine); treatmentTime = QGVAR(treatmentTime_Nalbuphine); @@ -284,6 +406,24 @@ class ACE_Medical_Treatment_Actions { callbackSuccess = QFUNC(medication); sounds[] = {}; }; + class MorphineIV: EACA { + displayName = CSTRING(Take_MorphineIV); + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_MorphineIV); + treatmentTime = QGVAR(treatmentTime_MorphineIV); + items[] = {"kat_morphineIV"}; + callbackSuccess = QFUNC(medication); + sounds[] = {}; + }; + class AdenosineIV: EACA { + displayName = CSTRING(Take_AdenosineIV); + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_AdenosineIV); + treatmentTime = QGVAR(treatmentTime_AdenosineIV); + items[] = {"kat_adenosineIV"}; + callbackSuccess = QFUNC(medication); + sounds[] = {}; + };*/ class Reorientation: Carbonate { displayName = CSTRING(Take_Reorient); displayNameProgress = CSTRING(Reorienting); @@ -304,7 +444,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Applying_IV); medicRequired = QGVAR(medLvl_ApplyIV); category = "advanced"; - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; items[] = {"kat_IV_16"}; condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); treatmentTime = QGVAR(treatmentTime_ApplyIV); @@ -312,12 +452,38 @@ class ACE_Medical_Treatment_Actions { litter[] = {}; sounds[] = {}; }; + class Apply14IV: ApplyIV { + displayName = CSTRING(Apply_IV_14); + displayNameProgress = CSTRING(Applying_IV); + medicRequired = QGVAR(medLvl_Apply14IV); + category = "advanced"; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; + items[] = {"kat_IV_14"}; + condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); + treatmentTime = QGVAR(treatmentTime_ApplyIV); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'kat_IV_14')] call FUNC(applyIV)); + litter[] = {}; + sounds[] = {}; + }; + class Apply20IV: ApplyIV { + displayName = CSTRING(Apply_IV_20); + displayNameProgress = CSTRING(Applying_IV); + medicRequired = QGVAR(medLvl_Apply20IV); + category = "advanced"; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; + items[] = {"kat_IV_20"}; + condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); + treatmentTime = QGVAR(treatmentTime_ApplyIV); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'kat_IV_20')] call FUNC(applyIV)); + litter[] = {}; + sounds[] = {}; + }; class ApplyIO: ApplyIV { displayName = CSTRING(Apply_IO_45); displayNameProgress = CSTRING(Applying_IV); medicRequired = QGVAR(medLvl_ApplyIO); category = "advanced"; - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; items[] = {"kat_IO_FAST"}; condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); treatmentTime = QGVAR(treatmentTime_ApplyIO); @@ -325,22 +491,47 @@ class ACE_Medical_Treatment_Actions { litter[] = {}; sounds[] = {}; }; + class ApplyEZIO: ApplyIV { + displayName = CSTRING(Apply_EZ_IO); + displayNameProgress = CSTRING(Applying_IV); + medicRequired = QGVAR(medLvl_ApplyEZIO); + allowSelfTreatment = 0; + category = "advanced"; + items[] = {"kat_EZ_IO"}; + allowedSelections[] = {"UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg"}; + condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); + treatmentTime = QGVAR(treatmentTime_ApplyEZIO); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'kat_EZ_IO')] call FUNC(applyIV)); + sounds[] = {}; + }; + class ApplyEJV: ApplyIV { + displayName = CSTRING(Apply_EJV); + displayNameProgress = CSTRING(Applying_EJV); + medicRequired = QGVAR(medLvl_ApplyEJV); + allowSelfTreatment = 0; + category = "advanced"; + allowedSelections[] = {"Neck"}; + items[] = {"kat_EJV"}; + condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); + treatmentTime = QGVAR(treatmentTime_ApplyEJV); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'kat_EJV')] call FUNC(applyIV)); + sounds[] = {}; + }; class RemoveIV: ApplyTourniquet { displayName = CSTRING(Remove_IV); displayNameProgress = CSTRING(Removing_IV); category = "advanced"; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; - treatmentTime = 3; + allowedSelections[] = {"Chest", "Neck", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg"}; + treatmentTime = QGVAR(treatmentTime_ApplyIV); items[] = {}; - condition = QFUNC(removeIV); + condition = QFUNC(removeIVCheck); callbackSuccess = QFUNC(retrieveIV); sounds[] = {}; }; - class Etomidate: EACA { + /*class Etomidate: EACA { displayName = CSTRING(Etomidate_Use); category = "surgery"; treatmentLocations = 0; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(medLvl_Etomidate); treatmentTime = QGVAR(treatmentTime_Etomidate); @@ -352,7 +543,6 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Lorazepam_Use); category = "surgery"; treatmentLocations = 0; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(medLvl_Lorazepam); treatmentTime = QGVAR(treatmentTime_Lorazepam); @@ -364,7 +554,6 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Flumazenil_Use); category = "surgery"; treatmentLocations = 0; - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(medLvl_Flumezenil); treatmentTime = QGVAR(treatmentTime_Flumazenil); @@ -375,24 +564,23 @@ class ACE_Medical_Treatment_Actions { class EpinephrineIV: EACA { displayName = CSTRING(Take_Epi); displayNameProgress = CSTRING(Using); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; allowSelfTreatment = 1; medicRequired = QGVAR(medLvl_EpinephrineIV); treatmentTime = QGVAR(treatmentTime_EpinephrineIV); items[] = {"kat_epinephrineIV"}; callbackSuccess = QFUNC(medication); sounds[] = {}; - }; + };*/ class Dialysis: BasicBandage { displayName = CSTRING(Dialysis_DisplayName); displayNameProgress = CSTRING(Dialysis_DisplayNameProgress); - icon = QPATHTOF(ui\icon_aedx.paa); + icon = QPATHTOEF(circulation,ui\icon_aedx.paa); category = "surgery"; consumeItem = 0; items[] = {}; medicRequired = 1; condition = QFUNC(vehicleCheckDialysis); - treatmentTime = 15; + treatmentTime = 5; callbackProgress = ""; callbackStart = ""; callbackFailure = ""; @@ -402,18 +590,997 @@ class ACE_Medical_Treatment_Actions { class CheckCoag: CheckPulse { displayName = CSTRING(CheckCoag_DisplayName); displayNameProgress = CSTRING(CheckCoag_DisplayNameProgress); - allowedSelections[] = {"LeftArm", "RightArm"}; + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; treatmentLocations = QGVAR(CheckCoag_Location); medicRequired = QGVAR(CheckCoag_MedLevel); treatmentTime = QGVAR(CheckCoag_TreatmentTime); category = "examine"; consumeItem = 0; items[] = {"kat_coag_sense"}; - condition = ""; + condition = QFUNC(removeIVCheck); callbackProgress = ""; callbackStart = ""; callbackFailure = ""; callbackSuccess = QFUNC(treatmentAdvanced_CheckCoag); litter[] = {}; }; + class syringe_EACA_5ml_10: Carbonate { + displayName = KATPUSHCSTRING(eaca,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(eaca,5ml,10); + allowedSelections[] = {"Neck", "Chest", "LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_EACA); + treatmentTime = QGVAR(treatmentTime_IV); + items[] = {"kat_syringe_eaca_5ml_10"}; + condition = QUOTE(FUNC(ivCondition)); + callbackSuccess = QFUNC(medication); + removeFromInteractions = "true"; + sounds[] = {}; + }; + class syringe_EACA_5ml_20: syringe_EACA_5ml_10 { + displayName = KATPUSHCSTRING(eaca,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(eaca,5ml,20); + items[] = {"kat_syringe_eaca_5ml_20"}; + }; + class syringe_TXA_10ml_10: Carbonate { + displayName = KATPUSHCSTRING(txa,10ml,10); + displayNameProgress = KATPUSHINGCSTRING(txa,10ml,10); + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; + allowSelfTreatment = 1; + medicRequired = QGVAR(medLvl_TXAIM); + treatmentTime = QGVAR(treatmentTime_IM); + items[] = {"kat_syringe_txa_10ml_10"}; + callbackSuccess = QFUNC(medication); + removeFromInteractions = "true"; + sounds[] = {}; + }; + class syringe_TXA_10ml_20: syringe_TXA_10ml_10 { + displayName = KATPUSHCSTRING(txa,10ml,20); + displayNameProgress = KATPUSHINGCSTRING(txa,10ml,20); + items[] = {"kat_syringe_txa_10ml_20"}; + }; + class syringe_TXA_5ml_10: syringe_EACA_5ml_10 { + displayName = KATPUSHCSTRING(txa,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(txa,5ml,10); + medicRequired = QGVAR(medLvl_TXA); + items[] = {"kat_syringe_txa_5ml_10"}; + }; + class syringe_TXA_5ml_20: syringe_TXA_5ml_10 { + displayName = KATPUSHCSTRING(txa,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(txa,5ml,20); + items[] = {"kat_syringe_txa_5ml_20"}; + }; + class syringe_AdenosineIV_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_adenosineIV); + items[] = {"kat_syringe_adenosineIV_5ml_10"}; + displayName = KATPUSHCSTRING(adenosineIV,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(adenosineIV,5ml,10); + }; + class syringe_AdenosineIV_5ml_20: syringe_AdenosineIV_5ml_10 { + items[] = {"kat_syringe_adenosineIV_5ml_20"}; + displayName = KATPUSHCSTRING(adenosineIV,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(adenosineIV,5ml,20); + }; + class syringe_AdenosineIV_5ml_30: syringe_AdenosineIV_5ml_10 { + items[] = {"kat_syringe_adenosineIV_5ml_30"}; + displayName = KATPUSHCSTRING(adenosineIV,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(adenosineIV,5ml,30); + }; + class syringe_Alteplase_5ml_30: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_alteplase); + items[] = {"kat_syringe_alteplase_5ml_30"}; + displayName = KATPUSHCSTRING(alteplase,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(alteplase,5ml,30); + }; + class syringe_Amiodarone_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_amiodarone); + items[] = {"kat_syringe_amiodarone_5ml_10"}; + displayName = KATPUSHCSTRING(amiodarone,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(amiodarone,5ml,10); + }; + class syringe_Amiodarone_5ml_20: syringe_Amiodarone_5ml_10 { + items[] = {"kat_syringe_amiodarone_5ml_20"}; + displayName = KATPUSHCSTRING(amiodarone,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(amiodarone,5ml,20); + }; + class syringe_Amiodarone_5ml_30: syringe_Amiodarone_5ml_10 { + items[] = {"kat_syringe_amiodarone_5ml_30"}; + displayName = KATPUSHCSTRING(amiodarone,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(amiodarone,5ml,30); + }; + class syringe_AtropineIV_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_AtropineIV); + items[] = {"kat_syringe_atropineIV_5ml_10"}; + displayName = KATPUSHCSTRING(atropineIV,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(atropineIV,5ml,10); + }; + class syringe_AtropineIV_5ml_30: syringe_AtropineIV_5ml_10 { + items[] = {"kat_syringe_atropineIV_5ml_30"}; + displayName = KATPUSHCSTRING(atropineIV,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(atropineIV,5ml,30); + }; + class syringe_Bicarbonate_5ml_20: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_bicarbonate); + items[] = {"kat_syringe_bicarbonate_5ml_20"}; + displayName = KATPUSHCSTRING(bicarbonate,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(bicarbonate,5ml,20); + }; + class syringe_CalciumChloride_5ml_20: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_CalciumChloride); + items[] = {"kat_syringe_calciumChloride_5ml_20"}; + displayName = KATPUSHCSTRING(CalciumChloride,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(CalciumChloride,5ml,20); + }; + class syringe_CalciumGluconate_5ml_20: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_calciumGluconate); + items[] = {"kat_syringe_calciumGluconate_5ml_20"}; + displayName = KATPUSHCSTRING(calciumGluconate,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(calciumGluconate,5ml,20); + }; + class syringe_Diazepam_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_diazepam); + items[] = {"kat_syringe_diazepam_5ml_10"}; + displayName = KATPUSHCSTRING(diazepam,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(diazepam,5ml,10); + }; + class syringe_Diazepam_5ml_20: syringe_Diazepam_5ml_10 { + items[] = {"kat_syringe_diazepam_5ml_20"}; + displayName = KATPUSHCSTRING(diazepam,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(diazepam,5ml,20); + }; + class syringe_Diazepam_5ml_30: syringe_Diazepam_5ml_10 { + items[] = {"kat_syringe_diazepam_5ml_30"}; + displayName = KATPUSHCSTRING(diazepam,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(diazepam,5ml,30); + }; + class syringe_Doxapram_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_doxapram); + items[] = {"kat_syringe_doxapram_5ml_10"}; + displayName = KATPUSHCSTRING(doxapram,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(doxapram,5ml,10); + }; + class syringe_Doxapram_5ml_20: syringe_Doxapram_5ml_10 { + items[] = {"kat_syringe_doxapram_5ml_20"}; + displayName = KATPUSHCSTRING(doxapram,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(doxapram,5ml,20); + }; + class syringe_Doxapram_5ml_30: syringe_Doxapram_5ml_10 { + items[] = {"kat_syringe_doxapram_5ml_30"}; + displayName = KATPUSHCSTRING(doxapram,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(doxapram,5ml,30); + }; + class syringe_EpinephrineIV_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_EpinephrineIV); + items[] = {"kat_syringe_epinephrineIV_5ml_10"}; + displayName = KATPUSHCSTRING(epinephrineIV,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(epinephrineIV,5ml,10); + }; + class syringe_EpinephrineIV_5ml_20: syringe_EpinephrineIV_5ml_10 { + items[] = {"kat_syringe_epinephrineIV_5ml_20"}; + displayName = KATPUSHCSTRING(epinephrineIV,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(epinephrineIV,5ml,20); + }; + class syringe_Etomidate_5ml_10: syringe_EACA_5ml_10 { + category = "surgery"; + medicRequired = QGVAR(medLvl_etomidate); + items[] = {"kat_syringe_etomidate_5ml_10"}; + displayName = KATPUSHCSTRING(etomidate,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,10); + }; + class syringe_Etomidate_5ml_14: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_14"}; + displayName = KATPUSHCSTRING(etomidate,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,14); + }; + class syringe_Etomidate_5ml_16: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_16"}; + displayName = KATPUSHCSTRING(etomidate,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,16); + }; + class syringe_Etomidate_5ml_18: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_18"}; + displayName = KATPUSHCSTRING(etomidate,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,18); + }; + class syringe_Etomidate_5ml_20: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_20"}; + displayName = KATPUSHCSTRING(etomidate,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,20); + }; + class syringe_Etomidate_5ml_22: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_22"}; + displayName = KATPUSHCSTRING(etomidate,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,22); + }; + class syringe_Etomidate_5ml_24: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_24"}; + displayName = KATPUSHCSTRING(etomidate,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,24); + }; + class syringe_Etomidate_5ml_26: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_26"}; + displayName = KATPUSHCSTRING(etomidate,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,26); + }; + class syringe_Etomidate_5ml_28: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_28"}; + displayName = KATPUSHCSTRING(etomidate,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,28); + }; + class syringe_Etomidate_5ml_30: syringe_Etomidate_5ml_10 { + items[] = {"kat_syringe_etomidate_5ml_30"}; + displayName = KATPUSHCSTRING(etomidate,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(etomidate,5ml,30); + }; + class syringe_Fentanyl_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_fentanyl); + items[] = {"kat_syringe_fentanyl_5ml_10"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,10); + }; + class syringe_Fentanyl_5ml_12: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_12"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,12); + }; + class syringe_Fentanyl_5ml_14: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_14"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,14); + }; + class syringe_Fentanyl_5ml_16: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_16"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,16); + }; + class syringe_Fentanyl_5ml_18: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_18"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,18); + }; + class syringe_Fentanyl_5ml_20: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_20"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,20); + }; + class syringe_Fentanyl_5ml_22: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_22"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,22); + }; + class syringe_Fentanyl_5ml_24: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_24"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,24); + }; + class syringe_Fentanyl_5ml_26: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_26"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,26); + }; + class syringe_Fentanyl_5ml_28: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_28"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,28); + }; + class syringe_Fentanyl_5ml_30: syringe_Fentanyl_5ml_10 { + items[] = {"kat_syringe_fentanyl_5ml_30"}; + displayName = KATPUSHCSTRING(fentanyl,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,5ml,30); + }; + class syringe_Fentanyl_10ml_10: syringe_TXA_10ml_10 { + medicRequired = QGVAR(medLvl_fentanylIM); + items[] = {"kat_syringe_fentanyl_10ml_10"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,10); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,10); + }; + class syringe_Fentanyl_10ml_12: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_12"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,12); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,12); + }; + class syringe_Fentanyl_10ml_14: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_14"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,14); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,14); + }; + class syringe_Fentanyl_10ml_16: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_16"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,16); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,16); + }; + class syringe_Fentanyl_10ml_18: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_18"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,18); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,18); + }; + class syringe_Fentanyl_10ml_20: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_20"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,20); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,20); + }; + class syringe_Fentanyl_10ml_22: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_22"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,22); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,22); + }; + class syringe_Fentanyl_10ml_24: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_24"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,24); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,24); + }; + class syringe_Fentanyl_10ml_26: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_26"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,26); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,26); + }; + class syringe_Fentanyl_10ml_28: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_28"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,28); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,28); + }; + class syringe_Fentanyl_10ml_30: syringe_Fentanyl_10ml_10 { + items[] = {"kat_syringe_fentanyl_10ml_30"}; + displayName = KATPUSHCSTRING(fentanyl,10ml,30); + displayNameProgress = KATPUSHINGCSTRING(fentanyl,10ml,30); + }; + class syringe_Flumazenil_5ml_10: syringe_EACA_5ml_10 { + category = "surgery"; + medicRequired = QGVAR(medLvl_flumazenil); + items[] = {"kat_syringe_flumazenil_5ml_10"}; + displayName = KATPUSHCSTRING(flumazenil,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(flumazenil,5ml,10); + }; + class syringe_Flumazenil_5ml_20: syringe_Flumazenil_5ml_10 { + items[] = {"kat_syringe_flumazenil_5ml_20"}; + displayName = KATPUSHCSTRING(flumazenil,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(flumazenil,5ml,20); + }; + class syringe_Flumazenil_5ml_30: syringe_Flumazenil_5ml_10 { + items[] = {"kat_syringe_flumazenil_5ml_30"}; + displayName = KATPUSHCSTRING(flumazenil,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(flumazenil,5ml,30); + }; + class syringe_Ketamine_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_ketamine); + items[] = {"kat_syringe_ketamine_5ml_10"}; + displayName = KATPUSHCSTRING(ketamine,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,16); + }; + class syringe_Ketamine_5ml_12: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_12"}; + displayName = KATPUSHCSTRING(ketamine,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,12); + }; + class syringe_Ketamine_5ml_14: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_14"}; + displayName = KATPUSHCSTRING(ketamine,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,14); + }; + class syringe_Ketamine_5ml_16: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_16"}; + displayName = KATPUSHCSTRING(ketamine,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,16); + }; + class syringe_Ketamine_5ml_18: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_18"}; + displayName = KATPUSHCSTRING(ketamine,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,18); + }; + class syringe_Ketamine_5ml_20: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_20"}; + displayName = KATPUSHCSTRING(ketamine,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,20); + }; + class syringe_Ketamine_5ml_22: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_22"}; + displayName = KATPUSHCSTRING(ketamine,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,22); + }; + class syringe_Ketamine_5ml_24: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_24"}; + displayName = KATPUSHCSTRING(ketamine,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,24); + }; + class syringe_Ketamine_5ml_26: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_26"}; + displayName = KATPUSHCSTRING(ketamine,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,26); + }; + class syringe_Ketamine_5ml_28: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_28"}; + displayName = KATPUSHCSTRING(ketamine,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,28); + }; + class syringe_Ketamine_5ml_30: syringe_Ketamine_5ml_10 { + items[] = {"kat_syringe_ketamine_5ml_30"}; + displayName = KATPUSHCSTRING(ketamine,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(ketamine,5ml,30); + }; + class syringe_Ketamine_10ml_10: syringe_TXA_10ml_10 { + medicRequired = QGVAR(medLvl_ketamineIM); + items[] = {"kat_syringe_ketamine_10ml_10"}; + displayName = KATPUSHCSTRING(ketamine,10ml,10); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,10); + }; + class syringe_Ketamine_10ml_12: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_12"}; + displayName = KATPUSHCSTRING(ketamine,10ml,12); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,12); + }; + class syringe_Ketamine_10ml_14: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_14"}; + displayName = KATPUSHCSTRING(ketamine,10ml,14); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,14); + }; + class syringe_Ketamine_10ml_16: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_16"}; + displayName = KATPUSHCSTRING(ketamine,10ml,16); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,16); + }; + class syringe_Ketamine_10ml_18: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_18"}; + displayName = KATPUSHCSTRING(ketamine,10ml,18); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,18); + }; + class syringe_Ketamine_10ml_20: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_20"}; + displayName = KATPUSHCSTRING(ketamine,10ml,20); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,20); + }; + class syringe_Ketamine_10ml_22: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_22"}; + displayName = KATPUSHCSTRING(ketamine,10ml,22); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,22); + }; + class syringe_Ketamine_10ml_24: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_24"}; + displayName = KATPUSHCSTRING(ketamine,10ml,24); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,24); + }; + class syringe_Ketamine_10ml_26: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_26"}; + displayName = KATPUSHCSTRING(ketamine,10ml,26); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,26); + }; + class syringe_Ketamine_10ml_28: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_28"}; + displayName = KATPUSHCSTRING(ketamine,10ml,28); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,28); + }; + class syringe_Ketamine_10ml_30: syringe_Ketamine_10ml_10 { + items[] = {"kat_syringe_ketamine_10ml_30"}; + displayName = KATPUSHCSTRING(ketamine,10ml,30); + displayNameProgress = KATPUSHINGCSTRING(ketamine,10ml,30); + }; + class syringe_Lidocaine_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_lidocaine); + items[] = {"kat_syringe_lidocaine_5ml_10"}; + displayName = KATPUSHCSTRING(lidocaine,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(lidocaine,5ml,10); + }; + class syringe_Lidocaine_5ml_12: syringe_Lidocaine_5ml_10 { + items[] = {"kat_syringe_lidocaine_5ml_12"}; + displayName = KATPUSHCSTRING(lidocaine,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(lidocaine,5ml,12); + }; + class syringe_Lidocaine_5ml_20: syringe_Lidocaine_5ml_10 { + items[] = {"kat_syringe_lidocaine_5ml_20"}; + displayName = KATPUSHCSTRING(lidocaine,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(lidocaine,5ml,20); + }; + class syringe_Lidocaine_5ml_30: syringe_Lidocaine_5ml_10 { + items[] = {"kat_syringe_lidocaine_5ml_30"}; + displayName = KATPUSHCSTRING(lidocaine,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(lidocaine,5ml,30); + }; + class syringe_Lidocaine_10ml_10: syringe_TXA_10ml_10 { + allowedSelections[] = {"Chest", "Body", "LeftArm", "RightArm", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg", "LeftLeg", "RightLeg"}; + medicRequired = QGVAR(medLvl_lidocaineIM); + items[] = {"kat_syringe_lidocaine_10ml_10"}; + displayName = KATPUSHCSTRING(lidocaine,10ml,10); + displayNameProgress = KATPUSHINGCSTRING(lidocaine,10ml,10); + }; + class syringe_Lorazepam_5ml_10: syringe_EACA_5ml_10 { + category = "surgery"; + medicRequired = QGVAR(medLvl_lorazepam); + items[] = {"kat_syringe_lorazepam_5ml_10"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,10); + }; + class syringe_Lorazepam_5ml_12: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_12"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,12); + }; + class syringe_Lorazepam_5ml_14: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_14"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,14); + }; + class syringe_Lorazepam_5ml_16: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_16"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,16); + }; + class syringe_Lorazepam_5ml_18: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_18"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,18); + }; + class syringe_Lorazepam_5ml_20: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_20"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,20); + }; + class syringe_Lorazepam_5ml_22: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_22"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,22); + }; + class syringe_Lorazepam_5ml_24: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_24"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,24); + }; + class syringe_Lorazepam_5ml_26: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_26"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,26); + }; + class syringe_Lorazepam_5ml_28: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_28"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,28); + }; + class syringe_Lorazepam_5ml_30: syringe_Lorazepam_5ml_10 { + items[] = {"kat_syringe_lorazepam_5ml_30"}; + displayName = KATPUSHCSTRING(lorazepam,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(lorazepam,5ml,30); + }; + class syringe_Metoprolol_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_metoprolol); + items[] = {"kat_syringe_metoprolol_5ml_10"}; + displayName = KATPUSHCSTRING(metoprolol,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(metoprolol,5ml,10); + }; + class syringe_Metoprolol_5ml_20: syringe_Metoprolol_5ml_10 { + items[] = {"kat_syringe_metoprolol_5ml_20"}; + displayName = KATPUSHCSTRING(metoprolol,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(metoprolol,5ml,20); + }; + class syringe_Metoprolol_5ml_30: syringe_Metoprolol_5ml_10 { + items[] = {"kat_syringe_metoprolol_5ml_30"}; + displayName = KATPUSHCSTRING(metoprolol,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(metoprolol,5ml,30); + }; + class syringe_MorphineIV_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_morphineIV); + items[] = {"kat_syringe_morphineIV_5ml_10"}; + displayName = KATPUSHCSTRING(morphineIV,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,5ml,10); + }; + class syringe_MorphineIV_5ml_16: syringe_MorphineIV_5ml_10 { + items[] = {"kat_syringe_morphineIV_5ml_16"}; + displayName = KATPUSHCSTRING(morphineIV,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,5ml,16); + }; + class syringe_MorphineIV_5ml_20: syringe_MorphineIV_5ml_10 { + items[] = {"kat_syringe_morphineIV_5ml_20"}; + displayName = KATPUSHCSTRING(morphineIV,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,5ml,20); + }; + class syringe_MorphineIV_5ml_26: syringe_MorphineIV_5ml_10 { + items[] = {"kat_syringe_morphineIV_5ml_26"}; + displayName = KATPUSHCSTRING(morphineIV,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,5ml,26); + }; + class syringe_MorphineIV_5ml_30: syringe_MorphineIV_5ml_10 { + items[] = {"kat_syringe_morphineIV_5ml_30"}; + displayName = KATPUSHCSTRING(morphineIV,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,5ml,30); + }; + class syringe_MorphineIV_10ml_10: syringe_TXA_10ml_10 { + medicRequired = QGVAR(medLvl_morphineIM); + items[] = {"kat_syringe_morphineIV_10ml_10"}; + displayName = KATPUSHCSTRING(morphineIV,10ml,10); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,10ml,10); + }; + class syringe_MorphineIV_10ml_16: syringe_MorphineIV_10ml_10 { + items[] = {"kat_syringe_morphineIV_10ml_16"}; + displayName = KATPUSHCSTRING(morphineIV,10ml,16); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,10ml,16); + }; + class syringe_MorphineIV_10ml_20: syringe_MorphineIV_10ml_10 { + items[] = {"kat_syringe_morphineIV_10ml_20"}; + displayName = KATPUSHCSTRING(morphineIV,10ml,20); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,10ml,20); + }; + class syringe_MorphineIV_10ml_26: syringe_MorphineIV_10ml_10 { + items[] = {"kat_syringe_morphineIV_10ml_26"}; + displayName = KATPUSHCSTRING(morphineIV,10ml,26); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,10ml,26); + }; + class syringe_MorphineIV_10ml_30: syringe_MorphineIV_10ml_10 { + items[] = {"kat_syringe_morphineIV_10ml_30"}; + displayName = KATPUSHCSTRING(morphineIV,10ml,30); + displayNameProgress = KATPUSHINGCSTRING(morphineIV,10ml,30); + }; + class syringe_Nalbuphine_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_nalbuphine); + items[] = {"kat_syringe_nalbuphine_5ml_10"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,10); + }; + class syringe_Nalbuphine_5ml_12: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_12"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,12); + }; + class syringe_Nalbuphine_5ml_14: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_14"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,14); + }; + class syringe_Nalbuphine_5ml_16: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_16"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,16); + }; + class syringe_Nalbuphine_5ml_18: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_18"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,18); + }; + class syringe_Nalbuphine_5ml_20: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_20"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,20); + }; + class syringe_Nalbuphine_5ml_22: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_22"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,22); + }; + class syringe_Nalbuphine_5ml_24: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_24"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,24); + }; + class syringe_Nalbuphine_5ml_26: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_26"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,26); + }; + class syringe_Nalbuphine_5ml_28: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_28"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,28); + }; + class syringe_Nalbuphine_5ml_30: syringe_Nalbuphine_5ml_10 { + items[] = {"kat_syringe_nalbuphine_5ml_30"}; + displayName = KATPUSHCSTRING(nalbuphine,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,5ml,30); + }; + class syringe_Nalbuphine_10ml_10: syringe_TXA_10ml_10 { + medicRequired = QGVAR(medLvl_nalbuphineIM); + items[] = {"kat_syringe_nalbuphine_10ml_10"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,10); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,10); + }; + class syringe_Nalbuphine_10ml_12: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_12"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,12); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,12); + }; + class syringe_Nalbuphine_10ml_14: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_14"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,14); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,14); + }; + class syringe_Nalbuphine_10ml_16: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_16"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,16); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,16); + }; + class syringe_Nalbuphine_10ml_18: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_18"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,18); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,18); + }; + class syringe_Nalbuphine_10ml_20: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_20"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,20); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,20); + }; + class syringe_Nalbuphine_10ml_22: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_22"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,22); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,22); + }; + class syringe_Nalbuphine_10ml_24: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_24"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,24); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,24); + }; + class syringe_Nalbuphine_10ml_26: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_26"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,26); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,26); + }; + class syringe_Nalbuphine_10ml_28: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_28"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,28); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,28); + }; + class syringe_Nalbuphine_10ml_30: syringe_Nalbuphine_10ml_10 { + items[] = {"kat_syringe_nalbuphine_10ml_30"}; + displayName = KATPUSHCSTRING(nalbuphine,10ml,30); + displayNameProgress = KATPUSHINGCSTRING(nalbuphine,10ml,30); + }; + class syringe_Ondansetron_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_ondansetron); + items[] = {"kat_syringe_ondansetron_5ml_10"}; + displayName = KATPUSHCSTRING(ondansetron,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(ondansetron,5ml,10); + }; + class syringe_Ondansetron_5ml_16: syringe_Ondansetron_5ml_10 { + items[] = {"kat_syringe_ondansetron_5ml_16"}; + displayName = KATPUSHCSTRING(ondansetron,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(ondansetron,5ml,16); + }; + class syringe_Ondansetron_5ml_20: syringe_Ondansetron_5ml_10 { + items[] = {"kat_syringe_ondansetron_5ml_20"}; + displayName = KATPUSHCSTRING(ondansetron,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(ondansetron,5ml,20); + }; + class syringe_Ondansetron_5ml_26: syringe_Ondansetron_5ml_10 { + items[] = {"kat_syringe_ondansetron_5ml_26"}; + displayName = KATPUSHCSTRING(ondansetron,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(ondansetron,5ml,26); + }; + class syringe_Ondansetron_5ml_30: syringe_Ondansetron_5ml_10 { + items[] = {"kat_syringe_ondansetron_5ml_30"}; + displayName = KATPUSHCSTRING(ondansetron,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(ondansetron,5ml,30); + }; + class syringe_Phenylephrine_5ml_10: syringe_EACA_5ml_10 { + displayName = KATPUSHCSTRING(phenylephrine,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(phenylephrine,5ml,10); + medicRequired = QGVAR(medLvl_phenylephrine); + items[] = {"kat_syringe_phenylephrine_5ml_10"}; + }; + class syringe_Phenylephrine_5ml_20: syringe_Phenylephrine_5ml_10 { + displayName = KATPUSHCSTRING(phenylephrine,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(phenylephrine,5ml,20); + items[] = {"kat_syringe_phenylephrine_5ml_20"}; + }; + class syringe_Phenylephrine_5ml_30: syringe_Phenylephrine_5ml_10 { + displayName = KATPUSHCSTRING(phenylephrine,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(phenylephrine,5ml,30); + items[] = {"kat_syringe_phenylephrine_5ml_30"}; + }; + class syringe_Rocuronium_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_rocuronium); + items[] = {"kat_syringe_rocuronium_5ml_10"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,10); + }; + class syringe_Rocuronium_5ml_12: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_12"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,12); + }; + class syringe_Rocuronium_5ml_14: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_14"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,14); + }; + class syringe_Rocuronium_5ml_16: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_16"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,16); + }; + class syringe_Rocuronium_5ml_18: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_18"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,18); + }; + class syringe_Rocuronium_5ml_20: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_20"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,20); + }; + class syringe_Rocuronium_5ml_22: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_22"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,22); + }; + class syringe_Rocuronium_5ml_24: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_24"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,24); + }; + class syringe_Rocuronium_5ml_26: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_26"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,26); + }; + class syringe_Rocuronium_5ml_28: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_28"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,28); + }; + class syringe_Rocuronium_5ml_30: syringe_Rocuronium_5ml_10 { + items[] = {"kat_syringe_rocuronium_5ml_30"}; + displayName = KATPUSHCSTRING(rocuronium,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(rocuronium,5ml,30); + }; + class syringe_Succinylcholine_5ml_10: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_succinylcholine); + items[] = {"kat_syringe_succinylcholine_5ml_10"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,10); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,10); + }; + class syringe_Succinylcholine_5ml_12: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_12"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,12); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,12); + }; + class syringe_Succinylcholine_5ml_14: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_14"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,14); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,14); + }; + class syringe_Succinylcholine_5ml_16: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_16"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,16); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,16); + }; + class syringe_Succinylcholine_5ml_18: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_18"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,18); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,18); + }; + class syringe_Succinylcholine_5ml_20: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_20"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,20); + }; + class syringe_Succinylcholine_5ml_22: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_22"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,22); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,22); + }; + class syringe_Succinylcholine_5ml_24: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_24"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,24); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,24); + }; + class syringe_Succinylcholine_5ml_26: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_26"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,26); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,26); + }; + class syringe_Succinylcholine_5ml_28: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_28"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,28); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,28); + }; + class syringe_Succinylcholine_5ml_30: syringe_Succinylcholine_5ml_10 { + items[] = {"kat_syringe_succinylcholine_5ml_30"}; + displayName = KATPUSHCSTRING(succinylcholine,5ml,30); + displayNameProgress = KATPUSHINGCSTRING(succinylcholine,5ml,30); + }; + class syringe_Sugammadex_5ml_20: syringe_EACA_5ml_10 { + medicRequired = QGVAR(medLvl_rocuronium); + items[] = {"kat_syringe_sugammadex_5ml_20"}; + displayName = KATPUSHCSTRING(sugammadex,5ml,20); + displayNameProgress = KATPUSHINGCSTRING(sugammadex,5ml,20); + }; + class CheckVein: CheckPulse { + displayName = CSTRING(CheckVein_DisplayName); + displayNameProgress = CSTRING(CheckVein_DisplayNameProgress); + allowedSelections[] = {"LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg"}; + treatmentLocations = 0; + medicRequired = QGVAR(CheckVein_MedLevel); + treatmentTime = QGVAR(CheckVein_TreatmentTime); + category = "examine"; + consumeItem = 0; + condition = ""; + callbackProgress = ""; + callbackStart = ""; + callbackFailure = ""; + callbackSuccess = QFUNC(treatmentAdvanced_CheckVein); + litter[] = {}; + }; + class RemoveSaline: RemoveIV { + displayName = CSTRING(RemoveSaline); + displayNameProgress = CSTRING(RemovingSalineIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'Saline')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'Saline')] call FUNC(removeIVBag)); + }; + class RemovePlasma: RemoveIV { + displayName = CSTRING(RemovePlasma); + displayNameProgress = CSTRING(RemovingPlasmaIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'Plasma')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'Plasma')] call FUNC(removeIVBag)); + }; + class RemoveBlood: RemoveIV { + displayName = CSTRING(RemoveBlood); + displayNameProgress = CSTRING(RemovingBloodIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'Blood')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'Blood')] call FUNC(removeIVBag)); + }; + class RemovePackedRBC: RemoveIV { + displayName = CSTRING(RemovePackedRBC); + displayNameProgress = CSTRING(RemovingPackedRBCIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'PackedRBC')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'PackedRBC')] call FUNC(removeIVBag)); + }; + class RemoveRingersLactate: RemoveIV { + displayName = CSTRING(RemoveRingersLactate); + displayNameProgress = CSTRING(RemovingRingersLactateIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'Ringers Lactate')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'Ringers Lactate')] call FUNC(removeIVBag)); + }; + class RemoveHextend: RemoveIV { + displayName = CSTRING(RemoveHextend); + displayNameProgress = CSTRING(RemovingHextendIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'Hextend')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'Hextend')] call FUNC(removeIVBag)); + }; + class RemoveHypertonicSaline: RemoveIV { + displayName = CSTRING(RemoveHypertonicSaline); + displayNameProgress = CSTRING(RemovingHypertonicSalineIV_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'Hypertonic Saline')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'Hypertonic Saline')] call FUNC(removeIVBag)); + }; + class RemoveFBTK: RemoveIV { + displayName = CSTRING(RemoveFBTK); + displayNameProgress = CSTRING(RemovingFBTK_Progress); + treatmentTime = QACEGVAR(medical_treatment,treatmentTimeIV); + consumeItem = 0; + condition = QUOTE([ARR_4(_player,_patient,_bodyPart,'FBTK')] call FUNC(ivBagCheck)); + callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'FBTK')] call FUNC(removeIVBag)); + }; + class ApplyFentPatch: Morphine { + displayName = CSTRING(Apply_FentPatch); + displayNameProgress = CSTRING(Applying_FentPatch); + medicRequired = QGVAR(medLvl_ApplyFentPatch); + treatmentTime = QGVAR(treatmentTime_ApplyFentPatch); + allowSelfTreatment = 1; + category = "medication"; + allowedSelections[] = {"Chest", "Neck", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg"}; + items[] = {"kat_fentPatch"}; + condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(treatmentAdvanced_FentanylPatchCheck))); + callbackSuccess = QFUNC(treatmentAdvanced_FentanylPatch); + sounds[] = {}; + }; + class RemoveFentPatch: ApplyFentPatch { + displayName = CSTRING(Remove_FentPatch); + displayNameProgress = CSTRING(Removing_FentPatch); + category = "medication"; + allowedSelections[] = {"Chest", "Neck", "LeftArm", "RightArm", "UpperLeftLeg", "UpperRightLeg", "UpperLeftArm", "UpperRightArm", "LeftLeg", "RightLeg"}; + treatmentTime = QGVAR(treatmentTime_ApplyFentPatch); + medicRequired = 0; + items[] = {}; + condition = QUOTE(([ARR_3(_player,_patient,_bodyPart)] call FUNC(treatmentAdvanced_FentanylPatchRemoveCheck))); + callbackSuccess = QFUNC(treatmentAdvanced_RemoveFentanylPatch); + sounds[] = {}; + }; }; diff --git a/addons/pharma/CfgFunctions.hpp b/addons/pharma/CfgFunctions.hpp index ab92d6775..0e95d25ee 100644 --- a/addons/pharma/CfgFunctions.hpp +++ b/addons/pharma/CfgFunctions.hpp @@ -17,6 +17,12 @@ class CfgFunctions { class tourniquetRemove { file = QPATHTOF(functions\fnc_tourniquetRemove.sqf); }; + class overDose { + file = QPATHTOF(functions\fnc_overDose.sqf); + }; + class onMedicationUsage { + file = QPATHTOF(functions\fnc_onMedicationUsage.sqf); + }; }; }; }; diff --git a/addons/pharma/CfgVehicles.hpp b/addons/pharma/CfgVehicles.hpp index 2d92d74fe..31a8dba0b 100644 --- a/addons/pharma/CfgVehicles.hpp +++ b/addons/pharma/CfgVehicles.hpp @@ -1,7 +1,6 @@ #define QQPATHTOF(var1) QUOTE(QPATHTOF(var1)) class CfgVehicles { - class Item_Base_F; class Items_base_F; class WeaponHolder_Single_limited_item_F; diff --git a/addons/pharma/CfgWeapons.hpp b/addons/pharma/CfgWeapons.hpp index 41f2237cf..3b6e25d04 100644 --- a/addons/pharma/CfgWeapons.hpp +++ b/addons/pharma/CfgWeapons.hpp @@ -13,6 +13,28 @@ class CfgWeapons { mass = 0.5; }; }; + class kat_IV_14: ACE_ItemCore { + scope = 2; + displayName = CSTRING(IV_14_Display); + picture = QPATHTOF(ui\icon_IV_16.paa); + model = QPATHTOF(models\iv\kat_iv.p3d); + descriptionShort = CSTRING(IV_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_IV_20: ACE_ItemCore { + scope = 2; + displayName = CSTRING(IV_20_Display); + picture = QPATHTOF(ui\icon_IV_20.paa); + model = QPATHTOF(models\iv\kat_iv.p3d); + descriptionShort = CSTRING(IV_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; class kat_IO_FAST: ACE_ItemCore { scope = 2; displayName = CSTRING(IO_45_Display); @@ -24,6 +46,61 @@ class CfgWeapons { mass = 0.5; }; }; + class kat_EZ_IO: ACE_ItemCore { + scope = 2; + displayName = CSTRING(EZ_IO_Display); + picture = QPATHTOF(ui\icon_ez_io.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(IO_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_EJV: ACE_ItemCore { + scope = 2; + displayName = CSTRING(EJV_Display); + picture = QPATHTOF(ui\icon_EJV.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(EJV_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2; + }; + }; + class kat_pressureBag: ACE_ItemCore { + scope = 2; + displayName = CSTRING(pressureBag_displayName); + picture = QPATHTOF(ui\pressureBag.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(pressureBag_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_10ml_syringe: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Syringe_10_Display); + picture = QPATHTOF(ui\syringe_item.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Syringe_10_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; + class kat_5ml_syringe: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Syringe_5_Display); + picture = QPATHTOF(ui\syringe_item.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Syringe_5_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + }; class kat_naloxone: ACE_ItemCore { scope = 2; displayName = CSTRING(Naloxone_Box_Display); @@ -43,7 +120,7 @@ class CfgWeapons { descriptionShort = CSTRING(EACA_DescShort); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0.2; + mass = 0.5; }; }; class kat_TXA: ACE_ItemCore { @@ -56,6 +133,17 @@ class CfgWeapons { class ItemInfo: CBA_MiscItem_ItemInfo { mass = 0.5; }; + }; + class kat_TXAAuto: ACE_ItemCore { + scope = 2; + displayName = CSTRING(TXAAuto_Box_Display); + picture = QPATHTOF(ui\icon_TXAAuto.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(TXA_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; }; class kat_norepinephrine: ACE_ItemCore { scope = 2; @@ -135,6 +223,17 @@ class CfgWeapons { mass = 0.5; }; }; + class kat_atropineIV: ACE_ItemCore { + scope = 2; + displayName = CSTRING(AtropineIV_Display); + picture = QPATHTOF(ui\icon_AtropineIV.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(AtropineIV_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; class kat_ketamine: ACE_ItemCore { scope = 2; displayName = CSTRING(Ketamine_Box_Display); @@ -168,7 +267,7 @@ class CfgWeapons { mass = 0.5; }; }; - class kat_lorazepam: ACE_ItemCore { + class kat_lorazepam: ACE_ItemCore { scope = 2; displayName = CSTRING(Lorazepam_displayName); picture = QPATHTOF(ui\icon_lorazepam.paa); @@ -176,7 +275,7 @@ class CfgWeapons { descriptionShort = CSTRING(Lorazepam_DescShort); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0.2; + mass = 0.5; }; }; class kat_flumazenil: ACE_ItemCore { @@ -187,7 +286,40 @@ class CfgWeapons { descriptionShort = CSTRING(Flumazenil_DescShort); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0.2; + mass = 0.5; + }; + }; + class kat_succinylcholine: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Succinylcholine_displayName); + picture = QPATHTOF(ui\icon_succinylcholine.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Succinylcholine_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_rocuronium: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Rocuronium_displayName); + picture = QPATHTOF(ui\icon_rocuronium.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Rocuronium_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_sugammadex: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Sugammadex_displayName); + picture = QPATHTOF(ui\icon_sugammadex.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Sugammadex_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; }; }; class kat_etomidate: ACE_ItemCore { @@ -198,7 +330,7 @@ class CfgWeapons { descriptionShort = CSTRING(Etomidate_DescShort); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0.2; + mass = 0.5; }; }; class kat_epinephrineIV: ACE_ItemCore { @@ -209,7 +341,62 @@ class CfgWeapons { descriptionShort = CSTRING(EpinephrineIV_DescShort); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0.2; + mass = 0.5; + }; + }; + class kat_morphineIV: ACE_ItemCore { + scope = 2; + displayName = CSTRING(MorphineIV_displayName); + picture = QPATHTOF(ui\icon_MorphineIV.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(MorphineIV_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_ondansetron: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Ondansetron_displayName); + picture = QPATHTOF(ui\icon_Ondansetron.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Ondansetron_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_adenosineIV: ACE_ItemCore { + scope = 2; + displayName = CSTRING(AdenosineIV_displayName); + picture = QPATHTOF(ui\icon_AdenosineIV.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(AdenosineIV_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_alteplase: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Alteplase_Display); + picture = QPATHTOF(ui\icon_Alteplase.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Alteplase_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_doxapram: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Doxapram_Display); + picture = QPATHTOF(ui\icon_Doxapram.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Doxapram_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; }; }; class kat_coag_sense: ACE_ItemCore { @@ -220,7 +407,583 @@ class CfgWeapons { descriptionShort = CSTRING(Coag_Sense_Display_DESC); ACE_isMedicalItem = 1; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; + mass = 15; }; }; + class kat_fentPatch: ACE_ItemCore { + scope = 2; + displayName = CSTRING(fentpatch_MEDdisplay); + picture = QPATHTOF(ui\icon_fentPatch.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = ""; + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.25; + }; + }; + class kat_syringe_txa_10ml_10: ACE_ItemCore { + scope = 1; + displayName = KATDISPLAYCSTRING(txa,10ml,10); + picture = QPATHTOF(ui\syringe_item.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = ""; + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.75; + }; + }; + class kat_syringe_txa_10ml_20: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(txa,10ml,20); + }; + class kat_syringe_morphineIV_10ml_10: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,10ml,10); + }; + class kat_syringe_morphineIV_10ml_16: kat_syringe_morphineIV_10ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,10ml,16); + }; + class kat_syringe_morphineIV_10ml_20: kat_syringe_morphineIV_10ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,10ml,20); + }; + class kat_syringe_morphineIV_10ml_26: kat_syringe_morphineIV_10ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,10ml,26); + }; + class kat_syringe_morphineIV_10ml_30: kat_syringe_morphineIV_10ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,10ml,30); + }; + class kat_syringe_lidocaine_10ml_10: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(lidocaine,10ml,10); + }; + class kat_syringe_ketamine_10ml_10: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,10); + }; + class kat_syringe_ketamine_10ml_12: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,12); + }; + class kat_syringe_ketamine_10ml_14: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,14); + }; + class kat_syringe_ketamine_10ml_16: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,16); + }; + class kat_syringe_ketamine_10ml_18: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,18); + }; + class kat_syringe_ketamine_10ml_20: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,20); + }; + class kat_syringe_ketamine_10ml_22: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,22); + }; + class kat_syringe_ketamine_10ml_24: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,24); + }; + class kat_syringe_ketamine_10ml_26: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,26); + }; + class kat_syringe_ketamine_10ml_28: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,28); + }; + class kat_syringe_ketamine_10ml_30: kat_syringe_ketamine_10ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,10ml,30); + }; + class kat_syringe_fentanyl_10ml_10: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,10); + }; + class kat_syringe_fentanyl_10ml_12: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,12); + }; + class kat_syringe_fentanyl_10ml_14: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,14); + }; + class kat_syringe_fentanyl_10ml_16: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,16); + }; + class kat_syringe_fentanyl_10ml_18: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,18); + }; + class kat_syringe_fentanyl_10ml_20: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,20); + }; + class kat_syringe_fentanyl_10ml_22: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,22); + }; + class kat_syringe_fentanyl_10ml_24: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,24); + }; + class kat_syringe_fentanyl_10ml_26: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,26); + }; + class kat_syringe_fentanyl_10ml_28: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,28); + }; + class kat_syringe_fentanyl_10ml_30: kat_syringe_fentanyl_10ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,10ml,30); + }; + class kat_syringe_nalbuphine_10ml_10: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,10); + }; + class kat_syringe_nalbuphine_10ml_12: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,12); + }; + class kat_syringe_nalbuphine_10ml_14: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,14); + }; + class kat_syringe_nalbuphine_10ml_16: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,16); + }; + class kat_syringe_nalbuphine_10ml_18: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,18); + }; + class kat_syringe_nalbuphine_10ml_20: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,20); + }; + class kat_syringe_nalbuphine_10ml_22: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,22); + }; + class kat_syringe_nalbuphine_10ml_24: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,24); + }; + class kat_syringe_nalbuphine_10ml_26: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,26); + }; + class kat_syringe_nalbuphine_10ml_28: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,28); + }; + class kat_syringe_nalbuphine_10ml_30: kat_syringe_nalbuphine_10ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,10ml,30); + }; + class kat_syringe_txa_5ml_10: kat_syringe_txa_10ml_10 { + displayName = KATDISPLAYCSTRING(txa,5ml,10); + }; + class kat_syringe_txa_5ml_20: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(txa,5ml,20); + }; + class kat_syringe_eaca_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(eaca,5ml,10); + }; + class kat_syringe_eaca_5ml_20: kat_syringe_eaca_5ml_10 { + displayName = KATDISPLAYCSTRING(eaca,5ml,20); + }; + class kat_syringe_phenylephrine_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(phenylephrine,5ml,10); + }; + class kat_syringe_phenylephrine_5ml_20: kat_syringe_phenylephrine_5ml_10 { + displayName = KATDISPLAYCSTRING(phenylephrine,5ml,20); + }; + class kat_syringe_phenylephrine_5ml_30: kat_syringe_phenylephrine_5ml_10 { + displayName = KATDISPLAYCSTRING(phenylephrine,5ml,30); + }; + class kat_syringe_amiodarone_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(amiodarone,5ml,10); + }; + class kat_syringe_amiodarone_5ml_20: kat_syringe_amiodarone_5ml_10 { + displayName = KATDISPLAYCSTRING(amiodarone,5ml,20); + }; + class kat_syringe_amiodarone_5ml_30: kat_syringe_amiodarone_5ml_10 { + displayName = KATDISPLAYCSTRING(amiodarone,5ml,30); + }; + class kat_syringe_alteplase_5ml_30: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(alteplase,5ml,30); + }; + class kat_syringe_epinephrineIV_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(epinephrineIV,5ml,10); + }; + class kat_syringe_epinephrineIV_5ml_20: kat_syringe_epinephrineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(epinephrineIV,5ml,20); + }; + class kat_syringe_lidocaine_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(lidocaine,5ml,10); + }; + class kat_syringe_lidocaine_5ml_12: kat_syringe_lidocaine_5ml_10 { + displayName = KATDISPLAYCSTRING(lidocaine,5ml,12); + }; + class kat_syringe_lidocaine_5ml_20: kat_syringe_lidocaine_5ml_10 { + displayName = KATDISPLAYCSTRING(lidocaine,5ml,20); + }; + class kat_syringe_lidocaine_5ml_30: kat_syringe_lidocaine_5ml_10 { + displayName = KATDISPLAYCSTRING(lidocaine,5ml,30); + }; + class kat_syringe_ketamine_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,10); + }; + class kat_syringe_ketamine_5ml_12: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,12); + }; + class kat_syringe_ketamine_5ml_14: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,14); + }; + class kat_syringe_ketamine_5ml_16: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,16); + }; + class kat_syringe_ketamine_5ml_18: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,18); + }; + class kat_syringe_ketamine_5ml_20: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,20); + }; + class kat_syringe_ketamine_5ml_22: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,22); + }; + class kat_syringe_ketamine_5ml_24: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,24); + }; + class kat_syringe_ketamine_5ml_26: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,26); + }; + class kat_syringe_ketamine_5ml_28: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,28); + }; + class kat_syringe_ketamine_5ml_30: kat_syringe_ketamine_5ml_10 { + displayName = KATDISPLAYCSTRING(ketamine,5ml,30); + }; + class kat_syringe_fentanyl_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,10); + }; + class kat_syringe_fentanyl_5ml_12: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,12); + }; + class kat_syringe_fentanyl_5ml_14: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,14); + }; + class kat_syringe_fentanyl_5ml_16: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,16); + }; + class kat_syringe_fentanyl_5ml_18: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,18); + }; + class kat_syringe_fentanyl_5ml_20: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,20); + }; + class kat_syringe_fentanyl_5ml_22: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,22); + }; + class kat_syringe_fentanyl_5ml_24: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,24); + }; + class kat_syringe_fentanyl_5ml_26: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,26); + }; + class kat_syringe_fentanyl_5ml_28: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,28); + }; + class kat_syringe_fentanyl_5ml_30: kat_syringe_fentanyl_5ml_10 { + displayName = KATDISPLAYCSTRING(fentanyl,5ml,30); + }; + class kat_syringe_nalbuphine_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,10); + }; + class kat_syringe_nalbuphine_5ml_12: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,12); + }; + class kat_syringe_nalbuphine_5ml_14: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,14); + }; + class kat_syringe_nalbuphine_5ml_16: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,16); + }; + class kat_syringe_nalbuphine_5ml_18: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,18); + }; + class kat_syringe_nalbuphine_5ml_20: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,20); + }; + class kat_syringe_nalbuphine_5ml_22: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,22); + }; + class kat_syringe_nalbuphine_5ml_24: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,24); + }; + class kat_syringe_nalbuphine_5ml_26: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,26); + }; + class kat_syringe_nalbuphine_5ml_28: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,28); + }; + class kat_syringe_nalbuphine_5ml_30: kat_syringe_nalbuphine_5ml_10 { + displayName = KATDISPLAYCSTRING(nalbuphine,5ml,30); + }; + class kat_syringe_lorazepam_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,10); + }; + class kat_syringe_lorazepam_5ml_12: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,12); + }; + class kat_syringe_lorazepam_5ml_14: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,14); + }; + class kat_syringe_lorazepam_5ml_16: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,16); + }; + class kat_syringe_lorazepam_5ml_18: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,18); + }; + class kat_syringe_lorazepam_5ml_20: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,20); + }; + class kat_syringe_lorazepam_5ml_22: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,22); + }; + class kat_syringe_lorazepam_5ml_24: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,24); + }; + class kat_syringe_lorazepam_5ml_26: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,26); + }; + class kat_syringe_lorazepam_5ml_28: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,28); + }; + class kat_syringe_lorazepam_5ml_30: kat_syringe_lorazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(lorazepam,5ml,30); + }; + class kat_syringe_flumazenil_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(flumazenil,5ml,10); + }; + class kat_syringe_flumazenil_5ml_20: kat_syringe_flumazenil_5ml_10 { + displayName = KATDISPLAYCSTRING(flumazenil,5ml,20); + }; + class kat_syringe_flumazenil_5ml_30: kat_syringe_flumazenil_5ml_10 { + displayName = KATDISPLAYCSTRING(flumazenil,5ml,30); + }; + class kat_syringe_etomidate_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,10); + }; + class kat_syringe_etomidate_5ml_12: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,12); + }; + class kat_syringe_etomidate_5ml_14: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,14); + }; + class kat_syringe_etomidate_5ml_16: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,16); + }; + class kat_syringe_etomidate_5ml_18: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,18); + }; + class kat_syringe_etomidate_5ml_20: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,20); + }; + class kat_syringe_etomidate_5ml_22: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,22); + }; + class kat_syringe_etomidate_5ml_24: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,24); + }; + class kat_syringe_etomidate_5ml_26: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,26); + }; + class kat_syringe_etomidate_5ml_28: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,28); + }; + class kat_syringe_etomidate_5ml_30: kat_syringe_etomidate_5ml_10 { + displayName = KATDISPLAYCSTRING(etomidate,5ml,30); + }; + class kat_syringe_ondansetron_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(ondansetron,5ml,10); + }; + class kat_syringe_ondansetron_5ml_16: kat_syringe_ondansetron_5ml_10 { + displayName = KATDISPLAYCSTRING(ondansetron,5ml,16); + }; + class kat_syringe_ondansetron_5ml_20: kat_syringe_ondansetron_5ml_10 { + displayName = KATDISPLAYCSTRING(ondansetron,5ml,20); + }; + class kat_syringe_ondansetron_5ml_26: kat_syringe_ondansetron_5ml_10 { + displayName = KATDISPLAYCSTRING(ondansetron,5ml,26); + }; + class kat_syringe_ondansetron_5ml_30: kat_syringe_ondansetron_5ml_10 { + displayName = KATDISPLAYCSTRING(ondansetron,5ml,30); + }; + class kat_syringe_morphineIV_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,5ml,10); + }; + class kat_syringe_morphineIV_5ml_16: kat_syringe_morphineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,5ml,16); + }; + class kat_syringe_morphineIV_5ml_20: kat_syringe_morphineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,5ml,20); + }; + class kat_syringe_morphineIV_5ml_26: kat_syringe_morphineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,5ml,26); + }; + class kat_syringe_morphineIV_5ml_30: kat_syringe_morphineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(morphineIV,5ml,30); + }; + class kat_syringe_atropineIV_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(atropineIV,5ml,10); + }; + class kat_syringe_atropineIV_5ml_30: kat_syringe_atropineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(atropineIV,5ml,30); + }; + class kat_syringe_adenosineIV_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(adenosineIV,5ml,10); + }; + class kat_syringe_adenosineIV_5ml_20: kat_syringe_adenosineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(adenosineIV,5ml,20); + }; + class kat_syringe_adenosineIV_5ml_30: kat_syringe_adenosineIV_5ml_10 { + displayName = KATDISPLAYCSTRING(adenosineIV,5ml,30); + }; + class kat_syringe_salineIV_5ml_30: kat_syringe_txa_5ml_10 { + displayName = CSTRING(Syringe_SalineFlush_Display); + descriptionShort = CSTRING(Syringe_SalineFlush_DescShort); + }; + class kat_syringe_doxapram_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(doxapram,5ml,10); + }; + class kat_syringe_doxapram_5ml_20: kat_syringe_doxapram_5ml_10 { + displayName = KATDISPLAYCSTRING(doxapram,5ml,20); + }; + class kat_syringe_doxapram_5ml_30: kat_syringe_doxapram_5ml_10 { + displayName = KATDISPLAYCSTRING(doxapram,5ml,30); + }; + class kat_syringe_succinylcholine_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,10); + }; + class kat_syringe_succinylcholine_5ml_12: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,12); + }; + class kat_syringe_succinylcholine_5ml_14: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,14); + }; + class kat_syringe_succinylcholine_5ml_16: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,16); + }; + class kat_syringe_succinylcholine_5ml_18: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,18); + }; + class kat_syringe_succinylcholine_5ml_20: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,20); + }; + class kat_syringe_succinylcholine_5ml_22: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,22); + }; + class kat_syringe_succinylcholine_5ml_24: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,24); + }; + class kat_syringe_succinylcholine_5ml_26: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,26); + }; + class kat_syringe_succinylcholine_5ml_28: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,28); + }; + class kat_syringe_succinylcholine_5ml_30: kat_syringe_succinylcholine_5ml_10 { + displayName = KATDISPLAYCSTRING(succinylcholine,5ml,30); + }; + class kat_syringe_rocuronium_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,10); + }; + class kat_syringe_rocuronium_5ml_12: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,12); + }; + class kat_syringe_rocuronium_5ml_14: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,14); + }; + class kat_syringe_rocuronium_5ml_16: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,16); + }; + class kat_syringe_rocuronium_5ml_18: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,18); + }; + class kat_syringe_rocuronium_5ml_20: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,20); + }; + class kat_syringe_rocuronium_5ml_22: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,22); + }; + class kat_syringe_rocuronium_5ml_24: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,24); + }; + class kat_syringe_rocuronium_5ml_26: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,26); + }; + class kat_syringe_rocuronium_5ml_28: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,28); + }; + class kat_syringe_rocuronium_5ml_30: kat_syringe_rocuronium_5ml_10 { + displayName = KATDISPLAYCSTRING(rocuronium,5ml,30); + }; + class kat_syringe_sugammadex_5ml_20: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(sugammadex,5ml,20); + }; + class kat_syringe_metoprolol_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(metoprolol,5ml,10); + }; + class kat_syringe_metoprolol_5ml_20: kat_syringe_metoprolol_5ml_10 { + displayName = KATDISPLAYCSTRING(metoprolol,5ml,20); + }; + class kat_syringe_metoprolol_5ml_30: kat_syringe_metoprolol_5ml_10 { + displayName = KATDISPLAYCSTRING(metoprolol,5ml,30); + }; + class kat_syringe_diazepam_5ml_10: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(diazepam,5ml,10); + }; + class kat_syringe_diazepam_5ml_20: kat_syringe_diazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(diazepam,5ml,20); + }; + class kat_syringe_diazepam_5ml_30: kat_syringe_diazepam_5ml_10 { + displayName = KATDISPLAYCSTRING(diazepam,5ml,30); + }; + class kat_diazepam: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Diazepam_Box_Display); + picture = QPATHTOF(ui\icon_Diazepam.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Diazepam_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_metoprolol: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Metoprolol_Box_Display); + picture = QPATHTOF(ui\icon_Metoprolol.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Metoprolol_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_calciumGluconate: ACE_ItemCore { + scope = 2; + displayName = CSTRING(CalciumGluconate_Box_Display); + picture = QPATHTOF(ui\icon_CalciumGluconate.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(CalciumGluconate_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_calciumChloride: ACE_ItemCore { + scope = 2; + displayName = CSTRING(CalciumChloride_Box_Display); + picture = QPATHTOF(ui\icon_CalciumChloride.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(CalciumChloride_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_bicarbonate: ACE_ItemCore { + scope = 2; + displayName = CSTRING(Bicarbonate_Box_Display); + picture = QPATHTOF(ui\icon_Bicarbonate.paa); + model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; + descriptionShort = CSTRING(Bicarbonate_DescShort); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; + class kat_syringe_bicarbonate_5ml_20: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(bicarbonate,5ml,20); + }; + class kat_syringe_calciumChloride_5ml_20: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(calciumChloride,5ml,20); + }; + class kat_syringe_calciumGluconate_5ml_20: kat_syringe_txa_5ml_10 { + displayName = KATDISPLAYCSTRING(calciumGluconate,5ml,20); + }; }; diff --git a/addons/pharma/XEH_PREP.hpp b/addons/pharma/XEH_PREP.hpp index a0f554582..3c26209ec 100644 --- a/addons/pharma/XEH_PREP.hpp +++ b/addons/pharma/XEH_PREP.hpp @@ -1,47 +1,117 @@ +PREP(AMSCheck); PREP(applyIV); PREP(checkIV); +PREP(checkIVType); PREP(clotWound); PREP(coagRegen); -PREP(fluid); -PREP(fluidLocal); PREP(fullHealLocal); +PREP(generateMedicationEffectivness); PREP(getBloodVolumeChange); PREP(gui_updateBodyImage); PREP(gui_updateInjuryListPart); +PREP(handleIVComplications); +PREP(handleLimbIVComplications); PREP(handleRespawn); +PREP(hasIVbag); PREP(init); PREP(inspectCatheter); +PREP(ivBagCheck); +PREP(ivCondition); PREP(medication); PREP(medicationLocal); +PREP(occlusionCheck); +PREP(onMedicationUsage); +PREP(overDose); PREP(pervitinPP); +PREP(prepareInfusion); +PREP(prepareSyringe); PREP(removeIV); +PREP(removeIVBag); +PREP(removeIVCheck); +PREP(removePressure); PREP(retrieveIV); PREP(salineCheck); PREP(tourniquetRemove); +PREP(treatmentAdvanced_AdenosineLocal); +PREP(treatmentAdvanced_AdenosineOverdoseLocal); +PREP(treatmentAdvanced_AlteplaseLocal); +PREP(treatmentAdvanced_AlteplaseOverdoseLocal); PREP(treatmentAdvanced_AmiodaroneLocal); +PREP(treatmentAdvanced_AmiodaroneOverdoseLocal); +PREP(treatmentAdvanced_ApplyPressureBag); +PREP(treatmentAdvanced_ApplyPressureBagLocal); PREP(treatmentAdvanced_AtropineLocal); +PREP(treatmentAdvanced_AtropineOverdoseLocal); +PREP(treatmentAdvanced_BicarbonateOverdoseLocal); +PREP(treatmentAdvanced_CWMP); +PREP(treatmentAdvanced_CWMPOverdoseLocal); PREP(treatmentAdvanced_Caffeine); PREP(treatmentAdvanced_CaffeineLocal); +PREP(treatmentAdvanced_CaffeineOverdoseLocal); +PREP(treatmentAdvanced_CalciumChlorideOverdoseLocal); +PREP(treatmentAdvanced_CalciumGluconateOverdoseLocal); PREP(treatmentAdvanced_Carbonate); PREP(treatmentAdvanced_CarbonateLocal); +PREP(treatmentAdvanced_CarbonateOverdoseLocal); PREP(treatmentAdvanced_CheckCoag); -PREP(treatmentAdvanced_CWMP); +PREP(treatmentAdvanced_CheckVein); PREP(treatmentAdvanced_Dialysis); PREP(treatmentAdvanced_DialysisLocal); +PREP(treatmentAdvanced_DiazepamOverdoseLocal); +PREP(treatmentAdvanced_DoxapramOverdoseLocal); PREP(treatmentAdvanced_EACALocal); +PREP(treatmentAdvanced_EACAOverdoseLocal); +PREP(treatmentAdvanced_EpinephrineOverdoseLocal); +PREP(treatmentAdvanced_EtomidateLocal); +PREP(treatmentAdvanced_EtomidateOverdoseLocal); PREP(treatmentAdvanced_FentanylLocal); +PREP(treatmentAdvanced_FentanylOverdoseLocal); +PREP(treatmentAdvanced_FentanylPatch); +PREP(treatmentAdvanced_FentanylPatchCheck); +PREP(treatmentAdvanced_FentanylPatchLocal); +PREP(treatmentAdvanced_FentanylPatchRemoveCheck); PREP(treatmentAdvanced_FlumazenilLocal); +PREP(treatmentAdvanced_FlumazenilOverdoseLocal); PREP(treatmentAdvanced_Flush); PREP(treatmentAdvanced_FlushLocal); +PREP(treatmentAdvanced_KetamineLocal); +PREP(treatmentAdvanced_KetamineOverdoseLocal); +PREP(treatmentAdvanced_LidocaineLocal); +PREP(treatmentAdvanced_LidocaineOverdoseLocal); PREP(treatmentAdvanced_LorazepamLocal); +PREP(treatmentAdvanced_LorazepamOverdoseLocal); +PREP(treatmentAdvanced_ManualBagPressure); +PREP(treatmentAdvanced_MetoprololOverdoseLocal); PREP(treatmentAdvanced_MorphineLocal); +PREP(treatmentAdvanced_MorphineOverdoseLocal); PREP(treatmentAdvanced_NalbuphineLocal); +PREP(treatmentAdvanced_NalbuphineOverdoseLocal); PREP(treatmentAdvanced_Naloxone); PREP(treatmentAdvanced_NaloxoneLocal); +PREP(treatmentAdvanced_NaloxoneOverdoseLocal); +PREP(treatmentAdvanced_NitroglycerinOverdoseLocal); +PREP(treatmentAdvanced_NorepinephrineLocal); +PREP(treatmentAdvanced_NorepinephrineOverdoseLocal); +PREP(treatmentAdvanced_OndansetronOverdoseLocal); PREP(treatmentAdvanced_Penthrox); +PREP(treatmentAdvanced_PenthroxOverdoseLocal); PREP(treatmentAdvanced_Pervitin); PREP(treatmentAdvanced_PervitinLocal); +PREP(treatmentAdvanced_PervitinOverdoseLocal); +PREP(treatmentAdvanced_PhenylephrineOverdoseLocal); +PREP(treatmentAdvanced_RemoveFentanylPatch); +PREP(treatmentAdvanced_RemoveFentanylPatchLocal); +PREP(treatmentAdvanced_RemovePressureBag); +PREP(treatmentAdvanced_RemovePressureBagLocal); PREP(treatmentAdvanced_Reorientation); PREP(treatmentAdvanced_ReorientationLocal); +PREP(treatmentAdvanced_RocuroniumLocal); +PREP(treatmentAdvanced_RocuroniumOverdoseLocal); +PREP(treatmentAdvanced_SuccinylcholineLocal); +PREP(treatmentAdvanced_SuccinylcholineOverdoseLocal); +PREP(treatmentAdvanced_SugammadexLocal); +PREP(treatmentAdvanced_SugammadexOverdoseLocal); +PREP(treatmentAdvanced_TXAAutoLocal); PREP(treatmentAdvanced_TXALocal); +PREP(treatmentAdvanced_TXAOverdoseLocal); PREP(vehicleCheckDialysis); \ No newline at end of file diff --git a/addons/pharma/XEH_postInit.sqf b/addons/pharma/XEH_postInit.sqf index c381530a0..cc53c3b3f 100644 --- a/addons/pharma/XEH_postInit.sqf +++ b/addons/pharma/XEH_postInit.sqf @@ -2,33 +2,74 @@ [QGVAR(carbonateLocal), LINKFUNC(treatmentAdvanced_CarbonateLocal)] call CBA_fnc_addEventHandler; [QGVAR(naloxoneLocal), LINKFUNC(treatmentAdvanced_NaloxoneLocal)] call CBA_fnc_addEventHandler; +[QGVAR(alteplaseLocal), LINKFUNC(treatmentAdvanced_AlteplaseLocal)] call CBA_fnc_addEventHandler; [QGVAR(atropineLocal), LINKFUNC(treatmentAdvanced_AtropineLocal)] call CBA_fnc_addEventHandler; +[QGVAR(adenosineLocal), LINKFUNC(treatmentAdvanced_AdenosineLocal)] call CBA_fnc_addEventHandler; [QGVAR(amiodaroneLocal), LINKFUNC(treatmentAdvanced_AmiodaroneLocal)] call CBA_fnc_addEventHandler; [QGVAR(txaLocal), LINKFUNC(treatmentAdvanced_TXALocal)] call CBA_fnc_addEventHandler; +[QGVAR(txaautoLocal), LINKFUNC(treatmentAdvanced_TXAAutoLocal)] call CBA_fnc_addEventHandler; [QGVAR(reorientationLocal), LINKFUNC(treatmentAdvanced_ReorientationLocal)] call CBA_fnc_addEventHandler; [QGVAR(medicationLocal), LINKFUNC(medicationLocal)] call CBA_fnc_addEventHandler; [QGVAR(eacaLocal), LINKFUNC(treatmentAdvanced_EACALocal)] call CBA_fnc_addEventHandler; +[QGVAR(etomidateLocal), LINKFUNC(treatmentAdvanced_EtomidateLocal)] call CBA_fnc_addEventHandler; [QGVAR(dialysisLocal), LINKFUNC(treatmentAdvanced_DialysisLocal)] call CBA_fnc_addEventHandler; [QGVAR(flumazenilLocal), LINKFUNC(treatmentAdvanced_FlumazenilLocal)] call CBA_fnc_addEventHandler; [QGVAR(lorazepamLocal), LINKFUNC(treatmentAdvanced_LorazepamLocal)] call CBA_fnc_addEventHandler; -[QGVAR(fluidLocal), LINKFUNC(fluidLocal)] call CBA_fnc_addEventHandler; [QGVAR(flushLocal), LINKFUNC(treatmentAdvanced_FlushLocal)] call CBA_fnc_addEventHandler; [QGVAR(pervitinLocal), LINKFUNC(treatmentAdvanced_PervitinLocal)] call CBA_fnc_addEventHandler; [QGVAR(pervitinPP), LINKFUNC(pervitinPP)] call CBA_fnc_addEventHandler; +[QGVAR(ketamineLocal), LINKFUNC(treatmentAdvanced_KetamineLocal)] call CBA_fnc_addEventHandler; +[QGVAR(morphineLocal), LINKFUNC(treatmentAdvanced_MorphineLocal)] call CBA_fnc_addEventHandler; +[QGVAR(nalbuphineLocal), LINKFUNC(treatmentAdvanced_NalbuphineLocal)] call CBA_fnc_addEventHandler; [QGVAR(fentanylLocal), LINKFUNC(treatmentAdvanced_FentanylLocal)] call CBA_fnc_addEventHandler; [QGVAR(caffeineLocal), LINKFUNC(treatmentAdvanced_CaffeineLocal)] call CBA_fnc_addEventHandler; +[QGVAR(lidocaineLocal), LINKFUNC(treatmentAdvanced_LidocaineLocal)] call CBA_fnc_addEventHandler; +[QGVAR(succinylcholineLocal), LINKFUNC(treatmentAdvanced_SuccinylcholineLocal)] call CBA_fnc_addEventHandler; +[QGVAR(rocuroniumLocal), LINKFUNC(treatmentAdvanced_RocuroniumLocal)] call CBA_fnc_addEventHandler; +[QGVAR(sugammadexLocal), LINKFUNC(treatmentAdvanced_SugammadexLocal)] call CBA_fnc_addEventHandler; -["kat_fluid", LINKFUNC(fluid)] call CBA_fnc_addEventHandler; +[QGVAR(fentanylPatchLocal), LINKFUNC(treatmentAdvanced_FentanylPatchLocal)] call CBA_fnc_addEventHandler; +[QGVAR(removeFentanylPatchLocal), LINKFUNC(treatmentAdvanced_RemoveFentanylPatchLocal)] call CBA_fnc_addEventHandler; +[QGVAR(adenosineOverdoseLocal), LINKFUNC(treatmentAdvanced_AdenosineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(alteplaseOverdoseLocal), LINKFUNC(treatmentAdvanced_AlteplaseOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(amiodaroneOverdoseLocal), LINKFUNC(treatmentAdvanced_AmiodaroneOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(atropineOverdoseLocal), LINKFUNC(treatmentAdvanced_AtropineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(caffeineOverdoseLocal), LINKFUNC(treatmentAdvanced_CaffeineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(carbonateOverdoseLocal), LINKFUNC(treatmentAdvanced_CarbonateOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(cwmpOverdoseLocal), LINKFUNC(treatmentAdvanced_CWMPOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(doxapramOverdoseLocal), LINKFUNC(treatmentAdvanced_DoxapramOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(diazepamOverdoseLocal), LINKFUNC(treatmentAdvanced_DiazepamOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(metoprololOverdoseLocal), LINKFUNC(treatmentAdvanced_MetoprololOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(eacaOverdoseLocal), LINKFUNC(treatmentAdvanced_EACAOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(epinephrineOverdoseLocal), LINKFUNC(treatmentAdvanced_EpinephrineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(etomidateOverdoseLocal), LINKFUNC(treatmentAdvanced_EtomidateOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(fentanylOverdoseLocal), LINKFUNC(treatmentAdvanced_FentanylOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(flumazenilOverdoseLocal), LINKFUNC(treatmentAdvanced_FlumazenilOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(ketamineOverdoseLocal), LINKFUNC(treatmentAdvanced_KetamineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(lidocaineOverdoseLocal), LINKFUNC(treatmentAdvanced_LidocaineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(lorazepamOverdoseLocal), LINKFUNC(treatmentAdvanced_LorazepamOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(morphineOverdoseLocal), LINKFUNC(treatmentAdvanced_MorphineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(naloxoneOverdoseLocal), LINKFUNC(treatmentAdvanced_NaloxoneOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(nalbuphineOverdoseLocal), LINKFUNC(treatmentAdvanced_NalbuphineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(nitroglycerinOverdoseLocal), LINKFUNC(treatmentAdvanced_NitroglycerinOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(norepinephrineOverdoseLocal), LINKFUNC(treatmentAdvanced_NorepinephrineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(penthroxOverdoseLocal), LINKFUNC(treatmentAdvanced_PenthroxOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(phenylephrineOverdoseLocal), LINKFUNC(treatmentAdvanced_PhenylephrineOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(pervitinOverdoseLocal), LINKFUNC(treatmentAdvanced_PervitinOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(txaOverdoseLocal), LINKFUNC(treatmentAdvanced_TXAOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(bicarbonateOverdoseLocal), LINKFUNC(treatmentAdvanced_bicarbonateOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(calciumChlorideOverdoseLocal), LINKFUNC(treatmentAdvanced_CalciumChlorideOverdoseLocal)] call CBA_fnc_addEventHandler; +[QGVAR(calciumGluconateOverdoseLocal), LINKFUNC(treatmentAdvanced_CalciumGluconateOverdoseLocal)] call CBA_fnc_addEventHandler; + +[QGVAR(applyPressureBag), LINKFUNC(treatmentAdvanced_applyPressureBagLocal)] call CBA_fnc_addEventHandler; +[QGVAR(removePressureBag), LINKFUNC(treatmentAdvanced_removePressureBagLocal)] call CBA_fnc_addEventHandler; [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_gui,updateInjuryListPart), LINKFUNC(gui_updateInjuryListPart)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_gui,updateBodyImage), LINKFUNC(gui_updateBodyImage)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; -[QACEGVAR(medical_status,getBloodLoss), { - _this set [1, _this#1 * (_this#0 getVariable [QGVAR(alphaAction), 1])]; -}] call CBA_fnc_addEventHandler; ["ace_treatmentSucceded", { params ["_medic", "_patient", "_bodyPart", "_classname"]; diff --git a/addons/pharma/XEH_preInit.sqf b/addons/pharma/XEH_preInit.sqf index e2bcc78f8..d9d64017b 100644 --- a/addons/pharma/XEH_preInit.sqf +++ b/addons/pharma/XEH_preInit.sqf @@ -6,7 +6,7 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -#define CBA_SETTINGS_CAT LSTRING(cba_name) -#include "initSettings.inc.sqf" +#define CBA_SETTINGS_CAT "KAT - ADV Medical: Pharmacy" +#include "initSettings.inc.sqf" ADDON = true; diff --git a/addons/pharma/config.cpp b/addons/pharma/config.cpp index 2e35ef27e..5798bff49 100644 --- a/addons/pharma/config.cpp +++ b/addons/pharma/config.cpp @@ -6,25 +6,23 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; units[] = { "kat_PainkillerItem", - "kat_X_AEDItem" }; weapons[] = { - "kat_Painkiller", - "kat_PainkillerItem", "kat_IV_16", + "kat_IV_14", + "kat_IV_20", + "kat_10ml_syringe", + "kat_5ml_syringe", "kat_IO_FAST", - "kat_Carbonate", - "kat_CarbonateItem", "kat_naloxone", + "kat_phenylephrineAuto", "kat_EACA", "kat_TXA", - "kat_X_AED", "kat_norepinephrine", "kat_phenylephrine", - "kat_phenylephrineAuto", "kat_nitroglycerin", "kat_amiodarone", - "kat_lidocane", + "kat_lidocaine", "kat_atropine", "kat_ketamine", "kat_fentanyl", @@ -32,7 +30,28 @@ class CfgPatches { "kat_flumazenil", "kat_lorazepam", "kat_etomidate", - "kat_epinephrineIV" + "kat_epinephrineIV", + "kat_succinylcholine", + "kat_rocuronium", + "kat_sugammadex", + "kat_morphineIV", + "kat_ondansetron", + "kat_adenosineIV", + "kat_alteplase", + "kat_doxapram", + "kat_coag_sense", + "kat_fentPatch", + "kat_diazepam", + "kat_metoprolol", + "kat_calciumGluconate", + "kat_calciumChloride", + "kat_atropineIV", + "kat_TXAAuto", + "kat_EZ_IO", + "kat_EJV", + "kat_pressureBag", + "kat_calciumChloride", + "kat_bicarbonate" }; magazines[] = { }; requiredAddons[] = { diff --git a/addons/pharma/functions/fnc_AMSCheck.sqf b/addons/pharma/functions/fnc_AMSCheck.sqf new file mode 100644 index 000000000..082c318b0 --- /dev/null +++ b/addons/pharma/functions/fnc_AMSCheck.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks for if AMS is enabled and an IV sutible for medications is placed/if an IV is required + * + * Arguments: + * 0: None + * + * Example: + * [] call kat_pharma_fnc_AMScheck; + * + * Public: No + */ +private _medicationsRequireInsIV = GVAR(MedicationsRequireInsIV); +private _amsEnabled = true; +private _removeIV = FUNC(removeIVCheck); + +[false, true] select ((!_medicationsRequireInsIV || _removeIV)); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_applyIV.sqf b/addons/pharma/functions/fnc_applyIV.sqf index b71582524..e380cb54d 100644 --- a/addons/pharma/functions/fnc_applyIV.sqf +++ b/addons/pharma/functions/fnc_applyIV.sqf @@ -23,10 +23,16 @@ params ["_medic", "_patient", "_bodyPart", "_usedItem"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; -private _IVpfh = _patient getVariable [QGVAR(IVpfh), [0,0,0,0,0,0]]; +private _IVpfh = _patient getVariable [QGVAR(IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVpfhActual = _IVpfh select _partIndex; +private _IVrate = _patient getVariable [QGVAR(IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _fractureArray = GET_FRACTURES(_patient); +private _liveFracture = _fractureArray select _partIndex; +private _damage = GET_BODYPART_DAMAGE(_patient); +private _bodypartDamage = _damage select _partIndex; +private _damageFixed = linearConversion [GVAR(ivDamageThreshold), 40, _bodypartDamage, 1, 4, true]; if (_IVpfhActual > 0) then { [_IVpfhActual] call CBA_fnc_removePerFrameHandler; @@ -38,70 +44,240 @@ if (_IVpfhActual > 0) then { _IVpfh set [_partIndex, _IVpfhActual]; _patient setVariable [QGVAR(IVpfh), _IVpfh, true]; }; - -if (_usedItem isEqualTo "kat_IV_16") then { - _IVarray set [_partIndex, 2]; - _patient setVariable [QGVAR(IV), _IVarray, true]; - private _ivMenu = _patient getVariable [QGVAR(IVmenuActive), false]; - private _ivFlowControl = missionNamespace getVariable [QGVAR(IVflowControl), false]; - if (!_ivMenu && _ivFlowControl) then { - [_patient] call EFUNC(gui,handleIVShow); - }; - [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "16g IV"]] call ACEFUNC(medical_treatment,addToLog); - [_patient, "16g IV"] call ACEFUNC(medical_treatment,addToTriageCard); -} else { - _IVarray set [_partIndex, 1]; - _patient setVariable [QGVAR(IV), _IVarray, true]; - private _ivMenu = _patient getVariable [QGVAR(IVmenuActive), false]; - private _ivFlowControl = missionNamespace getVariable [QGVAR(IVflowControl), false]; - - if (!_ivMenu && _ivFlowControl) then { - [_patient] call EFUNC(gui,handleIVShow); - }; - private _medStack = _patient call ACEFUNC(medical_treatment,getAllMedicationCount); - private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine", "lidocaine"]; - private _fentanylEffectiveness = 0; - private _ketamineEffectiveness = 0; - private _nalbuphineEffectiveness = 0; - private _morphineEffectiveness = 0; - private _lidocaineEffectiveness = 0; - { - private _medName = toLower (_x select 0); - private _effectiveness = _x select 2; - if ("fentanyl" in _medName) then { - _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; +switch (_usedItem) do { + case "kat_IV_16": { + if (GVAR(ivCheckLimbDamage) && (_bodypartDamage > GVAR(ivDamageThreshold)) && (random 100 < (25 * _damageFixed))) exitWith { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; - if ("ketamine" in _medName) then { - _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + if (GVAR(ivCheckLimbDamage) && (_liveFracture != 0) && (random 100 < 33)) exitWith { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; - if ("nalbuphine" in _medName) then { - _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + if (random 100 < GVAR(IVFailures)) then { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + } else { + _IVarray set [_partIndex, 2]; + _IVrate set [_partIndex, 1]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "16g IV"]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "16g IV"] call ACEFUNC(medical_treatment,addToTriageCard);};}; + + case "kat_IV_14": { + if (GVAR(ivCheckLimbDamage) && (_bodypartDamage > GVAR(ivDamageThreshold)) && (random 100 < (25 * _damageFixed))) exitWith { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; - if ("morphine" in _medName) then { - _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + if (GVAR(ivCheckLimbDamage) && (_liveFracture != 0) && (random 100 < 33)) exitWith { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; - if ("lidocaine" in _medName) then { - _lidocaineEffectiveness = _lidocaineEffectiveness max _effectiveness; + if (random 100 < GVAR(IVFailures)) then { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + } else { + _IVarray set [_partIndex, 3]; + _IVrate set [_partIndex, 1.5]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "14g IV"]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "14g IV"] call ACEFUNC(medical_treatment,addToTriageCard);};}; + + case "kat_IV_20": { + if (GVAR(ivCheckLimbDamage) && (_bodypartDamage > GVAR(ivDamageThreshold)) && (random 100 < (25 * _damageFixed))) exitWith { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; + if (GVAR(ivCheckLimbDamage) && (_liveFracture != 0) && (random 100 < 33)) exitWith { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; + if (random 100 < GVAR(IVFailures)) then { + [_patient, [0.2, 0.3, 0.4] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIV), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + } else { + _IVarray set [_partIndex, 4]; + _IVrate set [_partIndex, 0.5]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "20g IV"]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "20g IV"] call ACEFUNC(medical_treatment,addToTriageCard);};}; + + case "kat_IO_FAST": { + _IVarray set [_partIndex, 1]; + _IVrate set [_partIndex, 0.4]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); + private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; + private _fentanylEffectiveness = 0; + private _ketamineEffectiveness = 0; + private _nalbuphineEffectiveness = 0; + private _morphineEffectiveness = 0; + private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; + { + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; } forEach _medStack; + _painLevel = [0.6, 0.7, 0.8] select (floor random 3); if ( - _fentanylEffectiveness <= 0.6 && - _ketamineEffectiveness <= 0.6 && - _nalbuphineEffectiveness <= 0.6 && - _lidocaineEffectiveness <= 0.6 && - _morphineEffectiveness <= 0.6 + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + _localAnesthesia <= 0.8 ) then { + [_patient, _painLevel] call ACEFUNC(medical_status,adjustPainLevel); + }; + [{ + params ["_patient", "_partIndex"]; + private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; + (_localAnesthesia > 0.4); + }, { + params ["_patient", "_partIndex", "_painLevel"]; + _negPainLevel = -1 * _painLevel; + [_patient, _negPainLevel] call ACEFUNC(medical_status,adjustPainLevel); + }, [_patient, _partIndex, _painLevel], 60] call CBA_fnc_waitUntilAndExecute; + + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "FAST IO"]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "FAST IO"] call ACEFUNC(medical_treatment,addToTriageCard);}; + + case "kat_EZ_IO": { + if (GVAR(ivCheckLimbDamage) && (_bodypartDamage > GVAR(ivDamageThreshold)) && (random 100 < (20 * _damageFixed))) exitWith { + [_patient, [0.6, 0.7, 0.8] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIO), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; + if (GVAR(ivCheckLimbDamage) && (_liveFracture != 0)) exitWith { [_patient, [0.6, 0.7, 0.8] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + [LLSTRING(failedToPlaceIO), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; - [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "FAST IO"]] call ACEFUNC(medical_treatment,addToLog); - [_patient, "FAST IO"] call ACEFUNC(medical_treatment,addToTriageCard); + _IVarray set [_partIndex, 13]; + _IVrate set [_partIndex, 0.4]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); + private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; + private _fentanylEffectiveness = 0; + private _ketamineEffectiveness = 0; + private _nalbuphineEffectiveness = 0; + private _morphineEffectiveness = 0; + private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; + { + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max _effectiveness; + }; + if ("ketamine" in _medName) then { + _ketamineEffectiveness = _ketamineEffectiveness max _effectiveness; + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max _effectiveness; + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max _effectiveness; + }; + } forEach _medStack; + _painLevel = [0.6, 0.7, 0.8] select (floor random 3); + if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + _localAnesthesia <= 0.8 + ) then { + [_patient, _painLevel] call ACEFUNC(medical_status,adjustPainLevel); + }; + [{ + params ["_patient", "_partIndex"]; + private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; + (_localAnesthesia > 0.4); + }, { + params ["_patient", "_partIndex", "_painLevel"]; + _negPainLevel = -1 * _painLevel; + [_patient, _negPainLevel] call ACEFUNC(medical_status,adjustPainLevel); + }, [_patient, _partIndex, _painLevel], 60] call CBA_fnc_waitUntilAndExecute; + + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "EZ IO"]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "EZ IO"] call ACEFUNC(medical_treatment,addToTriageCard);}; + + case "kat_EJV": { + if (random 100 < (GVAR(IVFailures) * 2)) then { + [_patient, [0.4, 0.5, 0.7] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); + if (random 100 < 5) then { + private _pneumothoraxState = _patient getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; + private _tensionState = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]]; + private _side = selectRandom [0, 1]; + if (floor (random 100) < GVAR(tptxChance)) then { + _tensionState set [_side, true]; + _patient setVariable [QEGVAR(breathing,tensionpneumothorax), _tensionState, true]; + if !(_patient getVariable [QEGVAR(breathing,activeChestSeal), [false, false]] select _side) then { + _pneumothoraxState set [_side, (((_pneumothoraxState select _side) + 2) min 16)]; + _patient setVariable [QEGVAR(breathing,pneumothorax), _pneumothoraxState, true]; + }; + [_patient, _side] call EFUNC(breathing,handlePneumothoraxDeterioration); + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "tension"}) == -1) then { + _ht pushBack "tension"; + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; + }; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + } else { + if !(_patient getVariable [QEGVAR(breathing,activeChestSeal), [false, false]] select _side) then { + _pneumothoraxState set [_side, (((_pneumothoraxState select _side) + 2) min 16)]; + _patient setVariable [QEGVAR(breathing,pneumothorax), _pneumothoraxState, true]; + }; + [_patient, _side] call EFUNC(breathing,handlePneumothoraxDeterioration); + }; + }; + } else { + _IVarray set [_partIndex, 14]; + _IVrate set [_partIndex, 0.8]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (!alive _patient || (abs (speed _patient) > 9.9 && isNull objectParent _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _IVrate = _patient getVariable [QGVAR(IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]]; + _IVarray set [1, 0]; + _IVrate set [1, 0]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + _patient setVariable [QGVAR(IVrate), _IVrate, true]; + if (random 100 < 25) then { + private _side = selectRandom [0, 1]; + [_patient, _side, 1] call EFUNC(breathing,handleHemothoraxDeterioration); + } + }; + }, 1, [_patient]] call CBA_fnc_addPerFrameHandler; + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "EJV"]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "EJV"] call ACEFUNC(medical_treatment,addToTriageCard);};}; + default {}; }; -if (GVAR(IVdropEnable) && (_usedItem isEqualTo "kat_IV_16")) then { +if (GVAR(IVdropEnable) && ((_usedItem isEqualTo "kat_IV_16") || (_usedItem isEqualTo "kat_IV_14") || (_usedItem isEqualTo "kat_IV_20"))) then { [{ params ["_patient", "_partIndex", "_IVpfhActual"]; - private _IVpfh = _patient getVariable [QGVAR(IVpfh), [0,0,0,0,0,0]]; + private _IVpfh = _patient getVariable [QGVAR(IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVpfhCurrent = _IVpfh select _partIndex; if (_IVpfhCurrent == _IVpfhActual) then { @@ -109,7 +285,7 @@ if (GVAR(IVdropEnable) && (_usedItem isEqualTo "kat_IV_16")) then { params ["_args", "_idPFH"]; _args params ["_patient", "_partIndex"]; - private _IVpfh = _patient getVariable [QGVAR(IVpfh), [0,0,0,0,0,0]]; + private _IVpfh = _patient getVariable [QGVAR(IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0]]; _IVpfh set [_partIndex, _idPFH]; _patient setVariable [QGVAR(IVpfh), _IVpfh, true]; @@ -117,14 +293,15 @@ if (GVAR(IVdropEnable) && (_usedItem isEqualTo "kat_IV_16")) then { if (_bloodBags isEqualTo []) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; - private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; + private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; if(GVAR(IVreuse)) then { - if (_IVactual == 1) then { - _patient addItem "kat_IO_FAST"; - } else { - _patient addItem "kat_IV_16"; + switch (_IVactual) do { + case "1": {_patient addItem "kat_IO_FAST"}; + case "2": {_patient addItem "kat_IV_16"}; + case "3": {_patient addItem "kat_IV_14"}; + case "4": {_patient addItem "kat_IV_20"}; }; }; diff --git a/addons/pharma/functions/fnc_checkIV.sqf b/addons/pharma/functions/fnc_checkIV.sqf index 5e2221b56..09a6c9a93 100644 --- a/addons/pharma/functions/fnc_checkIV.sqf +++ b/addons/pharma/functions/fnc_checkIV.sqf @@ -23,7 +23,7 @@ if !(GVAR(ivCheckLimbDamage)) exitWith { true }; -private _bodyPartDamage = _patient getVariable [QACEGVAR(medical,bodyPartDamage), [0, 0, 0, 0, 0, 0]]; +private _bodyPartDamage = _patient getVariable [QACEGVAR(medical,bodyPartDamage), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]; private _compare = ALL_BODY_PARTS find toLower _bodyPart; private _final2 = 0; private _return = false; diff --git a/addons/pharma/functions/fnc_checkIVType.sqf b/addons/pharma/functions/fnc_checkIVType.sqf new file mode 100644 index 000000000..18b6e464d --- /dev/null +++ b/addons/pharma/functions/fnc_checkIVType.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks the IV from the patient on the given body part. + * Note: Patient may not be local + * + * Arguments: + * 0: Patient + * 1: Body Part + * + * Return Value: + * Check IV + * 0: No IV/IO + * 1: Fast IO + * 2: 16G IV + * 3: 14G IV + * 4: 20G IV + * + * Example: + * [cursorObject, "LeftLeg"] call kat_pharma_fnc_checkIVType; + * + * Public: No + */ + +params ["_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _IVactual = _IVarray select _partIndex; +private _return = 0; + +if (_IVactual > 0) then { + _return = _IVactual; +}; + +_return diff --git a/addons/pharma/functions/fnc_clotWound.sqf b/addons/pharma/functions/fnc_clotWound.sqf index e8e08c7e6..ee0eaba18 100644 --- a/addons/pharma/functions/fnc_clotWound.sqf +++ b/addons/pharma/functions/fnc_clotWound.sqf @@ -20,78 +20,224 @@ params ["_unit"]; if !(GVAR(coagulation)) exitWith {}; private _fnc_clotWound = { - params ["_unit", "_bodyPart", "_wounds", "_countTXA", "_countEACA"]; + params ["_unit", "_bodyPart", "_wounds", "_txaEffectiveness"]; { _x params ["_woundClassID", "_amountOf", "_bleeding", "_damage"]; - private _category = _woundClassID % 10; private _suffix = ["Minor", "Medium", "Large"] select _category; + private _classIndex = _woundClassID / 10; + private _classname = ACEGVAR(medical_damage,woundClassNames) select _classIndex; private _selectionName = localize format [LSTRING(%1), _bodyPart]; private _logString = LSTRING(coagulation_Bandaged); private _woundClotTime = 0; + private _chance = 0; private _bandageToUse = ""; private _coagulation_time_minor = missionNamespace getVariable [QGVAR(coagulation_time_minor), 15]; private _coagulation_time_medium = missionNamespace getVariable [QGVAR(coagulation_time_medium), 30]; private _coagulation_time_large = missionNamespace getVariable [QGVAR(coagulation_time_large), 45]; private _factorCountToRemove = 1; - + private _woundClotDelayMult = 1; + private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); + private _medsToCheck = ["Alteplase", "CWMP"]; + private _alteplaseEffectiveness = 0; + private _cwmpEffectiveness = 0; + { + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("alteplase" in _medName) then { + _alteplaseEffectiveness = _alteplaseEffectiveness max _effectiveness; + }; + if ("cwmp" in _medName) then { + _cwmpEffectiveness = _cwmpEffectiveness max _effectiveness; + }; + } forEach _medStack; + private _cwmpFixedEffectiveness = linearConversion [0, 1, _cwmpEffectiveness, 1, 1.1]; + private _alteplaseFixedEffectiveness = linearConversion [0, 1, _alteplaseEffectiveness, 1, 10]; + private _coagulationFactor = GET_BODY_FLUID_PLATELETS(_unit); + private _hypothermiaDelay = 1; + if (EGVAR(hypothermia,hypothermiaActive)) then { + _hypothermiaDelay = linearConversion [35, 30, (_unit getVariable [QEGVAR(hypothermia,unitTemperature), 37]), 1, 2.5, true]; + }; + if (EGVAR(hypothermia,hypothermiaActive) && (_unit getVariable [QEGVAR(hypothermia,unitTemperature), 37]) < 30) exitWith {}; + private _ph = GET_PH(_unit); + private _ca = GET_CA(_unit); + // Calcium effect (low Ca = slower clotting) + private _calciumDelayMult = linearConversion [ + 1.2, 2.4, + _ca, + 2.0, 1.0, // up to 2× slower clotting + true + ]; + private _phDelayMult = linearConversion [ + 7.0, 7.4, + _ph, + 3.0, 1.0, + true + ]; + if (_ph < 6.9) exitWith {}; + if (_calcium < 1.0) exitWith {}; + private _coagMult = linearConversion [0, 600, _coagulationFactor, 3, 1, true]; + private _woundClotDelayMult = ( + _alteplaseFixedEffectiveness * + (_coagMult + _hypothermiaDelay) * + _cwmpFixedEffectiveness * + _calciumDelayMult * + _phDelayMult + ) min 10; + if (_woundClotDelayMult > 8) exitWith {}; switch (_suffix) do { case "Minor": { - _woundClotTime = round ((random (_coagulation_time_minor / 2)) + _coagulation_time_minor / 2); - _bandageToUse = "BloodClotMinor"; - _factorCountToRemove = 1; - - if !(missionNamespace getVariable [QGVAR(coagulation_allow_MinorWounds), true]) then { continue; }; + switch (true) do { + case (_classname in ["Cut", "Abrasion"]): { + _woundClotTime = round ((random (_coagulation_time_minor / 2)) + _coagulation_time_minor / 2) * _woundClotDelayMult * random [0.6, 0.8, 0.9]; + _bandageToUse = "BloodClotMinor"; + _factorCountToRemove = round (random [5, 9, 15]); + _chance = GVAR(coagulation_chance_MinorWounds) * 1.25; + }; + case (_classname in ["Laceration", "PunctureWound"]): { + _woundClotTime = round ((random (_coagulation_time_minor / 2)) + _coagulation_time_minor / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotMinor"; + _factorCountToRemove = round (random [8, 16, 25]); + _chance = GVAR(coagulation_chance_MinorWounds); + }; + case (_classname in ["VelocityWound", "Avulsion"]): { + _woundClotTime = round ((random (_coagulation_time_minor/ 2)) + _coagulation_time_minor / 2) * _woundClotDelayMult * random [1.1, 1.4, 1.8]; + _bandageToUse = "BloodClotMinor"; + _factorCountToRemove = round (random [15, 19, 30]); + _chance = GVAR(coagulation_chance_MinorWounds) * 0.75; + }; + case (_classname in ["InternalBleeding", "Evisceration"]): { + _woundClotTime = round ((random (_coagulation_time_minor / 2)) + _coagulation_time_minor / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotMinor"; + _factorCountToRemove = round (random [4, 8, 15]); + _chance = GVAR(coagulation_chance_MinorWounds) * 1.5; + }; + default { + _woundClotTime = round ((random (_coagulation_time_minor / 2)) + _coagulation_time_minor / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotMinor"; + _factorCountToRemove = round (random [8, 14, 20]); + _chance = GVAR(coagulation_chance_MinorWounds); + }; + }; + if !((missionNamespace getVariable [QGVAR(coagulation_allow_MinorWounds), true]) && (_classname == "InternalBleeding")) then { continue; }; }; case "Medium": { - _woundClotTime = round ((random (_coagulation_time_medium / 2)) + _coagulation_time_medium / 2); - _bandageToUse = "BloodClotMedium"; - _factorCountToRemove = 2; - - if !(missionNamespace getVariable [QGVAR(coagulation_allow_MediumWounds), true]) then { continue; }; + switch (true) do { + case (_classname in ["Cut", "Abrasion"]): { + _woundClotTime = round ((random (_coagulation_time_medium / 2)) + _coagulation_time_medium / 2) * _woundClotDelayMult * random [0.6, 0.8, 0.9]; + _bandageToUse = "BloodClotMedium"; + _factorCountToRemove = round (random [10, 15, 25]); + _chance = GVAR(coagulation_chance_MediumWounds) * 1.25; + }; + case (_classname in ["Laceration", "PunctureWound"]): { + _woundClotTime = round ((random (_coagulation_time_medium / 2)) + _coagulation_time_medium / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotMedium"; + _factorCountToRemove = round (random [18, 26, 35]); + _chance = GVAR(coagulation_chance_MediumWounds); + }; + case (_classname in ["VelocityWound", "Avulsion"]): { + _woundClotTime = round ((random (_coagulation_time_medium/ 2)) + _coagulation_time_medium / 2) * _woundClotDelayMult * random [1.1, 1.4, 1.8]; + _bandageToUse = "BloodClotMedium"; + _factorCountToRemove = round (random [22, 29, 40]); + _chance = GVAR(coagulation_chance_MediumWounds) * 0.75; + }; + case (_classname in ["InternalBleeding", "Evisceration"]): { + _woundClotTime = round ((random (_coagulation_time_medium / 2)) + _coagulation_time_medium / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotMedium"; + _factorCountToRemove = round (random [8, 15, 21]); + _chance = GVAR(coagulation_chance_MediumWounds) * 1.5; + }; + default { + _woundClotTime = round ((random (_coagulation_time_medium / 2)) + _coagulation_time_medium / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotMedium"; + _factorCountToRemove = round (random [14, 21, 30]); + _chance = GVAR(coagulation_chance_MediumWounds); + }; + }; + if !(!(missionNamespace getVariable [QGVAR(coagulation_allow_MediumWounds), true]) && (_classname == "InternalBleeding")) then { continue; }; }; default { - _woundClotTime = round ((random (_coagulation_time_large / 2)) + _coagulation_time_large / 2); - _bandageToUse = "BloodClotLarge"; - _factorCountToRemove = 4; - - if !(missionNamespace getVariable [QGVAR(coagulation_allow_LargeWounds), true]) then { continue; }; + switch (true) do { + case (_classname in ["Cut", "Abrasion"]): { + _woundClotTime = round ((random (_coagulation_time_large / 2)) + _coagulation_time_large / 2) * _woundClotDelayMult * random [0.6, 0.8, 0.9]; + _bandageToUse = "BloodClotLarge"; + _factorCountToRemove = round (random [15, 23, 35]); + _chance = GVAR(coagulation_chance_LargeWounds) * 1.25; + }; + case (_classname in ["Laceration", "PunctureWound"]): { + _woundClotTime = round ((random (_coagulation_time_large / 2)) + _coagulation_time_large / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotLarge"; + _factorCountToRemove = round (random [24, 32, 45]); + _chance = GVAR(coagulation_chance_LargeWounds); + }; + case (_classname in ["VelocityWound", "Avulsion"]): { + _woundClotTime = round ((random (_coagulation_time_large/ 2)) + _coagulation_time_large / 2) * _woundClotDelayMult * random [1.1, 1.4, 1.8]; + _bandageToUse = "BloodClotLarge"; + _factorCountToRemove = round (random [35, 41, 50]); + _chance = GVAR(coagulation_chance_LargeWounds) * 0.75; + }; + case (_classname in ["InternalBleeding", "Evisceration"]): { + _woundClotTime = round ((random (_coagulation_time_large / 2)) + _coagulation_time_large / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotLarge"; + _factorCountToRemove = round (random [14, 25, 33]); + _chance = GVAR(coagulation_chance_LargeWounds) * 1.5; + }; + default { + _woundClotTime = round ((random (_coagulation_time_large / 2)) + _coagulation_time_large / 2) * _woundClotDelayMult; + _bandageToUse = "BloodClotLarge"; + _factorCountToRemove = round (random [22, 31, 40]); + _chance = GVAR(coagulation_chance_LargeWounds); + }; + }; + if !((missionNamespace getVariable [QGVAR(coagulation_allow_LargeWounds), true]) && (_classname == "InternalBleeding")) then { continue; }; }; }; - + _factorCountToRemove = ceil (_factorCountToRemove * (1 + ( _bleeding * 0.5))); if (_amountOf * _bleeding > 0) exitWith { - if (_countTXA > 0 || _countEACA > 0) then { + if (_txaEffectiveness > 0.2) then { _logString = LSTRING(coagulation_Bandaged_TXA); - - if (_countEACA > 0 && _countTXA > 0) exitWith { // If TXA & EACA are in system at same time use EACA bandage - _woundClotTime = round (_woundClotTime / 3 * 2); - _bandageToUse = _bandageToUse + "EACA"; - }; - _bandageToUse = _bandageToUse + "TXA"; + _factorCountToRemove = _factorCountToRemove * 0.5 }; - [{ - params["_unit", "_bodyPart", "_selectionName", "_bandageToUse", "_logString", "_factorCountToRemove"]; + params["_unit", "_bodyPart", "_selectionName", "_bandageToUse", "_logString", "_factorCountToRemove", "_chance", "_txaEffectiveness", "_woundClassID"]; - private _coagulationFactor = _unit getVariable [QGVAR(coagulationFactor), 30]; + private _bodyFluid = GET_BODY_FLUID(_unit); + private _coagulationFactor = GET_BODY_FLUID_PLATELETS(_unit); + if (_coagulationFactor <= 0) exitWith {}; + private _bodyPartN = ALL_BODY_PARTS find _bodyPart; + if ([_unit,_bodyPartN] call EFUNC(pharma,occlusionCheck) && GVAR(coagulation_tourniquetBlock)) exitWith {}; private _openWounds = GET_OPEN_WOUNDS(_unit); private _openWoundsOnPart = _openWounds getOrDefault [_bodyPart, []]; private _woundIndex = _openWoundsOnPart findIf {(_x select 1) > 0 && (_x select 2) > 0}; - - if (_coagulationFactor <= 0) exitWith {}; if (_woundIndex == -1) exitWith {}; - if ([_unit, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo) && missionNamespace getVariable [QGVAR(coagulation_tourniquetBlock), true]) exitWith {}; - - _unit setVariable [QGVAR(coagulationFactor), (_coagulationFactor - _factorCountToRemove), true]; + private _txaMult = linearConversion [0, 1, _txaEffectiveness, 1, 1.5]; + private _chance = _chance * _txaMult; + if (HAS_APPLIEDPRESSURE_ON(_unit,_bodyPartN) && GVAR(pressureInfluenceCoag)) then { + _chance = _chance * 1.25; + }; + if !(GVAR(pressureInfluenceCoag)) then { + _chance = _chance * 1.25; + }; + private _ph = GET_PH(_unit); + private _ca = GET_CA(_unit); + private _calciumChanceMult = linearConversion [1.2, 2.4, _ca, 0.4, 1.0, true]; + private _phChanceMult = linearConversion [7.0, 7.4, _ph, 0.5, 1.0, true ]; + _chance = _chance * _calciumChanceMult * _phChanceMult; + if (floor (random 100) > _chance) exitWith {}; + _bodyFluid set [5, (_coagulationFactor - _factorCountToRemove)]; + _unit setVariable [VAR_BODY_FLUID, _bodyFluid, true]; [QACEGVAR(medical_treatment,bandageLocal), [_unit, _bodyPart, _bandageToUse, 1], _unit] call CBA_fnc_targetEvent; if (GVAR(coagulation_allow_clot_text)) then { + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_className in ["InternalBleeding", "Evisceration"]) exitWith {}; [_unit, "activity", _logString, [(toLower _selectionName)]] call ACEFUNC(medical_treatment,addToLog); }; }, - [_unit, _bodyPart, _selectionName, _bandageToUse, _logString, _factorCountToRemove], _woundClotTime] call CBA_fnc_waitAndExecute; + [_unit, _bodyPart, _selectionName, _bandageToUse, _logString, _factorCountToRemove, _chance, _txaEffectiveness, _woundClassID], _woundClotTime] call CBA_fnc_waitAndExecute; }; } forEach _wounds; }; @@ -105,16 +251,15 @@ private _fnc_clotWound = { if !(_alive) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - - if (!(GVAR(coagulation_allowOnAI)) && ACE_Player != _unit) exitWith { // Check allowOnAI setting to save performance + // Check allowOnAI setting to save performance + if (!(GVAR(coagulation_allowOnAI)) && (ACE_player != _unit)) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; private _openWounds = _unit getVariable [VAR_OPEN_WOUNDS, createHashMap]; private _pulse = _unit getVariable [VAR_HEART_RATE, 80]; - private _coagulationFactor = _unit getVariable [QGVAR(coagulationFactor), 30]; - private _countTXA = ([_unit, "TXA"] call ACEFUNC(medical_status,getMedicationCount)) select 1; - private _countEACA = ([_unit, "EACA"] call ACEFUNC(medical_status,getMedicationCount)) select 1; + private _coagulationFactor = GET_BODY_FLUID_PLATELETS(_unit); + private _txaEffectiveness = [_unit, "TXA", false] call ACEFUNC(medical_status,getMedicationCount) select 1; private _hasWoundToBandageArray = []; if (_openWounds isEqualTo createHashMap) exitWith {}; // Exit when hashmap not initialized (Will not work when hashmap is set, cause ace only changes value of "woundCount" to 0) @@ -125,7 +270,8 @@ private _fnc_clotWound = { private _shuffledKeys = keys _openWounds call BIS_fnc_arrayShuffle; // Shuffel Keys to switch bodypart after each bandage for on_all_Bodyparts setting { - if ([_unit, _x] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo) && missionNamespace getVariable [QGVAR(coagulation_tourniquetBlock), true]) then { // Check for tourniqet + private _bodyPartN = ALL_BODY_PARTS find _x; + if ([_unit,_bodyPartN] call EFUNC(pharma,occlusionCheck) && missionNamespace getVariable [QGVAR(coagulation_tourniquetBlock), true]) then { // Check for tourniqet continue; }; @@ -134,32 +280,29 @@ private _fnc_clotWound = { private _category = _woundClassID % 10; private _suffix = ["Minor", "Medium", "Large"] select _category; - + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; switch (_suffix) do { case "Minor": { - if (missionNamespace getVariable [QGVAR(coagulation_allow_MinorWounds), true] && _amountOf * _bleeding > 0) then { + if ((missionNamespace getVariable [QGVAR(coagulation_allow_MinorWounds), true] || (_className isEqualTo "InternalBleeding")) && _amountOf * _bleeding > 0) then { _hasWoundToBandageArray pushBack true; }; }; case "Medium": { - if (missionNamespace getVariable [QGVAR(coagulation_allow_MediumWounds), true] && _amountOf * _bleeding > 0) then { + if ((missionNamespace getVariable [QGVAR(coagulation_allow_MediumWounds), true] || (_className isEqualTo "InternalBleeding")) && _amountOf * _bleeding > 0) then { _hasWoundToBandageArray pushBack true; }; }; default { - if (missionNamespace getVariable [QGVAR(coagulation_allow_LargeWounds), true] && _amountOf * _bleeding > 0) then { + if ((missionNamespace getVariable [QGVAR(coagulation_allow_LargeWounds), true] || (_className isEqualTo "InternalBleeding")) && (_amountOf * _bleeding > 0)) then { _hasWoundToBandageArray pushBack true; }; }; }; } forEach (_openWounds get _x); // Sets array that specifies if there is a open wound that coag can bandage in body part (here for performance so that the fnc does not get called every time) - if (!(GVAR(coagulation_on_all_Bodyparts)) && true in _hasWoundToBandageArray) exitWith { // Check if coag should be present on all body party simultaneously, if not use this exitWith to block next interiation of forEach - [_unit, _x, _openWounds get _x, _countTXA, _countEACA] call _fnc_clotWound; - }; - if (true in _hasWoundToBandageArray) then { // Check if there is a wound to bandage for coag, if not loop through next interiation of forEach - [_unit, _x, _openWounds get _x, _countTXA, _countEACA] call _fnc_clotWound; + [_unit, _x, _openWounds get _x, _txaEffectiveness] call _fnc_clotWound; }; } forEach _shuffledKeys; }, missionNamespace getVariable [QGVAR(coagulation_time), 5], [_unit, _fnc_clotWound]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/pharma/functions/fnc_coagRegen.sqf b/addons/pharma/functions/fnc_coagRegen.sqf index 666df4cb2..0ea85e0e5 100644 --- a/addons/pharma/functions/fnc_coagRegen.sqf +++ b/addons/pharma/functions/fnc_coagRegen.sqf @@ -33,44 +33,95 @@ if !(GVAR(coagulation)) exitWith {}; [_idPFH] call CBA_fnc_removePerFrameHandler; }; - if (GET_BLOOD_VOLUME_LITERS(_unit) < GVAR(coagulation_requireBV)) exitWith {}; // Blood volume check - if ((GET_HEART_RATE(_unit) < 20) && GVAR(coagulation_requireHR)) exitWith {}; // Has pulse & require setting - - private _currentCoagFactors = _unit getVariable [QGVAR(coagulationFactor), 30]; - private _savedCoagFactors = _unit getVariable [QGVAR(coagulationSavedFactors), (_unit getVariable [QGVAR(coagulationFactor), 30])]; - private _limitRegenCoagFactors = missionNamespace getVariable [QGVAR(coagulation_factor_count), 30]; + private _bv = GET_BLOOD_VOLUME_LITERS(_unit); + if (_bv < GVAR(coagulation_requireBV)) exitWith {}; // Blood volume check + if ((GET_HEART_RATE(_unit) < 20) && GVAR(coagulation_requireHR)) exitWith {}; + private _ph = GET_PH(_unit); + private _ca = GET_CA(_unit); + if (_ph < 6.9) exitWith {}; + if (_ca < 1.0) exitWith {}; + private _bodyFluid = GET_BODY_FLUID(_unit); + private _currentCoagFactors = GET_BODY_FLUID_PLATELETS(_unit); + private _savedCoagFactors = _unit getVariable [QGVAR(coagulationSavedFactors), GET_BODY_FLUID_PLATELETS(_unit)]; private _cooldownON = _unit getVariable [QGVAR(coagulationRegenCooldown), false]; - private _countTXA = ([_unit, "TXA"] call ACEFUNC(medical_status,getMedicationCount)) select 1; - private _countEACA = ([_unit, "EACA"] call ACEFUNC(medical_status,getMedicationCount)) select 1; - private _ammountToAdd = 1; + private _medStack = [_unit, false] call ACEFUNC(medical_status,getAllMedicationCount); + private _medsToCheck = ["TXA", "EACA"]; + private _eacaEffectiveness = 0; + private _txaEffectiveness = 0; + { + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("txa" in _medName) then { + _txaEffectiveness = _txaEffectiveness max _effectiveness; + }; + if ("eaca" in _medName) then { + _eacaEffectiveness = _eacaEffectiveness max _effectiveness; + }; + } forEach _medStack; + private _calciumRegenMult = linearConversion [ + 1.2, 2.4, // severe hypocalcemia → normal + _ca, + 0.3, 1.0, // up to 70% reduction + true + ]; + private _phRegenMult = linearConversion [ + 7.0, 7.4, // acidosis → normal + _ph, + 0.2, 1.0, // up to 80% reduction + true + ]; + if (_currentCoagFactors < _savedCoagFactors) exitWith { [{ params["_unit"]; - _unit setVariable [QGVAR(coagulationSavedFactors), _unit getVariable [QGVAR(coagulationFactor), 30], true]; + _unit setVariable [QGVAR(coagulationSavedFactors), GET_BODY_FLUID_PLATELETS(_unit), true]; }, [_unit], ((missionNamespace getVariable [QGVAR(coagulation_factor_regenerate_time), 150]) / 2)] call CBA_fnc_waitAndExecute; // Block regen PFH instance from happening }; - - if (_currentCoagFactors == _savedCoagFactors && _currentCoagFactors < _limitRegenCoagFactors) exitWith { - - if (_countTXA > 0 || _countEACA > 0) then { // If TXA or EACA are in system add more factors - if (_countTXA > 0 && _countEACA > 0) exitWith { - _ammountToAdd = 4; - }; - _ammountToAdd = 2; - }; - - _unit setVariable [QGVAR(coagulationFactor), (_currentCoagFactors + _ammountToAdd), true]; - _unit setVariable [QGVAR(coagulationSavedFactors), (_currentCoagFactors + _ammountToAdd), true]; + private _ph = GET_PH(_unit); + private _ca = GET_CA(_unit); + private _phMax = if (_ph > 7.5) then { + linearConversion [7.55, 7.9, _ph, 1, 0.5, true]; + } else { + linearConversion [7.3, 6.8, _ph, 1, 0.5, true]; }; - - if (_currentCoagFactors > _limitRegenCoagFactors && !(_cooldownON)) exitWith { - - if (_countTXA > 0 || _countEACA > 0) exitWith {}; // If TXA or EACA is in system don't remove factor - - _unit setVariable [QGVAR(coagulationFactor), (_currentCoagFactors - 1), true]; - _unit setVariable [QGVAR(coagulationSavedFactors), (_currentCoagFactors - 1), true]; + private _caMax = if (_ca > 2.6) then { + linearConversion [2.6, 3.4, _ca, 1, 0.5, true]; + } else { + linearConversion [2.2, 1.8, _ca, 1, 0.5, true]; + }; + if (_currentCoagFactors == _savedCoagFactors && _currentCoagFactors < (600 * (_caMax * _phMax))) exitWith { + private _bodyFluid = GET_BODY_FLUID(_unit); + private _baseRegen = 3; + private _pain = GET_PAIN(_unit); + private _painBoost = linearConversion [0, 1, _pain, 0.01, 5, true]; + private _factorDeficit = 600 - _currentCoagFactors; + private _reboundMultiplier = 1 + (1 - exp(-3 * (_factorDeficit / 600))); + private _regenAmount = ( + (_baseRegen + _painBoost) * + _reboundMultiplier * + _calciumRegenMult * + _phRegenMult + ) min _factorDeficit; + private _totalAmount = _currentCoagFactors + _regenAmount; + _bodyFluid set [5, _totalAmount]; + _unit setVariable [VAR_BODY_FLUID, _bodyFluid, true]; + _unit setVariable [QGVAR(coagulationSavedFactors), _currentCoagFactors + _regenAmount, true]; + }; + + if ((_currentCoagFactors > (600 * (_caMax * _phMax))) && !(_cooldownON)) exitWith { + + if (_txaEffectiveness > 0 || _eacaEffectiveness > 0) exitWith {}; // If TXA or EACA is in system don't remove factor + private _factorOverflow = (_currentCoagFactors - 600) max 0; + private _reboundMultiplier = exp(2 * (_factorOverflow / 600)) - 1; + private _alkalosisDecayMult = 1; + if (_ph > 7.5) then { + _alkalosisDecayMult = linearConversion [7.5, 7.6, _ph, 1.0, 1.5, true]; + }; + _bodyFluid set [5, (_currentCoagFactors - ((1 * _reboundMultiplier) * _alkalosisDecayMult))]; + _unit setVariable [VAR_BODY_FLUID, _bodyFluid, true]; + _unit setVariable [QGVAR(coagulationSavedFactors), (_currentCoagFactors - (1 * _reboundMultiplier)), true]; _unit setVariable [QGVAR(coagulationRegenCooldown), true, true]; [{ diff --git a/addons/pharma/functions/fnc_fluid.sqf b/addons/pharma/functions/fnc_fluid.sqf deleted file mode 100644 index 9578c178d..000000000 --- a/addons/pharma/functions/fnc_fluid.sqf +++ /dev/null @@ -1,22 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: MiszczuZPolski, Mazinski.H - * Starts ph treatment - * - * Arguments: - * 0: Patient - * 1: pH value - * 2: Coagulation factors value - * - * Return Value: - * None - * - * Example: - * [player, 500, 10] call kat_pharma_fnc_fluid; - * - * Public: No - */ - -params ["_patient", "_ph", "_coagulation"]; - -[QGVAR(fluidLocal),[ _patient, _ph, _coagulation], _patient] call CBA_fnc_targetEvent; diff --git a/addons/pharma/functions/fnc_fluidLocal.sqf b/addons/pharma/functions/fnc_fluidLocal.sqf deleted file mode 100644 index e2609a96e..000000000 --- a/addons/pharma/functions/fnc_fluidLocal.sqf +++ /dev/null @@ -1,28 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: 2LT.Mazinski - * Locally changes a patient's PH value - * - * Arguments: - * 0: Patient - * 1: pH value - * 2: Coagulation factors value - * - * Return Value: - * None - * - * Example: - * [player, 500, 10] call kat_pharma_fnc_fluidLocal; - * - * Public: No - */ - -params ["_patient", "_ph", "_coagulation"]; - -private _current = _patient getVariable [QGVAR(externalPh), 0]; -_patient setVariable [QGVAR(externalPh), ((_current + _ph) max 0), true]; - -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]; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_fullHealLocal.sqf b/addons/pharma/functions/fnc_fullHealLocal.sqf index 289a7c4c7..89472f49c 100644 --- a/addons/pharma/functions/fnc_fullHealLocal.sqf +++ b/addons/pharma/functions/fnc_fullHealLocal.sqf @@ -21,39 +21,70 @@ TRACE_1("fullHealLocal",_patient); /* * 0 = No IV * 1 = IO -* 2 = IV -* 3 = IV w/ Block -* 4 = IV w/ Flush +* 2 = 16g IV +* 3 = 14g IV +* 4 = 20g IV +* 7 = 16g IV w/ Block +* 8 = 14g IV w/ Block +* 9 = 20g IV w/ Block +* 10 = 16g IV w/ Flush +* 11 = 14g IV w/ Flush +* 12 = 20g IV w/ Flush +* 13 = EZ IO +* 14 = EJV */ GVAR(cardiacArrestBleedRate) = ACEGVAR(medical,const_minCardiacOutput) * EGVAR(circulation,cardiacArrestBleedRate); _patient setVariable [QGVAR(alphaAction), 1, true]; -_patient setVariable [QGVAR(IV), [0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(IV),[0,0,0,0,0,0,0,0,0,0,0,0], true]; if (GVAR(RequireInsIV) && GVAR(IVflowControl)) then { - _patient setVariable [QGVAR(IVflow), [0,0,0,0,0,0], true]; + _patient setVariable [QGVAR(IVflow), [0,0,0,0,0,0,0,0,0,0,0,0], true]; } else { - _patient setVariable [QGVAR(IVflow), [1,1,1,1,1,1], true]; + _patient setVariable [QGVAR(IVflow), [1,1,1,1,1,1,1,1,1,1,1,1], true]; +}; +if (GVAR(RequireInsIV)) then { + _patient setVariable [QGVAR(IVrate), [0,0,0,0,0,0,0,0,0,0,0,0], true]; +} else { + _patient setVariable [QGVAR(IVrate), [1,1,1,1,1,1,1,1,1,1,1,1], true]; }; -_patient setVariable [QGVAR(IVpfh), [0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(IVincomingFlowAmount), [0,0,0,0,0,0,0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0], true]; _patient setVariable [QGVAR(active), false, true]; _patient setVariable [QGVAR(IVPharma_PFH), nil, true]; - +_patient setVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(pressureIVApplied), false, true]; _patient setVariable [QGVAR(IVmenuActive), false, true]; _patient setVariable [QGVAR(externalPh), 0, true]; _patient setVariable [QGVAR(pH), 0, true]; - _patient setVariable [QGVAR(opioidFactor), 0, true]; +_patient setVariable [QGVAR(opioidDepression), 0, true]; _patient setVariable [QGVAR(kidneyFail), false, true]; _patient setVariable [QGVAR(kidneyArrest), false, true]; _patient setVariable [QGVAR(kidneyPressure), false, true]; - -_patient setVariable [QGVAR(coagulationFactor), missionNamespace getVariable [QGVAR(coagulation_factor_count), 30], true]; - +_patient setVariable [QGVAR(kidneyDamage), 0, true]; +_patient setVariable [QGVAR(hemolysisPFH), -1, true]; +_patient setVariable [QGVAR(respiratoryRate), 1, true]; +_patient setVariable [QGVAR(heartContractility), 1, true]; +_patient setVariable [QGVAR(nauseaMult), 1, true]; +_patient setVariable [QGVAR(medicationEffectivness), [_patient] call FUNC(generateMedicationEffectivness), true]; +_patient setVariable [QGVAR(occludedCAMedications), [], true]; +_patient setVariable [QGVAR(occludedBlockMedications), [], true]; +_patient setVariable [VAR_LOCAL_ANESTHESIA, DEFAULT_LOCAL_ANESTHESIA, true]; +_patient setVariable [QGVAR(activeEtomidateLoadingDose), false, true]; +_patient setVariable [QGVAR(serumCalcium), 2.4, true]; +_patient setVariable [QGVAR(calciumDamage), 0, true]; +_patient setVariable [QGVAR(externalCa), 0, true]; +_patient setVariable [QGVAR(calciumVasoMult), 1, true]; +_patient setVariable [QGVAR(effectiveCalcium), 1, true]; +_patient setVariable [QGVAR(lastArrhythmia), -1000, true]; +_patient setVariable [QGVAR(prevCalcium), 0, true]; +_patient setVariable [QGVAR(kidneyFailTimer), 0, true]; +_patient setVariable [QGVAR(acidRepo), 1.0, true]; /// Clear Stamina & weapon sway if (ACEGVAR(advanced_fatigue,enabled)) then { ["kat_PDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); diff --git a/addons/pharma/functions/fnc_generateMedicationEffectivness.sqf b/addons/pharma/functions/fnc_generateMedicationEffectivness.sqf new file mode 100644 index 000000000..87bd151a6 --- /dev/null +++ b/addons/pharma/functions/fnc_generateMedicationEffectivness.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Generates blood type for player according to settings + * + * Arguments: + * 0: Player + * 1: Dead body + * + * Return Value: + * Blood type + * + * Example: + * [unit, body] call kat_circulation_fnc_generateBloodType; + * + * Public: No + */ +params ["_unit"]; + +private _defaultMedEffectivness = 1; +private _playerdefaultMedEffectivness = _unit getVariable [QGVAR(medicationEffectivness), _defaultMedEffectivness]; + +if (isMultiplayer) then { + private _id = parseNumber (getPlayerUID _unit select [15, 2]); + + switch (true) do { + case (0 <= _id && _id <= 5): {_defaultMedEffectivness = 0.9}; + case (6 <= _id && _id <= 10): {_defaultMedEffectivness = 0.91}; + case (11 <= _id && _id <= 15): {_defaultMedEffectivness = 0.92}; + case (16 <= _id && _id <= 20): {_defaultMedEffectivness = 0.93}; + case (21 <= _id && _id <= 25): {_defaultMedEffectivness = 0.94}; + case (26 <= _id && _id <= 30): {_defaultMedEffectivness = 0.95}; + case (31 <= _id && _id <= 35): {_defaultMedEffectivness = 0.96}; + case (36 <= _id && _id <= 40): {_defaultMedEffectivness = 0.97}; + case (41 <= _id && _id <= 45): {_defaultMedEffectivness = 0.98}; + case (46 <= _id && _id <= 50): {_defaultMedEffectivness = 0.99}; + case (51 <= _id && _id <= 55): {_defaultMedEffectivness = 1}; + case (56 <= _id && _id <= 60): {_defaultMedEffectivness = 1.02}; + case (61 <= _id && _id <= 65): {_defaultMedEffectivness = 1.04}; + case (66 <= _id && _id <= 70): {_defaultMedEffectivness = 1.06}; + case (71 <= _id && _id <= 75): {_defaultMedEffectivness = 1.08}; + case (76 <= _id && _id <= 80): {_defaultMedEffectivness = 1.1}; + case (81 <= _id && _id <= 85): {_defaultMedEffectivness = 1.12}; + case (86 <= _id && _id <= 90): {_defaultMedEffectivness = 1.14}; + case (91 <= _id && _id <= 95): {_defaultMedEffectivness = 1.16}; + case (96 <= _id && _id <= 99): {_defaultMedEffectivness = 1.18}; + default {_defaultMedEffectivness = 1.00}; + }; + } else { + _defaultMedEffectivness = _playerdefaultMedEffectivness; + }; +_defaultMedEffectivness; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_getBloodVolumeChange.sqf b/addons/pharma/functions/fnc_getBloodVolumeChange.sqf index ad21e6d65..a064bc9ff 100644 --- a/addons/pharma/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/pharma/functions/fnc_getBloodVolumeChange.sqf @@ -19,40 +19,94 @@ params ["_unit", "_deltaT", "_syncValues"]; -private _bloodLoss = [_unit] call ACEFUNC(medical_status,getBloodLoss); +private _bloodLoss = GET_BLOOD_LOSS(_unit); private _internalBleeding = GET_INTERNAL_BLEEDING(_unit); -private _lossVolumeChange = (-_deltaT * ((_bloodLoss + _internalBleeding * (GET_HEART_RATE(_unit) / DEFAULT_HEART_RATE)) / GET_VASOCONSTRICTION(_unit))); +private _bloodPressure = GET_BLOOD_PRESSURE(_unit); +_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; +private _map = GET_MAP(_unit); +private _correctedMap = linearConversion [14.3333, 174.3333, _map, 0.05, 2, true]; +TRACE_3("correctedMAP",_correctedMap,_map,_bloodPressure); +private _heartRate = GET_HEART_RATE(_unit); +private _lossVolumeChange = (-_deltaT * (((_bloodLoss + _internalBleeding) * (GET_HEART_RATE(_unit) / (_unit getVariable [QEGVAR(circulation,defaultHeartRate), 80])) * _correctedMap * (((GET_BODY_FLUID_ECP(_unit)/GET_BODY_FLUID_ECB(_unit)) / (DEFAULT_ECP/DEFAULT_ECB))) min 2) / GET_VASOCONSTRICTION(_unit))); private _enableFluidShift = EGVAR(vitals,enableFluidShift); private _fluidVolume = GET_BODY_FLUID(_unit); -_fluidVolume params ["_ECB","_ECP","_SRBC","_ISP","_fullVolume"]; +TRACE_4("gbvc",_internalBleeding,_bloodLoss,_heartRate,_lossVolumeChange); +_fluidVolume params ["_ECB","_ECP","_SRBC","_ISP","_fullVolume","_platelets"]; _ECP = (_ECP + (_lossVolumeChange * LITERS_TO_ML) / 2) max 100; _ECB = (_ECB + (_lossVolumeChange * LITERS_TO_ML) / 2) max 100; - -if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { +_platelets = (_platelets + ((_lossVolumeChange * LITERS_TO_ML) / 10)) max 0; +if (count (_unit getVariable [QACEGVAR(medical,ivBags), []]) > 0) then { private _bloodBags = _unit getVariable [QACEGVAR(medical,ivBags), []]; - private _IVarray = _unit getVariable [QGVAR(IV), [0,0,0,0,0,0]]; - private _flowCalculation = (ACEGVAR(medical,ivFlowRate) * _deltaT * 4.16); + private _IVarray = _unit getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _flowCalculation = (ACEGVAR(medical,ivFlowRate) * _deltaT * 3.16); private _hypothermia = EGVAR(hypothermia,hypothermiaActive); - - if (GET_HEART_RATE(_unit) < 20) then { - _flowCalculation = _flowCalculation / 1.5; - }; - - private _incomingVolumeChange = [0,0,0,0,0,0]; - private _fluidWarmer = _unit getVariable [QEGVAR(hypothermia,fluidWarmer), [0,0,0,0,0,0]]; + private _vasoconstriction = GET_VASOCONSTRICTION(_unit); + private _incomingFlowAmount = [0,0,0,0,0,0,0,0,0,0,0,0]; + private _incomingVolumeChange = [0,0,0,0,0,0,0,0,0,0,0,0]; + private _fluidWarmer = _unit getVariable [QEGVAR(hypothermia,fluidWarmer), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _fluidHeat = 0; _bloodBags = _bloodBags apply { - _x params ["_bagVolumeRemaining", "_type", "_bodyPart", "_treatment", "_rateCoef", "_item"]; + _x params ["_bagVolumeRemaining", "_type", "_bodyPart", "_treatment", "_rateCoef", "_item", "_plateletAmount", "_phChange", "_caChange", "_uuid"]; private _tourniquets = GET_TOURNIQUETS(_unit); + private _occlusionMap = [ + [4, [4, 5]], + [5, [5]], + [6, [6, 7]], + [7, [7]], + [8, [8, 9, 3]], + [9, [9, 3]], + [10, [10, 11, 3]], + [11, [11, 3]] + ]; - if ((_tourniquets select _bodyPart isEqualTo 0) && (_IVarray select _bodyPart isNotEqualTo 3)) then { - private _IVflow = _unit getVariable [QGVAR(IVflow), [0,0,0,0,0,0]]; - private _bagChange = (_flowCalculation * (_IVflow select _bodyPart)) min _bagVolumeRemaining; // absolute value of the change in miliLiters + private _idx = _occlusionMap findIf { _x#0 == _bodyPart }; + private _result = if (_idx != -1) then { _occlusionMap select _idx select 1 } else { [] }; + private _isOccluded = ({ _tourniquets select _x != 0 } count _result > 0) && (_IVarray select _bodyPart isNotEqualTo 13); + if ((!_isOccluded) && ([7,8,9,15] find (_IVarray select _bodyPart) == -1)) then { + if (_type in ["Blood", "Saline", "Plasma", "Ringers Lactate", "PackedRBC", "Hypertonic Saline", "Hextend", "FBTK_500", "FBTK_250"]) then { + private _IVflow = _unit getVariable [QGVAR(IVflow), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _IVrate = _unit getVariable [QGVAR(IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _pressureBag = _unit getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; + if ((GET_HEART_RATE(_unit) < 20) && ((_IVarray select _bodyPart) != 14) && ((_pressureBag select _bodyPart) == 0)) then { + _flowCalculation = _flowCalculation * 0.2; + }; + if ((_unit getVariable [QACEGVAR(medical,CPR_provider), objNull]) != objNull) then { + _flowCalculation = _flowCalculation * 0.6; + }; + private _bagChange = 0; + if (_type in ["Blood", "Saline", "Plasma", "Ringers Lactate", "PackedRBC", "Hypertonic Saline", "Hextend"]) then { + _bagChange = (_flowCalculation * (_IVflow select _bodyPart) * (_IVrate select _bodyPart) * (1 + (_pressureBag select _bodyPart)) * _rateCoef) min _bagVolumeRemaining; // absolute value of the change in miliLiters + if ((_IVarray select _bodyPart) in [2,3,4,10,11,12]) then { + _bagChange = _bagChange * ((2 - _vasoconstriction) max 0.2); + }; _bagVolumeRemaining = _bagVolumeRemaining - _bagChange; - + _incomingFlowAmount set [_bodyPart, ((_incomingFlowAmount select _bodyPart) + _bagChange)]; + _unit setVariable [QGVAR(IVincomingFlowAmount), _incomingFlowAmount, true]; + _totalFlow = 0; + { + _totalFlow = _totalFlow + _x; + } forEach _incomingFlowAmount; + TRACE_8("IV",_bagChange,_IVrate,_IVflow,_IVarray,_isOccluded,_rateCoef,_flowCalculation,_bodyPart); + TRACE_2("IV2",_bagVolumeRemaining,_incomingFlowAmount); + if ((GVAR(LimbIVComplications)) && ((((_incomingFlowAmount select _bodyPart) max 0.01) / ((_IVrate select _bodyPart) max 0.01)) > (5 * ((2 - _vasoconstriction) max 0.2))) && ((random 100) < 20)) then { + private _incomingFlowDifference = (_incomingFlowAmount select _bodyPart) - (5 * ((2 - _vasoconstriction) max 0.2)); + [_unit, _bodyPart, _incomingFlowDifference] call FUNC(handleLimbIVComplications)}; + if (GVAR(IVComplications)) then { + private _hr = GET_HEART_RATE(_unit); + private _bp = GET_BLOOD_PRESSURE(_unit) select 0; + private _lungCondition = (_unit getVariable [QEGVAR(breathing,lungSurfaceArea), 400]); + private _riskCoef = 1; + if (_hr < 50) then {_riskCoef = _riskCoef * (linearConversion [50, 30, _hr, 1, 1.5, true])}; + if (_bp < 90) then {_riskCoef = _riskCoef * (linearConversion [90, 50, _bp, 1, 1.5, true])}; + if (_lungCondition < 350) then {_riskCoef = _riskCoef * (linearConversion [350, 150, _lungCondition, 1, 1.5, true])}; + private _maxSafeFlow = (20 * ((2 - _vasoconstriction) max 0.2)) / _riskCoef; + if (_totalFlow > _maxSafeFlow) then { + [_unit, (_totalFlow - _maxSafeFlow)] call FUNC(handleIVComplications) + }; + }; 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 { @@ -61,33 +115,233 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { _incomingVolumeChange set [_bodyPart, ((_incomingVolumeChange select _bodyPart) - _bagChange)]; }; }; - - // Plasma adds to ECP. Saline splits between the ECP and ISP. Blood adds to ECB + if ((_type == "Blood") && (_bagChange > 1)) then { + if !([_unit, _treatment] call EFUNC(circulation,compatible)) then { + private _medCount = [_unit, "BloodPoisoning"] call ACEFUNC(medical_status,getMedicationCount) select 1; + if (_medCount < 0.05) then { + [_unit, "BloodPoisoning", 0, 30, 0, 0, 0, 0, 0, 0, 0, 0.2, 0.3, 0, 0, "false", "false", "true"] call EFUNC(vitals,addMedicationAdjustment); + }; + private _hasPFH = _unit getVariable [QGVAR(hemolysisPFH), -1] isNotEqualTo -1; + if !(_hasPFH) then { + private _hemolysisPFH = [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _medCount = [_unit, "BloodPoisoning"] call ACEFUNC(medical_status,getMedicationCount) select 1; + if ((_medCount == 0) || !(alive _unit)) exitWith { + _unit setVariable [QGVAR(hemolysisPFH), -1, true]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _bloodlevels = GET_BODY_FLUID(_unit); + _bloodlevels set [0, ((_bloodlevels select 0) - 8) max 0]; + _bloodlevels set [1, ((_bloodlevels select 1) + 8) max 0]; + _bloodlevels set [5, ((_bloodlevels select 5) - 3) max 0]; + _unit setVariable [QEGVAR(circulation,bodyFluid), _bloodlevels, true]; + }, 1, [_unit]] call CBA_fnc_addPerFrameHandler; + _unit setVariable [QGVAR(hemolysisPFH), _hemolysisPFH, true]; + }; + }; + }; + // Plasma adds to ECP. Saline splits between the ECP and ISP. Blood adds to ECB/ECP + if GVAR(kidneyAction) then { + private _ph = _unit getVariable [QGVAR(externalPh), 0]; + private _ph = (_ph + (_phChange * _bagChange)); + _unit setVariable [QGVAR(externalPh), _ph, true]; + private _ca = _unit getVariable [QGVAR(externalCa), 0]; + private _ca = (_ca + (_caChange * _bagChange)); + _unit setVariable [QGVAR(externalCa), _ca, true]; + }; + } else { + _bagChange = (_flowCalculation * (_IVrate select _bodyPart) * _rateCoef); // absolute value of the change in miliLiters + if ((_IVarray select _bodyPart) in [2,3,4,10,11,12]) then { + _bagChange = _bagChange * ((2 - _vasoconstriction) max 0.2); + }; + }; switch (true) do { - case(_type == "Plasma"): { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; - case(_type == "Saline"): { + case(_type == "Plasma"): { + _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0;}; + + case(_type == "Saline"): { if (_enableFluidShift) then { - _ECP = _ECP + _bagChange / 2; - _ISP = _ISP + _bagChange / 2; + _ECP = _ECP + _bagChange / 2; + _ISP = _ISP + _bagChange / 2; _lossVolumeChange = _lossVolumeChange + (_bagChange / 2000); } else { - _ECP = _ECP + _bagChange; + { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; + }; + private _salineFlow = _unit getVariable [QEGVAR(brain,salineFlow), 0]; + _unit setVariable [QEGVAR(brain,salineFlow), _salineFlow + _bagChange, true]; + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + case(_type == "Ringers Lactate"): { + if (_enableFluidShift) then { + _ECP = _ECP + _bagChange * 0.75; + _ISP = _ISP + _bagChange * 0.25; + _lossVolumeChange = _lossVolumeChange + (_bagChange / 2000); + } else { + { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; + }; + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + case(_type == "Blood"): { + _ECB = _ECB + _bagChange / 2; + _ECP = _ECP + _bagChange / 2; + _lossVolumeChange = _lossVolumeChange + (_bagChange / 2000); + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + case(_type == "PackedRBC"): { + private _plasma = (_fluidVolume select 1); + private _ph = GET_PH(_unit); + if ((_plasma >= 2000) && (_ph > 6.8) && (_ph < 8)) then { + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + if (_plasma >= 2000) then { + _ECB = _ECB + (_bagChange * 1.5); + _lossVolumeChange = _lossVolumeChange + ((_bagChange * 1.5) / ML_TO_LITERS); + } else { + _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; }; - case(_type == "Blood"): { _ECB = _ECB + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; + case(_type == "Hypertonic Saline"): { + if (_enableFluidShift) then { + private _shiftVolume = (_bagChange / 1.5); + _shiftVolume = _shiftVolume min _ISP; + _ISP = _ISP - _shiftVolume; + _ECP = _ECP + _shiftVolume; + _ECP = _ECP + (_bagChange - _shiftVolume); + + _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); + } else { + { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; + }; + private _salineFlow = _unit getVariable [QEGVAR(brain,salineFlow), 0]; + _unit setVariable [QEGVAR(brain,salineFlow), _salineFlow + (_bagChange * 3), true]; + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + case(_type == "Hextend"): { + _ECP = _ECP + (_bagChange * 1.5); + _lossVolumeChange = _lossVolumeChange + ((_bagChange * 1.5) / ML_TO_LITERS); + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + case(_type == "Platelets"): { + _ECP = _ECP + (_bagChange * 0.5); + _lossVolumeChange = _lossVolumeChange + ((_bagChange * 0.5) / ML_TO_LITERS); + _platelets = (_platelets + (_plateletAmount * _bagChange)) max 0; + }; + case(_type == "FBTK_250"): { + if (_bagVolumeRemaining < 250) then { + _bagVolumeRemaining = (_bagVolumeRemaining + _bagChange) min 250; + _ECB = _ECB - _bagChange / 2; + _ECP = _ECP - _bagChange / 2; + _platelets = _platelets - (0.1 * _bagChange); + _lossVolumeChange = _lossVolumeChange - (_bagChange / ML_TO_LITERS); + }; + }; + case(_type == "FBTK_500"): { + if (_bagVolumeRemaining < 500) then { + _bagVolumeRemaining = (_bagVolumeRemaining + _bagChange) min 500; + _ECB = _ECB - _bagChange / 2; + _ECP = _ECP - _bagChange / 2; + _platelets = _platelets - (0.1 * _bagChange); + _lossVolumeChange = _lossVolumeChange - (_bagChange / ML_TO_LITERS); + }; + }; }; - }; + + private _damageAmount = [_unit,_idx] call EFUNC(hitpoints,damageAmount); + if ((_damageAmount > GVAR(ivLeakageThreshold)) && GVAR(ivCheckLimbDamage)) then { + _lostFluids = linearConversion [GVAR(ivLeakageThreshold), 50, _damageAmount, 1, 0, true]; + _ECP = _ECB * _lostFluids; + _ECP = _ECP * _lostFluids; + _platelets = _platelets * _lostFluids; + _ISP = _ISP * _lostFluids; + }; + } else { + private _IVflow = _unit getVariable [QGVAR(IVflow), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _IVrate = _unit getVariable [QGVAR(IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _bagChange = (_flowCalculation * (_IVflow select _bodyPart) * (_IVrate select _bodyPart) * _rateCoef) min _bagVolumeRemaining; + private _medicationMult = ((_flowCalculation * (_IVflow select _bodyPart) * (_IVrate select _bodyPart) * _rateCoef)) ; + _bagVolumeRemaining = _bagVolumeRemaining - _bagChange; + _incomingFlowAmount set [_bodyPart, ((_incomingFlowAmount select _bodyPart) + _bagChange)]; + _unit setVariable [QGVAR(IVincomingFlowAmount), _incomingFlowAmount, true]; + private _defaultHeartRate = _unit getVariable [QEGVAR(circulation,defaultHeartRate), 80]; + private _heartRateRatio = GET_HEART_RATE(_unit) / _defaultHeartRate; + private _hemocrit = 1; + private _hemocrit = (GET_BODY_FLUID_ECP(_unit)/GET_BODY_FLUID_ECB(_unit)) / (DEFAULT_ECP/DEFAULT_ECB); + private _drugMult = (((((GET_BLOOD_VOLUME_LITERS(_unit))/ DEFAULT_BLOOD_VOLUME) * (_heartRateRatio) * _hemocrit) max 0.2) min 2.5); + private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "IV"; + private _ivConfig = _defaultConfig >> _treatment; + private _painReduce = (GET_NUMBER(_ivConfig >> "painReduce",getNumber (_defaultConfig >> "painReduce")) * _medicationMult) * _drugMult; + private _timeInSystem = (GET_NUMBER(_ivConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem")) * _medicationMult) * _drugMult; + private _timeTillMaxEffect = (GET_NUMBER(_ivConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect")) * _medicationMult) * _drugMult; + private _viscosityChange = (GET_NUMBER(_ivConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange")) * _medicationMult) * _drugMult; + private _hrIncreaseLow = GET_ARRAY(_ivConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow")); + private _hrIncreaseNormal = GET_ARRAY(_ivConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal")); + private _hrIncreaseHigh = GET_ARRAY(_ivConfig >> "hrIncreaseHigh",getArray (_defaultConfig >> "hrIncreaseHigh")); + private _alphaFactor = (GET_NUMBER(_ivConfig >> "alphaFactor",getNumber (_defaultConfig >> "alphaFactor")) * _medicationMult) * _drugMult; + private _maxRelief = (GET_NUMBER(_ivConfig >> "maxRelief",getNumber (_defaultConfig >> "maxRelief")) * _medicationMult) * _drugMult; + private _opioidRelief = (GET_NUMBER(_ivConfig >> "opioidRelief",getNumber (_defaultConfig >> "opioidRelief")) * _medicationMult) * _drugMult; + private _opioidEffect = (GET_NUMBER(_ivConfig >> "opioidEffect",getNumber (_defaultConfig >> "opioidEffect")) * _medicationMult) * _drugMult; + private _dose = (GET_NUMBER(_ivConfig >> "dose",getNumber (_defaultConfig >> "dose")) * _medicationMult) * _drugMult; + private _respiratoryRate = (GET_NUMBER(_ivConfig >> "respiratoryRate",getNumber (_defaultConfig >> "respiratoryRate")) * _medicationMult) * _drugMult; + private _opioidDepression = (GET_NUMBER(_ivConfig >> "opioidDepression",getNumber (_defaultConfig >> "opioidDepression")) * _medicationMult) * _drugMult; + private _contractility = (GET_NUMBER(_ivConfig >> "contractility",getNumber (_defaultConfig >> "contractility"))* _medicationMult) * _drugMult; + private _nauseaMult = (GET_NUMBER(_ivConfig >> "nauseaMult",getNumber (_defaultConfig >> "nauseaMult")) * _medicationMult) * _drugMult; + private _heartRate = GET_HEART_RATE(_unit); + private _hrIncrease = [_hrIncreaseLow, _hrIncreaseNormal, _hrIncreaseHigh] select (floor ((0 max _heartRate min 110) / 55)); + _hrIncrease params ["_minIncrease", "_maxIncrease"]; + private _heartRateChange = ((_minIncrease + random (_maxIncrease - _minIncrease)) * _medicationMult) * _drugMult; + + private _presentPain = GET_PAIN(_unit); + private _presentReduce = 0; + if (_maxRelief > 0) then { + if (_presentPain > _maxRelief) then { + _painReduce = _painReduce / 4; + }; + }; + private _medicationName = (_type splitString "_") select 0; + TRACE_6("adjustments1",_unit,_medicationName,_timeTillMaxEffect,_timeInSystem,_heartRateChange,_painReduce); + TRACE_7("adjustments2",_viscosityChange,_dose,_alphaFactor,_opioidRelief,_opioidEffect,_opioidDepression,_respiratoryRate); + + [_unit, _medicationName, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate, _contractility, _nauseaMult] call EFUNC(vitals,addMedicationAdjustment); + [_unit, _medicationName] call ACEFUNC(medical_treatment,onMedicationUsage); - if (_bagVolumeRemaining < 0.01) then { + 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 GVAR(kidneyAction) then { + private _ph = _unit getVariable [QGVAR(externalPh), 0]; + private _ph = (_ph + (_phChange * _bagChange)); + _unit setVariable [QGVAR(externalPh), _ph, true]; + }; + 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); + }; + private _damageAmount = [_unit,_idx] call EFUNC(hitpoints,damageAmount); + if ((_damageAmount > GVAR(ivLeakageThreshold)) && GVAR(ivCheckLimbDamage)) then { + _lostFluids = linearConversion [GVAR(ivLeakageThreshold), 50, _damageAmount, 1, 0, true]; + _ECP = _ECP * _lostFluids; + _ISP = _ISP * _lostFluids; + }; + }; + }; + if ((_bagVolumeRemaining < 0.01) && (_type isNotEqualTo "FBTK")) then { [] } else { - [_bagVolumeRemaining, _type, _bodyPart, _treatment, _rateCoef, _item] - }; + [_bagVolumeRemaining, _type, _bodyPart, _treatment, _rateCoef, _item, _plateletAmount, _phChange, _caChange, _uuid] + }; }; - _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) } else { @@ -106,46 +360,58 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { _unit setVariable [QEGVAR(hypothermia,warmingImpact), _totalCooling + _fluidHeat, _syncValues]; }; }; +} else { + _unit setVariable [QGVAR(IVincomingFlowAmount), [0,0,0,0,0,0,0,0,0,0,0,0], true]; + _unit setVariable [QEGVAR(brain,salineFlow), 0, true]; }; - -// Movement and recovery of interstital fluid and SRBC collection private _SRBCChange = 0; -if (_enableFluidShift) then { - private _shiftValue = 0; - private _defaultShift = false; +if (_enableFluidShift && ((_ECP + _ECB) > 4600)) then { + private _srbcRate = 0; + if ((_SRBC > 0) && (_ECB < DEFAULT_ECB)) then { + _srbcRate = linearConversion [ + DEFAULT_ECB * 0.7, + DEFAULT_ECB, + _ECB, + 0.05, + 0.3, + true + ]; + }; + private _srbcShift = _srbcRate min _SRBC; + _SRBC = _SRBC - _srbcShift; + _ECB = _ECB + _srbcShift; + private _intravascularVol = _ECB + _ECP; + private _targetRatio = 0.6; - _SRBCChange = [0, 0.5] select ((_SRBC > 0) && (_ECB < DEFAULT_ECB)); - _ECB = _ECB + (_SRBCChange * _deltaT); - _SRBC = _SRBC - (_SRBCChange * _deltaT); + private _currentRatio = + _intravascularVol / ((_ISP max 1)); + private _drive = + (_targetRatio - _currentRatio); - switch (true) do { - case (((_ECB + _ECP) > (_ISP * 0.6)) && ((_ECB + _ECP) > 4500)): { - // Negative shifts only happen above 4500ml of blood volume, to prevent patients from falling back into arrest/unconsciousness - _shiftValue = (1 min ((_ECP + _ECB) - (_ISP * 0.6))) * _deltaT; + private _mapCoef = + linearConversion [40, 100, _map, 0.3, 1.2, true]; - _ECP = _ECP - _shiftValue; - _ISP = _ISP + _shiftValue; - }; - case ((_ECB + _ECP) < (_ISP * 0.6)): { - _shiftValue = (1 min ((_ISP * 0.6) - (_ECP + _ECB))) *_deltaT; + private _maxRecruit = 1.5; // ISP → ECP + private _maxLeak = 0.4; // ECP → ISP (slower) - if (_shiftValue < 0.1) exitWith { _defaultShift = true; }; + private _shiftRate = + _drive + * _mapCoef + * ([_maxLeak, _maxRecruit] select (_drive > 0)); - _ECP = _ECP + _shiftValue; - _ISP = _ISP - _shiftValue; - }; - default { - _defaultShift = true; - }; + private _shiftVolume = + (_shiftRate * _deltaT) + min (_ISP max 0); + private _icp = GET_ICP(_unit); + if (_icp > 20) then { + _shiftVolume = _shiftVolume * 0.7; }; + _ISP = _ISP - _shiftVolume; + _ECP = _ECP + _shiftVolume; - if (_defaultShift) then { - _ISP = _ISP + ((((DEFAULT_ISP - _ISP) max -2) min 2) *_deltaT); - _SRBC = _SRBC + ((((DEFAULT_SRBC - _SRBC) max -1) min 1) * _deltaT); - }; }; -_unit setVariable [QEGVAR(circulation,bodyFluid), [_ECB, _ECP, _SRBC, _ISP, (_ECP + _ECB)], _syncValues]; - +_unit setVariable [QEGVAR(circulation,bodyFluid), [_ECB, _ECP, _SRBC, _ISP, (_ECP + _ECB), _platelets], _syncValues]; +TRACE_3("bloodLoss",_ECB,_ECP,(_ECP + _ECB)); ((_lossVolumeChange + GET_BLOOD_VOLUME_LITERS(_unit)) max 0.01) diff --git a/addons/pharma/functions/fnc_gui_updateBodyImage.sqf b/addons/pharma/functions/fnc_gui_updateBodyImage.sqf index 74c4cfc9a..38433c2fd 100644 --- a/addons/pharma/functions/fnc_gui_updateBodyImage.sqf +++ b/addons/pharma/functions/fnc_gui_updateBodyImage.sqf @@ -23,12 +23,22 @@ private _ctrlIVLeftArm = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTARM_IV; private _ctrlIVRightArm = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM_IV; private _ctrlIVLeftLeg = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTLEG_IV; private _ctrlIVRightLeg = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTLEG_IV; +private _ctrlIOLeftArm = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTARM_IO; +private _ctrlIORightArm = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM_IO; +private _ctrlIOLeftLeg = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTLEG_IO; +private _ctrlIORightLeg = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTLEG_IO; private _ctrlIO = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_IO; +private _ctrlEJV = _ctrlGroup controlsGroupCtrl IDC_BODY_NECK_EJV; -private _IVArray = _target getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVArray = _target getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _indicesToCheck = [4, 5, 6, 7, 8, 9, 10, 11]; +private _controls = [_ctrlIVLeftArm, _ctrlIOLeftArm, _ctrlIVRightArm, _ctrlIORightArm, _ctrlIOLeftLeg, _ctrlIVLeftLeg, _ctrlIORightLeg, _ctrlIVRightLeg]; { - switch (_IVArray select (_forEachIndex + 2)) do { + private _index = _indicesToCheck select _forEachIndex; + private _value = _IVArray select _index; + + switch (_value) do { case 0: { _x ctrlShow false; }; @@ -36,10 +46,17 @@ private _IVArray = _target getVariable [QGVAR(IV), [0,0,0,0,0,0]]; _x ctrlShow true; }; }; -} forEach [_ctrlIVLeftArm, _ctrlIVRightArm, _ctrlIVLeftLeg, _ctrlIVRightLeg]; +} forEach _controls; -if ((_IVArray select 1) isEqualTo 1) then { +if ((_IVArray select 2) isEqualTo 1) then { _ctrlIO ctrlShow true; } else { _ctrlIO ctrlShow false; }; + +if ((_IVArray select 1) == 14) then { + _ctrlEJV ctrlShow true; +} else { + _ctrlEJV ctrlShow false; +}; + diff --git a/addons/pharma/functions/fnc_gui_updateInjuryListPart.sqf b/addons/pharma/functions/fnc_gui_updateInjuryListPart.sqf index 91ea65d69..e85b47bc4 100644 --- a/addons/pharma/functions/fnc_gui_updateInjuryListPart.sqf +++ b/addons/pharma/functions/fnc_gui_updateInjuryListPart.sqf @@ -20,13 +20,59 @@ params ["_ctrl", "_target", "_selectionN", "_entries"]; -private _placed = _target getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _placed = _target getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _placed select _selectionN; if (_IVactual > 0) then { - if (_IVactual == 1) then { - _entries pushBack [LLSTRING(IO_45_Display), [0.3, 0.6, 0.3, 1]]; + switch (_IVactual) do { + case 1: { _entries pushBack [LLSTRING(IO_45_Display), [0.3, 0.6, 0.3, 1]]}; + case 2: { _entries pushBack [LLSTRING(IV_16_Display), [0.3, 0.6, 0.3, 1]]}; + case 3: { _entries pushBack [LLSTRING(IV_14_Display), [0.3, 0.6, 0.3, 1]]}; + case 4: { _entries pushBack [LLSTRING(IV_20_Display), [0.3, 0.6, 0.3, 1]]}; + case 7: { _entries pushBack [LLSTRING(IV_16_Display), [0.3, 0.6, 0.3, 1]]}; + case 8: { _entries pushBack [LLSTRING(IV_14_Display), [0.3, 0.6, 0.3, 1]]}; + case 9: { _entries pushBack [LLSTRING(IV_20_Display), [0.3, 0.6, 0.3, 1]]}; + case 10: { _entries pushBack [LLSTRING(IV_16_Display), [0.3, 0.6, 0.3, 1]]}; + case 11: { _entries pushBack [LLSTRING(IV_14_Display), [0.3, 0.6, 0.3, 1]]}; + case 12: { _entries pushBack [LLSTRING(IV_20_Display), [0.3, 0.6, 0.3, 1]]}; + case 13: { _entries pushBack [LLSTRING(EZ_IO_Display), [0.3, 0.6, 0.3, 1]]}; + case 14: { _entries pushBack [LLSTRING(EJV_InjuryDisplay), [0.3, 0.6, 0.3, 1]]}; + case 15: { _entries pushBack [LLSTRING(ivSiteBlown), [1, 0, 0, 1]]}; + default {}; + }; +}; + +private _fentPatchArray = _target getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _hasPatch = _fentPatchArray findIf { _x > 0 } != -1; +if (_hasPatch) then { + if ((_fentPatchArray select _selectionN > 0)) then { + switch (true) do { + case (_fentPatchArray select _selectionN > 0.8): { + _entries pushBack [LLSTRING(FentPatchFull_MEDDisplay), [0.73, 0.24, 0.11, 1]]; + }; + case (_fentPatchArray select _selectionN > 0.5): { + _entries pushBack [LLSTRING(FentPatchPartial_MEDDisplay), [0.73, 0.24, 0.11, 1]]; + }; + case (_fentPatchArray select _selectionN > 0.3): { + _entries pushBack [LLSTRING(FentPatchWeak_MEDDisplay), [0.73, 0.24, 0.11, 1]]; + }; + case (_fentPatchArray select _selectionN > 0.1): { + _entries pushBack [LLSTRING(FentPatchWeak_MEDDisplay), [0.73, 0.24, 0.11, 1]]; + }; + }; } else { - _entries pushBack [LLSTRING(IV_16_Display), [0.3, 0.6, 0.3, 1]]; + _entries pushBack [LLSTRING(FentPatch_MEDDisplay), [0.73, 0.24, 0.11, 1]]; + }; +}; + +private _damageAmount = [_target,_selectionN] call EFUNC(hitpoints,damageAmount); +if ((_damageAmount > GVAR(ivLeakageThreshold)) && GVAR(ivCheckLimbDamage) && (_IVactual in [2,3,4,5,6,7,8,9,10,11,12])) then { + _lostFluids = linearConversion [GVAR(ivLeakageThreshold), 50, _damageAmount, 1, 0, true]; + if (_lostFluids < 0.8) then { + _entries pushBack [LLSTRING(ivSiteCompromised), [1, 0, 0, 1]]; }; -}; \ No newline at end of file +}; + +if (_target getVariable [QGVAR(dialysisRunning), false]) then { + _entries pushBack [LLSTRING(activeDialysis), [1, 1, 1, 1]]; +}; diff --git a/addons/pharma/functions/fnc_handleIVComplications.sqf b/addons/pharma/functions/fnc_handleIVComplications.sqf new file mode 100644 index 000000000..9973cd9ad --- /dev/null +++ b/addons/pharma/functions/fnc_handleIVComplications.sqf @@ -0,0 +1,37 @@ +#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", "_overLoad"]; + +_trali = _patient getVariable [QEGVAR(breathing,TRALI), 0]; +_trali = _trali + (0.1 *_overLoad); +if ((_trali > (20 + random 10)) && (random 100 < 25)) then { + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "TRALI"}) == -1) then { + _ht pushBack "TRALI"; + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }; +}; +_patient setVariable [QEGVAR(breathing,TRALI), _trali, true]; +private _surface = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]); +if (_surface > 100) then { + private _surfaceArea = _surface - (2 * _overLoad); + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea]; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_handleLimbIVComplications.sqf b/addons/pharma/functions/fnc_handleLimbIVComplications.sqf new file mode 100644 index 000000000..d98474e47 --- /dev/null +++ b/addons/pharma/functions/fnc_handleLimbIVComplications.sqf @@ -0,0 +1,83 @@ +#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", "_partIndex", "_incomingFlowDifference"]; + + private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _IVactual = _IVarray select _partIndex; + private _bodyPart = ALL_BODY_PARTS 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,retrieveIV); + }; + }; + case ((_incomingFlowDifference < 4) && (_incomingFlowDifference >= 2)): { + if (random(100) < 35) then { + [_patient, 0.3] call ACEFUNC(medical_status,adjustPainLevel); + [objNull, _patient, _bodypart] call EFUNC(pharma,retrieveIV); + }; + + if (random(100) < 10) then { + _IVarray set [_partIndex, 15]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + [objNull, _patient, _bodypart] call EFUNC(pharma,retrieveIV); + + [{ + params ["_patient", "_IVarray", "_partIndex"]; + _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; + }, [_patient, _IVarray, _partIndex], 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,retrieveIV); + }; + + if (random(100) < 30) then { + _IVarray set [_partIndex, 15]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + [objNull, _patient, _bodypart] call EFUNC(pharma,retrieveIV); + + [{ + params ["_patient", "_IVarray", "_partIndex"]; + _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; + }, [_patient, _IVarray, _partIndex], 180] call CBA_fnc_waitAndExecute; + }; + }; + case (_incomingFlowDifference >= 7): { + [_patient, 0.3] call ACEFUNC(medical_status,adjustPainLevel); + [objNull, _patient, _bodypart] call EFUNC(pharma,retrieveIV); + + _IVarray set [_partIndex, 15]; + _patient setVariable [QGVAR(IV), _IVarray, true]; + + [{ + params ["_patient", "_IVarray", "_partIndex"]; + _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; + }, [_patient, _IVarray, _partIndex], 180] call CBA_fnc_waitAndExecute; + }; + }; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_handleRespawn.sqf b/addons/pharma/functions/fnc_handleRespawn.sqf index 6c5f1e970..605465cd3 100644 --- a/addons/pharma/functions/fnc_handleRespawn.sqf +++ b/addons/pharma/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#define DEBUG_MODE_FULL #include "..\script_component.hpp" /* * Author: MiszczuZPolski @@ -19,81 +20,607 @@ params ["_unit","_dead"]; [_unit] call FUNC(fullHealLocal); +if (GVAR(kidneyAction)) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; -[{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; + if (!alive _unit) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _maxDeltaPH = 1; + private _maxDeltaLact = 0.05; + private _maxDeltaCa = 0.02; + private _maxDeltaDmg = 0.00125; + private _prev = _unit getVariable [QGVAR(prevRenalPhysio), [ + 0, + 1.2, + 2.4, + 0 + ]]; - private _alive = alive _unit; + _prev params [ + "_prevExtPH", + "_prevLact", + "_prevCa", + "_prevDmg" + ]; + private _rateLimit = { + params ["_new", "_old", "_max"]; + (_new max (_old - _max)) min (_old + _max) + }; + private _externalPh = _unit getVariable [QGVAR(externalPh), 0]; + private _ph = GET_PH(_unit); + _externalPh = (_externalPh max -300) min 300; + private _lactate = _unit getVariable [QGVAR(lactate), 1.2]; + private _sign = if (_externalPh == 0) then {1} else {_externalPh / abs _externalPh}; + private _bv = GET_BODY_FLUID_ECB(_unit); + private _hr = GET_HEART_RATE(_unit); + private _damage = _unit getVariable [QGVAR(kidneyDamage), 0]; + private _kidneyFail = _unit getVariable [QGVAR(kidneyFail), false]; + private _kidneyArrest = _unit getVariable [QGVAR(kidneyArrest), false]; + private _bicarb = [_unit, "Bicarbonate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _effectiveCa = _unit getVariable [QGVAR(effectiveCa), 2.4]; + private _bvFrac = (_bv / 2700) max 0.3 min 1; + private _shockIndex = (_hr / (_bvFrac * 100)) max 0.5 min 3; + private _kidneyFailTimer = _unit getVariable [QGVAR(kidneyFailTimer), 0]; + private _shockAcidLoad = linearConversion [1, 2, _shockIndex, 0, 0.4, true]; + private _bvAcidLoad = linearConversion [0.6, 1.0, _bvFrac, 0.3, 0, true]; + private _kidneyFrac = 1 - _damage; + _kidneyFrac = _kidneyFrac max 0.15; + if (_kidneyFail) then { + _kidneyFrac = _kidneyFrac * 0.35; + }; + private _totalShockAcid = (_shockAcidLoad + _bvAcidLoad) * 0.25; + private _bufferFrac = linearConversion [0, 300, (abs _externalPh), 1, 0.15, true]; + _bufferFrac = _bufferFrac * linearConversion [1.0, 0.5, _bvFrac, 1.0, 0.7, true]; + _totalShockAcid = _totalShockAcid * _bufferFrac; + if (_bvFrac > 0.9 && _hr < 110) then { _totalShockAcid = 0 }; + private _lactateGen = + linearConversion [1, 2.2, _shockIndex, 0.01, 0.035, true] * + linearConversion [2, 6, _lactate, 1.0, 0.4, true]; + _lactateGen = _lactateGen * linearConversion [0.4, 1.0, _bvFrac, 1.8, 1.0, true]; + if (_effectiveCa < 2.1) then { + _lactateGen = _lactateGen * + linearConversion [2.1, 1.6, _effectiveCa, 1.0, 1.6, true]; + }; + if (_effectiveCa > 3.0) then { + _lactateGen = _lactateGen * + linearConversion [3.0, 3.6, _effectiveCa, 1.0, 1.4, true]; + }; + _lactate = (_lactate + _lactateGen) min 15; + private _lactateTarget = 2.0; + if (_effectiveCa < 2.1) then { _lactateTarget = 2.8 }; + if (_effectiveCa > 3.0) then { _lactateTarget = 3.0 }; + private _lactateClear = + linearConversion [_lactateTarget, 6, _lactate, 0.015, 0.0, true] * + linearConversion [0, 0.8, _damage, 1.0, 0.4, true] * + _kidneyFrac; + if (_bvFrac > 0.9 && _hr < 110) then { + _lactateClear = _lactateClear * 1.5; + }; + _lactate = _lactate - _lactateClear; + _lactate = [_lactate, _prevLact, _maxDeltaLact] call _rateLimit; + _lactate = _lactate max 0.8; + _unit setVariable [QGVAR(lactate), _lactate, true]; + if (!_kidneyFail) then { + _externalPh = _externalPh + _totalShockAcid; + }; - if (!_alive) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; + _externalPh = _externalPh + ((_lactate * 0.0075) * _bufferFrac); + private _rr = _unit getVariable [QEGVAR(breathing,breathRate), 0]; + private _depth = _unit getVariable [VAR_RESPIRATORY_DEPTH, 0]; + private _normRR = 14; + private _normDepth = DEFAULT_RESPIRATORY_DEPTH; + private _acidRepo = _unit getVariable [QGVAR(acidRepo), 1.0]; + private _bloodVolume = GET_BLOOD_VOLUME_LITERS(_unit); + private _anerobicPressure = (DEFAULT_ANEROBIC_EXCHANGE * (6 / (_bloodVolume max 6))) min 1.2; + private _ventRatio = ((_rr max 0) * (_depth max 0)) / (_normRR * _normDepth); + if (_ph < 7.3) then { + if (_ventRatio > 1.1) then { + + private _cnsSupp = + (_unit getVariable [QEGVAR(surgery,sedated), 0]) + max (_unit getVariable [QEGVAR(pharma,opioidDepression), 0]); - private _medicationArray = _unit getVariable [QACEGVAR(medical,medications), []]; - private _action = false; + private _ventEff = + linearConversion [1.1, 3.5, _ventRatio, 0.0, 1.0, true] + * linearConversion [0, 1, _cnsSupp, 1.0, 0.4, true]; - { - _x params ["_medication"]; + private _bufferLimit = + linearConversion [0, 300, abs _externalPh, 0.15, 1.0, true]; + private _respOffgas = + 0.35 + * _ventEff + * _bufferLimit; + _respOffgas = _respOffgas * linearConversion [2, 6, _lactate, 1.0, 0.3, true]; + private _repoDrain = + linearConversion [1.0, 2.5, _ventRatio, 0.0, 0.0125, true] + * linearConversion [1.0, 1.2, _anerobicPressure, 0.6, 1.0, true]; + if (_kidneyFail) then { + _repoDrain = _repoDrain * 1.4; + }; + _acidRepo = (_acidRepo - _repoDrain) max 0; + _respOffgas = _respOffgas * _acidRepo; + _externalPh = _externalPh - (_respOffgas * _sign); + private _lactRespClear = + 0.02 * _ventEff * linearConversion [7.35, 7.55, _ph, 1.0, 0.6, true]; + _lactate = (_lactate - _lactRespClear) max 0.8; - if (_medication in ["Epinephrine", "EpinephrineIV", "Phenylephrine", "Nitroglycerin", "Lidocaine", "Norepinephrine"]) exitWith { - _action = true; + TRACE_4( + "RESP_OFFGASS", + _ventRatio, + _ventEff, + _respOffgas, + _externalPh + ); + }; + }; + if (_ventRatio < 1.1 && _anerobicPressure < 1.05) then { + _acidRepo = (_acidRepo + 0.015) min 1.0; + }; + + _unit setVariable [QGVAR(acidRepo), _acidRepo, true]; + if (_bicarb > 0) then { + private _bicarbMult = linearConversion [0, 300, abs _externalPh, 0.2, 1.0, true]; + _externalPh = _externalPh - (0.6 * (_bicarb * _bicarbMult)); + if (_bvFrac < 0.7) then { + _externalPh = _externalPh + (0.3 * (_bicarb * _bicarbMult)); + _lactate = _lactate + (0.2 * (_bicarb * _bicarbMult)); + }; + private _caBind = linearConversion [0, 6, _bicarb, 0.00, 0.04, true]; + _unit setVariable [ + QGVAR(externalCa), + (_unit getVariable [QGVAR(externalCa), 0]) + _caBind, + true + ]; + }; + if (_externalPh != 0) then { + private _clearance = + 0.125 * + _kidneyFrac * + linearConversion [0, 250, abs _externalPh, 0.8, 1.8, true] * + linearConversion [0, 0.8, _damage, 1.0, 0.4, true] + * linearConversion [1.0, 0.5, _bvFrac, 1.0, 0.4, true]; + + _externalPh = _externalPh - (_clearance * _sign); + }; + if (_effectiveCa < 1.8) then { + _externalPh = _externalPh + linearConversion [1.8, 1.5, _effectiveCa, 0.01, 0.06, true]; + }; + if (_effectiveCa > 3.2) then { + _externalPh = _externalPh + (0.025 * (1 - _bufferFrac)); + }; + _externalPh = [_externalPh, _prevExtPH, _maxDeltaPH] call _rateLimit; + _externalPh = (_externalPh max -300) min 300; + _unit setVariable [QGVAR(externalPh), _externalPh, true]; + + if (_ph < 7.25) then { + _damage = ( + _damage + + linearConversion [7.25, 6.9, _ph, 0.0004, 0.005, true] + ) min 1; }; - } forEach (_medicationArray); - if !(_action) then { - _unit setVariable [QGVAR(alphaAction), 1]; - }; -}, 180, [_unit]] call CBA_fnc_addPerFrameHandler; + if (_ph > 7.55) then { + _damage = ( + _damage + + linearConversion [7.55, 7.75, _ph, 0.00025, 0.004, true] + ) min 1; + }; + + if (_effectiveCa > 3.2) then { + private _d = (_damage + linearConversion [3.2, 3.8, _effectiveCa, 0.00025, 0.004, true]) min 1; + _damage = [_d, _prevDmg, _maxDeltaDmg] call _rateLimit; + + }; + if (_effectiveCa < 1.6) then { + private _d = (_damage + linearConversion [1.6, 1.1, _effectiveCa, 0.00025, 0.004, true]) min 1; + _damage = [_d, _prevDmg, _maxDeltaDmg] call _rateLimit; + }; + + if (_damage >= 0.7) then { + _kidneyFailTimer = _kidneyFailTimer + 5; + } else { + _kidneyFailTimer = (_kidneyFailTimer - 2) max 0; + }; + + if (_kidneyFailTimer > 600 && !_kidneyFail) then { + _unit setVariable [QGVAR(kidneyFail), true, true]; + }; + + _unit setVariable [QGVAR(kidneyFailTimer), _kidneyFailTimer, true]; + + if (_ph < 6.9 && !_kidneyArrest) then { + if (random 1 < 0.35) then { + [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; + _unit setVariable [QGVAR(kidneyArrest), true, true]; + }; + }; + + _unit setVariable [QGVAR(kidneyDamage), _damage, true]; + _unit setVariable [QGVAR(prevRenalPhysio), + [ + _externalPh, + _lactate, + _effectiveCa, + _damage + ] + ]; + }, 5, [_unit]] call CBA_fnc_addPerFrameHandler; +}; if (GVAR(kidneyAction)) then { + [{ params ["_args", "_idPFH"]; _args params ["_unit"]; - private _alive = alive _unit; - - if (!_alive) exitWith { + if (!alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - private _ph = _unit getVariable [QGVAR(externalPh), 0]; + private _maxDeltaLact = 0.15; + private _maxDeltaCa = 0.05; + private _maxDeltaDmg = 0.0025; + private _prev = _unit getVariable [QGVAR(prevCalciumPhysio), [ + 0, + 1.2, + 2.4, + 0 + ]]; + + _prev params [ + "_prevExtPH", + "_prevLact", + "_prevCa", + "_prevDmg" + ]; + + private _rateLimit = { + params ["_new", "_old", "_max"]; + (_new max (_old - _max)) min (_old + _max) + }; + private _ca = _unit getVariable [QGVAR(serumCalcium), 0]; + private _damage = _unit getVariable [QGVAR(calciumDamage), 0]; + private _ph = GET_PH(_unit); + private _bv = GET_BODY_FLUID_ECB(_unit); + private _hr = GET_HEART_RATE(_unit); + private _lactate = _unit getVariable [QGVAR(lactate), 1.2]; + private _bvFrac = (_bv / 2700) max 0.3 min 1; + private _shockIndex = (_hr / (_bvFrac * 100)) max 0.5 min 3; + private _liverDamage = _unit getVariable [QGVAR(liverDamage), 0]; + private _liverFail = _unit getVariable [QGVAR(liverFail), false]; + private _bicarb = [_unit, "Bicarbonate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _externalPh = _unit getVariable [QGVAR(externalPh), 0]; + private _caCl2 = [_unit, "CalciumChloride", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _caGlu = [_unit, "CalciumGluconate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _txa = [_unit, "TXA", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _effectiveCa = _unit getVariable [QGVAR(effectiveCa), GET_CA(_unit)]; + private _bufferFrac = linearConversion [0, 300, (abs _externalPh), 1, 0.15, true]; private _kidneyFail = _unit getVariable [QGVAR(kidneyFail), false]; - private _kidneyArrest = _unit getVariable [QGVAR(kidneyArrest), false]; - private _kidneyPressure = _unit getVariable [QGVAR(kidneyPressure), false]; - - switch true do { - case(_ph == 3000): { - if (_ph == 3000) exitWith { - _unit setVariable [QGVAR(kidneyFail), true, true]; - _unit setVariable [QGVAR(kidneyArrest), true, true]; - }; + private _kidneyDamage = _unit getVariable [QGVAR(kidneyDamage), 0]; + private _externalCa = _unit getVariable [QGVAR(externalCa), 0]; + private _kidneyFrac = 1 - _kidneyDamage; + private _sign = if (_externalCa == 0) then {1} else {_externalCa / abs _externalCa}; + TRACE_6( + "Ca INPUT", + _ca, + _effectiveCa, + _externalCa, + _ph, + _shockIndex, + _kidneyFrac +); + _kidneyFrac = _kidneyFrac max 0.15; + if (_kidneyFail) then { + _kidneyFrac = _kidneyFrac * 0.35; + }; + if (_txa > 0) then { + private _txaPerfusionBonus = + linearConversion [0, 3, _txa, 1.0, 0.85, true]; + + _shockIndex = _shockIndex * _txaPerfusionBonus; + }; + if (_shockIndex > 1.5 || {_ph < 7.15}) then { + private _injury = + linearConversion [1.5, 2.5, _shockIndex, 0.00015, 0.001, true]; + + if (_ph < 7.1) then { + _injury = _injury * 1.5; }; - case (_ph >= 2000): { - _unit setVariable [QGVAR(kidneyFail), true, true]; - if !(_kidneyArrest) then { - private _random = random 1; + _liverDamage = (_liverDamage + _injury) min 1; + }; + if (_liverDamage > 0.8 && {!_liverFail}) then { + _unit setVariable [QGVAR(liverFail), true, true]; + _liverFail = true; + }; + if ( + _shockIndex < 1.0 && + {_ph > 7.35} && + {_effectiveCa > 2.2} && + {_effectiveCa < 2.8} + ) then { + _liverDamage = (_liverDamage - 0.000125) max 0; + + if (_liverDamage < 0.5 && {_liverFail}) then { + _unit setVariable [QGVAR(liverFail), false, true]; + _liverFail = false; + }; + }; + private _hepaticFrac = 1 - _liverDamage; + private _shockFrac = + linearConversion [0.9, 2.0, _shockIndex, 1.0, 0.25, true]; + + _hepaticFrac = (_hepaticFrac * _shockFrac) max 0.05; + if (_effectiveCa < 2.0 || {_effectiveCa > 3.3}) then { + _hepaticFrac = _hepaticFrac * + linearConversion [1.6, 3.6, abs (_effectiveCa - 2.4), 1.0, 0.75, true]; + }; + + + TRACE_4( + "Inputs", + _ca, + _effectiveCa, + _ph, + _shockIndex + ); + + TRACE_4( + "Perfusion", + _bvFrac, + _hepaticFrac, + _liverDamage, + _kidneyFail + ); + + + private _targetCa = 2.4 + linearConversion [-300, 300, _externalCa, -0.9, 0.9, true]; + + private _caError = _targetCa - _ca; + TRACE_3( + "Ca TARGET", + _targetCa, + _caError, + _externalCa +); + if (_externalCa != 0) then { + TRACE_3( + "ExternalCa PRE", + _externalCa, + _kidneyFrac, + _hepaticFrac + ); + private _kidneyFrac = 1 - (_unit getVariable [QGVAR(kidneyDamage), 0]); + _kidneyFrac = _kidneyFrac max 0.2; + + private _clearanceRate = 0.0025 * _kidneyFrac * _hepaticFrac; + if (_liverFail) then { + _clearanceRate = _clearanceRate * 0.125; + }; + _externalCa = _externalCa - (_clearanceRate * ((_externalCa max -1) min 1)); + _externalCa = (_externalCa max -300) min 300; + + _unit setVariable [QGVAR(externalCa), _externalCa, true]; + if (_hepaticFrac > 0.8 && {_externalCa < 5} && (!_kidneyFail)) then { + _ca = _ca + (0.002 * (_externalCa max -1 min 1)); + }; + TRACE_3( + "ExternalCa CLR", + _clearanceRate, + _externalCa, + _liverFail + ); + }; + if (_caCl2 > 0) then { + private _amp = _caCl2 min 3; + private _cancel = (_amp * 4); + _externalCa = _externalCa + _cancel; + }; + if (_caGlu > 0) then { + private _amp = _caGlu min 2; + private _cancel = (_amp * 0.2); + _externalCa = _externalCa + _cancel; + }; + if (_caCl2 > 0 && {_bvFrac < 0.6}) then { + if (random 1 < 0.2) then { + _unit setVariable [ + QGVAR(calciumDamage), + (_damage + 0.02) min 1, + true + ]; + }; + }; + private _caError = _targetCa - _ca; + private _caGain = 0.05; + private _caRate = + _caError * + _caGain * + _kidneyFrac * + _hepaticFrac * + _bvFrac; + _caRate = _caRate max -0.0005 min 0.0005; + + _ca = _ca + _caRate; + + TRACE_3( + "Ca HOMEOSTASIS", + _caError, + _caRate, + _ca + ); + private _ionizedShift = 0; + if (_ph < 7.35) then { + _ionizedShift = _ionizedShift + + linearConversion [7.35, 7.10, _ph, 0.00, 0.12, true]; + }; + if (_lactate > 4) then { + _ionizedShift = _ionizedShift + + linearConversion [4, 10, _lactate, 0.00, 0.08, true]; + }; + if (_bicarb > 0) then { + _ionizedShift = _ionizedShift - + linearConversion [0, 6, _bicarb, 0.00, 0.10, true]; + }; + + _ionizedShift = _ionizedShift max -0.25 min 0.25; + _effectiveCa = (_ca + _ionizedShift) max 0; + + TRACE_4( + "IONIZED", + _ionizedShift, + _ca, + _effectiveCa, + _ph + ); + private _deltaCa = _effectiveCa - _prevCa; + _deltaCa = [_deltaCa, 0, 0.03] call _rateLimit; + _effectiveCa = _prevCa + _deltaCa; + if (_effectiveCa > 2.4) then { + private _renalPerf = + linearConversion [1, 1.8, _shockIndex, 1.0, 0.1, true]; + + private _renalClearance = + _renalPerf * + _kidneyFrac * + linearConversion [2.35, 2.9, _effectiveCa, 0.0005, 0.004, true]; + _ca = (_ca - _renalClearance) max 1.5; + TRACE_4( + "Renal Ca excretion", + _renalPerf, + _renalClearance, + _effectiveCa, + _ca + ); + }; + private _boneFlux = linearConversion [2.2, 2.6, _effectiveCa, 0.0015, -0.0015, true]; + _ca = _ca + _boneFlux; + + if (!_kidneyFail && {_effectiveCa < 2.4}) then { + _ca = _ca + linearConversion [2.45, 2.25, _effectiveCa, 0.000, 0.0005, true] + }; + if (_effectiveCa > 3.0) then { + private _d = (_damage + 0) min 1; + _damage = [_d, _prevDmg, _maxDeltaDmg] call _rateLimit; + + }; + if (_effectiveCa < 2.1) then { + private _medCount = [_unit, "CALCIUMCONTRACTILITY"] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _contractility = linearConversion [2.1, 1.6, _effectiveCa, -0.02, -0.12, true]; + if (_medCount < 0.1) then { + [_unit, "CALCIUMCONTRACTILITY", 5, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, _contractility, 0, "false", "false", "true"] call EFUNC(vitals,addMedicationAdjustment); + }; + }; + if (_effectiveCa > 3.0) then { + private _contractility = linearConversion [3.0, 3.5, _effectiveCa, 0.05, 0.2, true]; + if (_effectiveCa > 3.6) then { + _contractility = _contractility - 0.05; + }; + if (_caCl2 > 0) then { + _contractility = _contractility * 1.4; + }; + private _medCount = [_unit, "CALCIUMCONTRACTILITY"] call ACEFUNC(medical_status,getMedicationCount) select 1; + if (_medCount < 0.1) then { + [_unit, "CALCIUMCONTRACTILITY", 5, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, _contractility, 0, "false", "false", "true"] call EFUNC(vitals,addMedicationAdjustment); + }; + }; + private _arrProb = 0; + if (_effectiveCa < 2.0) then { + _arrProb = + linearConversion [2.0, 1.6, _effectiveCa, 0.01, 0.08, true]; + }; + + if (_effectiveCa > 3.0) then { + _arrProb = + _arrProb max + linearConversion [3.0, 3.6, _effectiveCa, 0.01, 0.1, true]; + }; + private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; + if ((_ca < 2.1) && ((_ht findIf {_x isEqualTo "hypocalcemia"}) == -1)) then { + _ht pushBack "hypocalcemia"; + }; + if ((_ca > 3.0) && ((_ht findIf {_x isEqualTo "hypercalcemia"}) == -1)) then { + _ht pushBack "hypercalcemia"; + }; + if ((_ca > 2.1) && ((_ht findIf {_x isEqualTo "hypocalcemia"}) > -1)) then { + _ht deleteAt (_ht find "hypocalcemia"); + }; + if ((_ca < 3.0) && ((_ht findIf {_x isEqualTo "hypercalcemia"}) > -1)) then { + _ht deleteAt (_ht find "hypercalcemia"); + }; + _unit setVariable [QEGVAR(circulation,ht), _ht, true]; + private _lastArr = _unit getVariable [QGVAR(lastArrhythmia), -1000]; + if (_lastArr > 0) then { + private _refrac = + linearConversion [0, 60, CBA_missionTime - _lastArr, 0.2, 1.0, true]; + _arrProb = _arrProb * _refrac; + }; + if (_caCl2 > 0) then { + _arrProb = _arrProb + + linearConversion [0, 1, _caCl2, 0.02, 0.06, true]; + }; + if (random 1 < _arrProb) then { - if (_random >= 0.75) then { - [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; - _unit setVariable [QGVAR(kidneyArrest), true, true]; + _unit setVariable [QGVAR(lastArrhythmia), CBA_missionTime, true]; + if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] != 0) exitWith {}; + private _arrestType = 0; + if (_ca < 1.7) then { + _arrestType = [3, 2, 1] selectRandomWeighted [0.5, 0.35, 0.15]; + } else { + if (_ca < 1.9) then { + _arrestType = [4, 2] selectRandomWeighted [0.6, 0.4]; + } else { + if (_ca < 2.1) then { + _arrestType = 4; // VT }; }; }; - case (_ph >= 1000): { - _ph = (_ph - 30) max 0; - _unit setVariable [QGVAR(externalPh), _ph, true]; - - if !(_kidneyPressure) then { - _unit setVariable [QGVAR(kidneyPressure), true, true]; - [_unit, "KIDNEY", 15, 1200, 30, 0, 15] call ACEFUNC(medical_status,addMedicationAdjustment); + if (_ca > 3.6) then { + _arrestType = [3, 1] selectRandomWeighted [0.7, 0.3]; + } else { + if (_ca > 3.3) then { + _arrestType = [4, 3] selectRandomWeighted [0.6, 0.4]; + } else { + if (_ca > 3.0) then { + _arrestType = 4; + }; }; }; - default { - _ph = (_ph - 60) max 0; - _unit setVariable [QGVAR(externalPh), _ph, true]; + if ((_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] > _arrestType) || (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0)) then { + _unit setVariable [ + QEGVAR(circulation,cardiacArrestType), + _arrestType, + true + ]; + [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; }; - }, 20, [_unit]] call CBA_fnc_addPerFrameHandler; + if ( + abs _externalCa < 80 && + _ph > 7.2 && + !_kidneyFail && + !_liverFail + ) then { + _ca = _ca max 2.05; + }; + _unit setVariable [QGVAR(serumCalcium), _ca, true]; + _effectiveCa = _effectiveCa max 0; + _unit setVariable [QGVAR(effectiveCa), _effectiveCa, true]; + _unit setVariable [QGVAR(calciumDamage), _damage, true]; + _unit setVariable [QGVAR(liverDamage), _liverDamage, true]; + _unit setVariable [QGVAR(prevCalciumPhysio), + [ + _externalPh, + _lactate, + _effectiveCa, + _damage + ] + ]; + + }, 5, [_unit]] call CBA_fnc_addPerFrameHandler; }; + + + diff --git a/addons/pharma/functions/fnc_hasIVbag.sqf b/addons/pharma/functions/fnc_hasIVbag.sqf new file mode 100644 index 000000000..f7212ecab --- /dev/null +++ b/addons/pharma/functions/fnc_hasIVbag.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks if any IV bags are present + * Note: Patient may not be local + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Check IV Condition + * + * Example: + * [player, cursorObject, "LeftLeg", "saline"] call kat_pharma_fnc_ivBagCheck; + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; +private _ivBags = _patient getVariable [QACEGVAR(medical,ivBags), []]; + +private _hasIV = _ivBags findIf { + private _bagType = _x select 1; + !(_bagType in ["FBTK_500", "FBTK_250"]) + && + (_x select 2) isEqualTo _partIndex +} != -1; + +TRACE_3("hasMatchingIV", _ivBags, _partIndex, _hasIV); +_hasIV \ No newline at end of file diff --git a/addons/pharma/functions/fnc_init.sqf b/addons/pharma/functions/fnc_init.sqf index c4194367b..884787479 100644 --- a/addons/pharma/functions/fnc_init.sqf +++ b/addons/pharma/functions/fnc_init.sqf @@ -21,93 +21,607 @@ if (!local _unit) exitWith {}; [_unit] call FUNC(fullHealLocal); -[{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; +if (GVAR(kidneyAction)) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + + if (!alive _unit) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _maxDeltaPH = 1; + private _maxDeltaLact = 0.05; + private _maxDeltaCa = 0.02; + private _maxDeltaDmg = 0.00125; + private _prev = _unit getVariable [QGVAR(prevRenalPhysio), [ + 0, + 1.2, + 2.4, + 0 + ]]; - private _alive = alive _unit; + _prev params [ + "_prevExtPH", + "_prevLact", + "_prevCa", + "_prevDmg" + ]; + private _rateLimit = { + params ["_new", "_old", "_max"]; + (_new max (_old - _max)) min (_old + _max) + }; + private _externalPh = _unit getVariable [QGVAR(externalPh), 0]; + private _ph = GET_PH(_unit); + _externalPh = (_externalPh max -300) min 300; + private _lactate = _unit getVariable [QGVAR(lactate), 1.2]; + private _sign = if (_externalPh == 0) then {1} else {_externalPh / abs _externalPh}; + private _bv = GET_BODY_FLUID_ECB(_unit); + private _hr = GET_HEART_RATE(_unit); + private _damage = _unit getVariable [QGVAR(kidneyDamage), 0]; + private _kidneyFail = _unit getVariable [QGVAR(kidneyFail), false]; + private _kidneyArrest = _unit getVariable [QGVAR(kidneyArrest), false]; + private _bicarb = [_unit, "Bicarbonate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _effectiveCa = _unit getVariable [QGVAR(effectiveCa), 2.4]; + private _bvFrac = (_bv / 2700) max 0.3 min 1; + private _shockIndex = (_hr / (_bvFrac * 100)) max 0.5 min 3; + private _kidneyFailTimer = _unit getVariable [QGVAR(kidneyFailTimer), 0]; + private _shockAcidLoad = linearConversion [1, 2, _shockIndex, 0, 0.4, true]; + private _bvAcidLoad = linearConversion [0.6, 1.0, _bvFrac, 0.3, 0, true]; + private _kidneyFrac = 1 - _damage; + _kidneyFrac = _kidneyFrac max 0.15; + if (_kidneyFail) then { + _kidneyFrac = _kidneyFrac * 0.35; + }; + private _totalShockAcid = (_shockAcidLoad + _bvAcidLoad) * 0.25; + private _bufferFrac = linearConversion [0, 300, (abs _externalPh), 1, 0.15, true]; + _bufferFrac = _bufferFrac * linearConversion [1.0, 0.5, _bvFrac, 1.0, 0.7, true]; + _totalShockAcid = _totalShockAcid * _bufferFrac; + if (_bvFrac > 0.9 && _hr < 110) then { _totalShockAcid = 0 }; + private _lactateGen = + linearConversion [1, 2.2, _shockIndex, 0.01, 0.035, true] * + linearConversion [2, 6, _lactate, 1.0, 0.4, true]; + _lactateGen = _lactateGen * linearConversion [0.4, 1.0, _bvFrac, 1.8, 1.0, true]; + if (_effectiveCa < 2.1) then { + _lactateGen = _lactateGen * + linearConversion [2.1, 1.6, _effectiveCa, 1.0, 1.6, true]; + }; + if (_effectiveCa > 3.0) then { + _lactateGen = _lactateGen * + linearConversion [3.0, 3.6, _effectiveCa, 1.0, 1.4, true]; + }; + _lactate = (_lactate + _lactateGen) min 15; + private _lactateTarget = 2.0; + if (_effectiveCa < 2.1) then { _lactateTarget = 2.8 }; + if (_effectiveCa > 3.0) then { _lactateTarget = 3.0 }; + private _lactateClear = + linearConversion [_lactateTarget, 6, _lactate, 0.015, 0.0, true] * + linearConversion [0, 0.8, _damage, 1.0, 0.4, true] * + _kidneyFrac; + if (_bvFrac > 0.9 && _hr < 110) then { + _lactateClear = _lactateClear * 1.5; + }; + _lactate = _lactate - _lactateClear; + _lactate = [_lactate, _prevLact, _maxDeltaLact] call _rateLimit; + _lactate = _lactate max 0.8; + _unit setVariable [QGVAR(lactate), _lactate, true]; + if (!_kidneyFail) then { + _externalPh = _externalPh + _totalShockAcid; + }; - if (!_alive) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; + _externalPh = _externalPh + ((_lactate * 0.0075) * _bufferFrac); + private _rr = _unit getVariable [QEGVAR(breathing,breathRate), 0]; + private _depth = _unit getVariable [VAR_RESPIRATORY_DEPTH, 0]; + private _normRR = 14; + private _normDepth = DEFAULT_RESPIRATORY_DEPTH; + private _acidRepo = _unit getVariable [QGVAR(acidRepo), 1.0]; + private _bloodVolume = GET_BLOOD_VOLUME_LITERS(_unit); + private _anerobicPressure = (DEFAULT_ANEROBIC_EXCHANGE * (6 / (_bloodVolume max 6))) min 1.2; + private _ventRatio = ((_rr max 0) * (_depth max 0)) / (_normRR * _normDepth); + if (_ph < 7.3) then { + if (_ventRatio > 1.1) then { + + private _cnsSupp = + (_unit getVariable [QEGVAR(surgery,sedated), 0]) + max (_unit getVariable [QEGVAR(pharma,opioidDepression), 0]); - private _medicationArray = _unit getVariable [QACEGVAR(medical,medications), []]; - private _alpha = false; - private _opioid = false; + private _ventEff = + linearConversion [1.1, 3.5, _ventRatio, 0.0, 1.0, true] + * linearConversion [0, 1, _cnsSupp, 1.0, 0.4, true]; - { - _x params ["_medication"]; + private _bufferLimit = + linearConversion [0, 300, abs _externalPh, 0.15, 1.0, true]; + private _respOffgas = + 0.35 + * _ventEff + * _bufferLimit; + _respOffgas = _respOffgas * linearConversion [2, 6, _lactate, 1.0, 0.3, true]; + private _repoDrain = + linearConversion [1.0, 2.5, _ventRatio, 0.0, 0.0125, true] + * linearConversion [1.0, 1.2, _anerobicPressure, 0.6, 1.0, true]; + if (_kidneyFail) then { + _repoDrain = _repoDrain * 1.4; + }; + _acidRepo = (_acidRepo - _repoDrain) max 0; + _respOffgas = _respOffgas * _acidRepo; + _externalPh = _externalPh - (_respOffgas * _sign); + private _lactRespClear = + 0.02 * _ventEff * linearConversion [7.35, 7.55, _ph, 1.0, 0.6, true]; + _lactate = (_lactate - _lactRespClear) max 0.8; - if (_medication in ["Epinephrine", "EpinephrineIV", "Phenylephrine", "Nitroglycerin", "Lidocaine", "Norepinephrine"]) exitWith { - _alpha = true; + TRACE_4( + "RESP_OFFGASS", + _ventRatio, + _ventEff, + _respOffgas, + _externalPh + ); + }; + }; + if (_ventRatio < 1.1 && _anerobicPressure < 1.05) then { + _acidRepo = (_acidRepo + 0.015) min 1.0; + }; + + _unit setVariable [QGVAR(acidRepo), _acidRepo, true]; + if (_bicarb > 0) then { + private _bicarbMult = linearConversion [0, 300, abs _externalPh, 0.2, 1.0, true]; + _externalPh = _externalPh - (0.6 * (_bicarb * _bicarbMult)); + if (_bvFrac < 0.7) then { + _externalPh = _externalPh + (0.3 * (_bicarb * _bicarbMult)); + _lactate = _lactate + (0.2 * (_bicarb * _bicarbMult)); + }; + private _caBind = linearConversion [0, 6, _bicarb, 0.00, 0.04, true]; + _unit setVariable [ + QGVAR(externalCa), + (_unit getVariable [QGVAR(externalCa), 0]) + _caBind, + true + ]; }; - } forEach (_medicationArray); + if (_externalPh != 0) then { + private _clearance = + 0.125 * + _kidneyFrac * + linearConversion [0, 250, abs _externalPh, 0.8, 1.8, true] * + linearConversion [0, 0.8, _damage, 1.0, 0.4, true] + * linearConversion [1.0, 0.5, _bvFrac, 1.0, 0.4, true]; + + _externalPh = _externalPh - (_clearance * _sign); + }; + if (_effectiveCa < 1.8) then { + _externalPh = _externalPh + linearConversion [1.8, 1.5, _effectiveCa, 0.01, 0.06, true]; + }; + if (_effectiveCa > 3.2) then { + _externalPh = _externalPh + (0.025 * (1 - _bufferFrac)); + }; + _externalPh = [_externalPh, _prevExtPH, _maxDeltaPH] call _rateLimit; + _externalPh = (_externalPh max -300) min 300; + _unit setVariable [QGVAR(externalPh), _externalPh, true]; - { - _x params ["_medication"]; + if (_ph < 7.25) then { + _damage = ( + _damage + + linearConversion [7.25, 6.9, _ph, 0.0004, 0.005, true] + ) min 1; + }; - if (_medication in ["Fentanyl", "Morphine", "Nalbuphine"]) exitWith { - _opioid = true; + if (_ph > 7.55) then { + _damage = ( + _damage + + linearConversion [7.55, 7.75, _ph, 0.00025, 0.004, true] + ) min 1; }; - } forEach (_medicationArray); - if !(_alpha) then { - _unit setVariable [QGVAR(alphaAction), 1]; - }; + if (_effectiveCa > 3.2) then { + private _d = (_damage + linearConversion [3.2, 3.8, _effectiveCa, 0.00025, 0.004, true]) min 1; + _damage = [_d, _prevDmg, _maxDeltaDmg] call _rateLimit; - if !(_opioid) then { - _unit setVariable [QGVAR(opioidFactor), 1]; - }; -}, 180, [_unit]] call CBA_fnc_addPerFrameHandler; + }; + if (_effectiveCa < 1.6) then { + private _d = (_damage + linearConversion [1.6, 1.1, _effectiveCa, 0.00025, 0.004, true]) min 1; + _damage = [_d, _prevDmg, _maxDeltaDmg] call _rateLimit; + }; + + if (_damage >= 0.7) then { + _kidneyFailTimer = _kidneyFailTimer + 5; + } else { + _kidneyFailTimer = (_kidneyFailTimer - 2) max 0; + }; + + if (_kidneyFailTimer > 600 && !_kidneyFail) then { + _unit setVariable [QGVAR(kidneyFail), true, true]; + }; + + _unit setVariable [QGVAR(kidneyFailTimer), _kidneyFailTimer, true]; + + if (_ph < 6.9 && !_kidneyArrest) then { + if (random 1 < 0.35) then { + [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; + _unit setVariable [QGVAR(kidneyArrest), true, true]; + }; + }; + + _unit setVariable [QGVAR(kidneyDamage), _damage, true]; + _unit setVariable [QGVAR(prevRenalPhysio), + [ + _externalPh, + _lactate, + _effectiveCa, + _damage + ] + ]; + }, 5, [_unit]] call CBA_fnc_addPerFrameHandler; +}; if (GVAR(kidneyAction)) then { + [{ params ["_args", "_idPFH"]; _args params ["_unit"]; - private _alive = alive _unit; - - if (!_alive) exitWith { + if (!alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - private _ph = _unit getVariable [QGVAR(externalPh), 0]; + private _maxDeltaLact = 0.15; + private _maxDeltaCa = 0.05; + private _maxDeltaDmg = 0.0025; + private _prev = _unit getVariable [QGVAR(prevCalciumPhysio), [ + 0, + 1.2, + 2.4, + 0 + ]]; + + _prev params [ + "_prevExtPH", + "_prevLact", + "_prevCa", + "_prevDmg" + ]; + + private _rateLimit = { + params ["_new", "_old", "_max"]; + (_new max (_old - _max)) min (_old + _max) + }; + private _ca = _unit getVariable [QGVAR(serumCalcium), 0]; + private _damage = _unit getVariable [QGVAR(calciumDamage), 0]; + private _ph = GET_PH(_unit); + private _bv = GET_BODY_FLUID_ECB(_unit); + private _hr = GET_HEART_RATE(_unit); + private _lactate = _unit getVariable [QGVAR(lactate), 1.2]; + private _bvFrac = (_bv / 2700) max 0.3 min 1; + private _shockIndex = (_hr / (_bvFrac * 100)) max 0.5 min 3; + private _liverDamage = _unit getVariable [QGVAR(liverDamage), 0]; + private _liverFail = _unit getVariable [QGVAR(liverFail), false]; + private _bicarb = [_unit, "Bicarbonate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _externalPh = _unit getVariable [QGVAR(externalPh), 0]; + private _caCl2 = [_unit, "CalciumChloride", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _caGlu = [_unit, "CalciumGluconate", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _txa = [_unit, "TXA", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _effectiveCa = _unit getVariable [QGVAR(effectiveCa), GET_CA(_unit)]; + private _bufferFrac = linearConversion [0, 300, (abs _externalPh), 1, 0.15, true]; private _kidneyFail = _unit getVariable [QGVAR(kidneyFail), false]; - private _kidneyArrest = _unit getVariable [QGVAR(kidneyArrest), false]; - private _kidneyPressure = _unit getVariable [QGVAR(kidneyPressure), false]; - - switch true do { - case(_ph == 3000): { - if (_ph == 3000) exitWith { - _unit setVariable [QGVAR(kidneyFail), true, true]; - _unit setVariable [QGVAR(kidneyArrest), true, true]; - }; + private _kidneyDamage = _unit getVariable [QGVAR(kidneyDamage), 0]; + private _externalCa = _unit getVariable [QGVAR(externalCa), 0]; + private _kidneyFrac = 1 - _kidneyDamage; + private _sign = if (_externalCa == 0) then {1} else {_externalCa / abs _externalCa}; + TRACE_6( + "Ca INPUT", + _ca, + _effectiveCa, + _externalCa, + _ph, + _shockIndex, + _kidneyFrac +); + _kidneyFrac = _kidneyFrac max 0.15; + if (_kidneyFail) then { + _kidneyFrac = _kidneyFrac * 0.35; + }; + if (_txa > 0) then { + private _txaPerfusionBonus = + linearConversion [0, 3, _txa, 1.0, 0.85, true]; + + _shockIndex = _shockIndex * _txaPerfusionBonus; + }; + if (_shockIndex > 1.5 || {_ph < 7.15}) then { + private _injury = + linearConversion [1.5, 2.5, _shockIndex, 0.00015, 0.001, true]; + + if (_ph < 7.1) then { + _injury = _injury * 1.5; + }; + + _liverDamage = (_liverDamage + _injury) min 1; + }; + if (_liverDamage > 0.8 && {!_liverFail}) then { + _unit setVariable [QGVAR(liverFail), true, true]; + _liverFail = true; + }; + if ( + _shockIndex < 1.0 && + {_ph > 7.35} && + {_effectiveCa > 2.2} && + {_effectiveCa < 2.8} + ) then { + _liverDamage = (_liverDamage - 0.000125) max 0; + + if (_liverDamage < 0.5 && {_liverFail}) then { + _unit setVariable [QGVAR(liverFail), false, true]; + _liverFail = false; }; - case (_ph >= 2000): { - _unit setVariable [QGVAR(kidneyFail), true, true]; + }; + private _hepaticFrac = 1 - _liverDamage; + private _shockFrac = + linearConversion [0.9, 2.0, _shockIndex, 1.0, 0.25, true]; + + _hepaticFrac = (_hepaticFrac * _shockFrac) max 0.05; + if (_effectiveCa < 2.0 || {_effectiveCa > 3.3}) then { + _hepaticFrac = _hepaticFrac * + linearConversion [1.6, 3.6, abs (_effectiveCa - 2.4), 1.0, 0.75, true]; + }; - if !(_kidneyArrest) then { - private _random = random 1; - if (_random >= 0.75) then { - [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; - _unit setVariable [QGVAR(kidneyArrest), true, true]; + TRACE_4( + "Inputs", + _ca, + _effectiveCa, + _ph, + _shockIndex + ); + + TRACE_4( + "Perfusion", + _bvFrac, + _hepaticFrac, + _liverDamage, + _kidneyFail + ); + + + private _targetCa = 2.4 + linearConversion [-300, 300, _externalCa, -0.9, 0.9, true]; + + private _caError = _targetCa - _ca; + TRACE_3( + "Ca TARGET", + _targetCa, + _caError, + _externalCa +); + if (_externalCa != 0) then { + TRACE_3( + "ExternalCa PRE", + _externalCa, + _kidneyFrac, + _hepaticFrac + ); + private _kidneyFrac = 1 - (_unit getVariable [QGVAR(kidneyDamage), 0]); + _kidneyFrac = _kidneyFrac max 0.2; + + private _clearanceRate = 0.0025 * _kidneyFrac * _hepaticFrac; + if (_liverFail) then { + _clearanceRate = _clearanceRate * 0.125; + }; + _externalCa = _externalCa - (_clearanceRate * ((_externalCa max -1) min 1)); + _externalCa = (_externalCa max -300) min 300; + + _unit setVariable [QGVAR(externalCa), _externalCa, true]; + if (_hepaticFrac > 0.8 && {_externalCa < 5} && (!_kidneyFail)) then { + _ca = _ca + (0.002 * (_externalCa max -1 min 1)); + }; + TRACE_3( + "ExternalCa CLR", + _clearanceRate, + _externalCa, + _liverFail + ); + }; + if (_caCl2 > 0) then { + private _amp = _caCl2 min 3; + private _cancel = (_amp * 4); + _externalCa = _externalCa + _cancel; + }; + if (_caGlu > 0) then { + private _amp = _caGlu min 2; + private _cancel = (_amp * 0.2); + _externalCa = _externalCa + _cancel; + }; + if (_caCl2 > 0 && {_bvFrac < 0.6}) then { + if (random 1 < 0.2) then { + _unit setVariable [ + QGVAR(calciumDamage), + (_damage + 0.02) min 1, + true + ]; + }; + }; + private _caError = _targetCa - _ca; + private _caGain = 0.05; + private _caRate = + _caError * + _caGain * + _kidneyFrac * + _hepaticFrac * + _bvFrac; + _caRate = _caRate max -0.0005 min 0.0005; + + _ca = _ca + _caRate; + + TRACE_3( + "Ca HOMEOSTASIS", + _caError, + _caRate, + _ca + ); + private _ionizedShift = 0; + if (_ph < 7.35) then { + _ionizedShift = _ionizedShift + + linearConversion [7.35, 7.10, _ph, 0.00, 0.12, true]; + }; + if (_lactate > 4) then { + _ionizedShift = _ionizedShift + + linearConversion [4, 10, _lactate, 0.00, 0.08, true]; + }; + if (_bicarb > 0) then { + _ionizedShift = _ionizedShift - + linearConversion [0, 6, _bicarb, 0.00, 0.10, true]; + }; + + _ionizedShift = _ionizedShift max -0.25 min 0.25; + _effectiveCa = (_ca + _ionizedShift) max 0; + + TRACE_4( + "IONIZED", + _ionizedShift, + _ca, + _effectiveCa, + _ph + ); + private _deltaCa = _effectiveCa - _prevCa; + _deltaCa = [_deltaCa, 0, 0.03] call _rateLimit; + _effectiveCa = _prevCa + _deltaCa; + if (_effectiveCa > 2.4) then { + private _renalPerf = + linearConversion [1, 1.8, _shockIndex, 1.0, 0.1, true]; + + private _renalClearance = + _renalPerf * + _kidneyFrac * + linearConversion [2.35, 2.9, _effectiveCa, 0.0005, 0.004, true]; + _ca = (_ca - _renalClearance) max 1.5; + TRACE_4( + "Renal Ca excretion", + _renalPerf, + _renalClearance, + _effectiveCa, + _ca + ); + }; + private _boneFlux = linearConversion [2.2, 2.6, _effectiveCa, 0.0015, -0.0015, true]; + _ca = _ca + _boneFlux; + + if (!_kidneyFail && {_effectiveCa < 2.4}) then { + _ca = _ca + linearConversion [2.45, 2.25, _effectiveCa, 0.000, 0.0005, true] + }; + if (_effectiveCa > 3.0) then { + private _d = (_damage + 0) min 1; + _damage = [_d, _prevDmg, _maxDeltaDmg] call _rateLimit; + + }; + if (_effectiveCa < 2.1) then { + private _medCount = [_unit, "CALCIUMCONTRACTILITY"] call ACEFUNC(medical_status,getMedicationCount) select 1; + private _contractility = linearConversion [2.1, 1.6, _effectiveCa, -0.02, -0.12, true]; + if (_medCount < 0.1) then { + [_unit, "CALCIUMCONTRACTILITY", 5, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, _contractility, 0, "false", "false", "true"] call EFUNC(vitals,addMedicationAdjustment); + }; + }; + if (_effectiveCa > 3.0) then { + private _contractility = linearConversion [3.0, 3.5, _effectiveCa, 0.05, 0.2, true]; + if (_effectiveCa > 3.6) then { + _contractility = _contractility - 0.05; + }; + if (_caCl2 > 0) then { + _contractility = _contractility * 1.4; + }; + private _medCount = [_unit, "CALCIUMCONTRACTILITY"] call ACEFUNC(medical_status,getMedicationCount) select 1; + if (_medCount < 0.1) then { + [_unit, "CALCIUMCONTRACTILITY", 5, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, _contractility, 0, "false", "false", "true"] call EFUNC(vitals,addMedicationAdjustment); + }; + }; + private _arrProb = 0; + if (_effectiveCa < 2.0) then { + _arrProb = + linearConversion [2.0, 1.6, _effectiveCa, 0.01, 0.08, true]; + }; + + if (_effectiveCa > 3.0) then { + _arrProb = + _arrProb max + linearConversion [3.0, 3.6, _effectiveCa, 0.01, 0.1, true]; + }; + private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; + if ((_ca < 2.1) && ((_ht findIf {_x isEqualTo "hypocalcemia"}) == -1)) then { + _ht pushBack "hypocalcemia"; + }; + if ((_ca > 3.0) && ((_ht findIf {_x isEqualTo "hypercalcemia"}) == -1)) then { + _ht pushBack "hypercalcemia"; + }; + if ((_ca > 2.1) && ((_ht findIf {_x isEqualTo "hypocalcemia"}) > -1)) then { + _ht deleteAt (_ht find "hypocalcemia"); + }; + if ((_ca < 3.0) && ((_ht findIf {_x isEqualTo "hypercalcemia"}) > -1)) then { + _ht deleteAt (_ht find "hypercalcemia"); + }; + _unit setVariable [QEGVAR(circulation,ht), _ht, true]; + private _lastArr = _unit getVariable [QGVAR(lastArrhythmia), -1000]; + if (_lastArr > 0) then { + private _refrac = + linearConversion [0, 60, CBA_missionTime - _lastArr, 0.2, 1.0, true]; + _arrProb = _arrProb * _refrac; + }; + if (_caCl2 > 0) then { + _arrProb = _arrProb + + linearConversion [0, 1, _caCl2, 0.02, 0.06, true]; + }; + if (random 1 < _arrProb) then { + + _unit setVariable [QGVAR(lastArrhythmia), CBA_missionTime, true]; + if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] != 0) exitWith {}; + private _arrestType = 0; + if (_ca < 1.7) then { + _arrestType = [3, 2, 1] selectRandomWeighted [0.5, 0.35, 0.15]; + } else { + if (_ca < 1.9) then { + _arrestType = [4, 2] selectRandomWeighted [0.6, 0.4]; + } else { + if (_ca < 2.1) then { + _arrestType = 4; // VT }; }; }; - case (_ph >= 1000): { - _ph = (_ph - 30) max 0; - _unit setVariable [QGVAR(externalPh), _ph, true]; - - if !(_kidneyPressure) then { - _unit setVariable [QGVAR(kidneyPressure), true, true]; - [_unit, "KIDNEY", 15, 1200, 30, 0, 15] call ACEFUNC(medical_status,addMedicationAdjustment); + if (_ca > 3.6) then { + _arrestType = [3, 1] selectRandomWeighted [0.7, 0.3]; + } else { + if (_ca > 3.3) then { + _arrestType = [4, 3] selectRandomWeighted [0.6, 0.4]; + } else { + if (_ca > 3.0) then { + _arrestType = 4; + }; }; }; - default { - _ph = (_ph - 60) max 0; - _unit setVariable [QGVAR(externalPh), _ph, true]; + if ((_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] > _arrestType) || (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0)) then { + _unit setVariable [ + QEGVAR(circulation,cardiacArrestType), + _arrestType, + true + ]; + [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; }; - }, 20, [_unit]] call CBA_fnc_addPerFrameHandler; + if ( + abs _externalCa < 80 && + _ph > 7.2 && + !_kidneyFail && + !_liverFail + ) then { + _ca = _ca max 2.05; + }; + _unit setVariable [QGVAR(serumCalcium), _ca, true]; + _effectiveCa = _effectiveCa max 0; + _unit setVariable [QGVAR(effectiveCa), _effectiveCa, true]; + _unit setVariable [QGVAR(calciumDamage), _damage, true]; + _unit setVariable [QGVAR(liverDamage), _liverDamage, true]; + _unit setVariable [QGVAR(prevCalciumPhysio), + [ + _externalPh, + _lactate, + _effectiveCa, + _damage + ] + ]; + + }, 5, [_unit]] call CBA_fnc_addPerFrameHandler; }; + + + diff --git a/addons/pharma/functions/fnc_inspectCatheter.sqf b/addons/pharma/functions/fnc_inspectCatheter.sqf index c8178f00e..565a3c108 100644 --- a/addons/pharma/functions/fnc_inspectCatheter.sqf +++ b/addons/pharma/functions/fnc_inspectCatheter.sqf @@ -20,10 +20,10 @@ params ["_medic", "_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; -if (_IVactual == 3) exitWith { +if (_IVactual in [7,8,9]) exitWith { private _output = LLSTRING(IVblock_closed); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; diff --git a/addons/pharma/functions/fnc_ivBagCheck.sqf b/addons/pharma/functions/fnc_ivBagCheck.sqf new file mode 100644 index 000000000..79b0c98d5 --- /dev/null +++ b/addons/pharma/functions/fnc_ivBagCheck.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks if any IV bags are present + * Note: Patient may not be local + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Check IV Condition + * + * Example: + * [player, cursorObject, "LeftLeg", "saline"] call kat_pharma_fnc_ivBagCheck; + * + * Public: No + */ +params ["_medic", "_patient", "_bodyPart", "_type"]; + +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; +_ivBags = (_patient getVariable [QACEGVAR(medical,ivBags), []]); + +private _hasMatchingIV = _ivBags findIf { + private _bagType = _x select 1; + ( + (_type isEqualTo "FBTK" && {_bagType in ["FBTK_500", "FBTK_250"]}) || + (_type isNotEqualTo "FBTK" && {_bagType isEqualTo _type}) + ) + && + (_x select 2) isEqualTo _partIndex +} != -1; + +TRACE_4("hasMatchingIV",_ivBags,_partIndex,_type,_hasMatchingIV); + +_hasMatchingIV \ No newline at end of file diff --git a/addons/pharma/functions/fnc_ivCondition.sqf b/addons/pharma/functions/fnc_ivCondition.sqf new file mode 100644 index 000000000..745eccc7b --- /dev/null +++ b/addons/pharma/functions/fnc_ivCondition.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks if an IV is present and medication can be pushed + * Note: Patient may not be local + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Check IV Condition + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_pharma_fnc_ivCondition; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _removeIV = [_medic, _patient, _bodyPart] call FUNC(removeIVCheck); +private _ivType = [_patient, _bodyPart] call FUNC(checkIVType); +private _return = false; + +if (_removeIV && !(_ivType in [3, 8, 11])) then { + _return = true; +} else { + _return = false; +}; + +_return \ No newline at end of file diff --git a/addons/pharma/functions/fnc_medicationLocal.sqf b/addons/pharma/functions/fnc_medicationLocal.sqf index a1ba7db21..d4a4ed9b8 100644 --- a/addons/pharma/functions/fnc_medicationLocal.sqf +++ b/addons/pharma/functions/fnc_medicationLocal.sqf @@ -24,7 +24,7 @@ // 0.6 = basic medication morph. pain suppr., 0.8 = adv. medication morph. pain suppr., 0.35 = adv. medication painkillers. pain suppr. #define PAINKILLERS_PAIN_SUPPRESSION 0.2625 -params ["_patient", "_bodyPart", "_classname"]; +params ["_patient", "_bodyPart", "_classname", ["_isFlushed", false]]; TRACE_3("medicationLocal",_patient,_bodyPart,_classname); // Medication has no effects on dead units @@ -38,15 +38,14 @@ if !(ACEGVAR(medical_treatment,advancedMedication)) exitWith { _patient setVariable [VAR_PAIN_SUPP, (_painSuppress + MORPHINE_PAIN_SUPPRESSION) min 1, true]; }; case "Epinephrine": { - private _sedated = _patient getVariable [QEGVAR(surgery,sedated), false]; - if !(_sedated) then { + private _sedated = _patient getVariable [QEGVAR(surgery,sedated), 0]; + if (_sedated == 0) then { [QACEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent; }; - }; case "EpinephrineIV": { - private _sedated = _patient getVariable [QEGVAR(surgery,sedated), false]; - if !(_sedated) then { + private _sedated = _patient getVariable [QEGVAR(surgery,sedated), 0]; + if (_sedated == 0) then { [QACEGVAR(medical,WakeUp), _patient] call CBA_fnc_localEvent; }; }; @@ -57,66 +56,361 @@ if !(ACEGVAR(medical_treatment,advancedMedication)) exitWith { }; }; TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_patient); - +if (_classname in ["CWMP", "Painkillers", "Penthrox", "Caffeine", "Pervitin"]) then { + private _airway = HAS_AIRWAY(_patient); + if !(_airway) exitWith { + TRACE_1("Medication is occluded by airway",_airway); + }; +}; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; - +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; // Handle IV blockage -if (((_patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]) select _partIndex) isEqualTo 3) exitWith { +if ([7,8,9] find (_IVarray select _partIndex) != -1) exitWith { + private _occludedMedications = _patient getVariable [QGVAR(occludedMedications), []]; + _occludedMedications pushBack [_partIndex, _classname, _patient]; + _patient setVariable [QGVAR(occludedMedications), _occludedMedications, true]; +}; +private _tourniquets = GET_TOURNIQUETS(_patient); +private _occlusionMap = [ + [4, [4, 5]], + [5, [5]], + [6, [6, 7]], + [7, [7]], + [8, [8, 9, 3]], + [9, [9, 3]], + [10, [10, 11, 3]], + [11, [11, 3]] +]; + +private _idx = _occlusionMap findIf { _x#0 == _partIndex }; +private _result = if (_idx != -1) then { _occlusionMap select _idx select 1 } else { [] }; +private _subDermalMeds = [ + "syringe_Lidocaine_10ml_10", "syringe_Lidocaine_5ml_10" +]; +private _medParts = _classname splitString "_"; +private _hasValidSuffix = count _medParts > 2 && { _medParts select 2 isEqualTo "5ml" }; +private _isOccluded = + ({ _tourniquets select _x != 0 } count _result > 0) + && !( ((_IVarray select _partIndex isEqualTo 13) && _hasValidSuffix) + || (_classname in _subDermalMeds)); +private _isDamaged = [_patient,_partIndex] call EFUNC(hitpoints,damageCheck); +private _isTooDamaged = + ((_isDamaged) && !(_classname in _subDermalMeds)); +if (_isTooDamaged) exitWith { + TRACE_3("Medication injection site is too damaged",_partIndex,_classname,_patient); +}; +if (_isOccluded) exitWith { + TRACE_3("Medication injection site is occluded by tourniquet",_partIndex,_classname,_patient); private _occludedMedications = _patient getVariable [QACEGVAR(medical,occludedMedications), []]; - _occludedMedications pushBack [_partIndex, _classname]; + _occludedMedications pushBack [_partIndex, _classname, _patient]; _patient setVariable [QACEGVAR(medical,occludedMedications), _occludedMedications, true]; }; - -// Handle tourniquet on body part blocking blood flow at injection site -if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith { - TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets); +private _isInCA = (_patient getVariable [QACEGVAR(medical,inCardiacArrest), false] && !(alive (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull]))); +if (_isInCA && ((_IVarray select _partIndex) in [2,3,4,10,11,12]) && !_isFlushed) exitWith { + TRACE_3("Medication injection site is occluded by CA",_partIndex,_classname,_patient); private _occludedMedications = _patient getVariable [QACEGVAR(medical,occludedMedications), []]; - _occludedMedications pushBack [_partIndex, _classname]; + _occludedMedications pushBack [_partIndex, _classname, _patient]; _patient setVariable [QACEGVAR(medical,occludedMedications), _occludedMedications, true]; }; // Get adjustment attributes for used medication -private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; -private _medicationConfig = _defaultConfig >> _classname; - -private _painReduce = GET_NUMBER(_medicationConfig >> "painReduce",getNumber (_defaultConfig >> "painReduce")); -private _timeInSystem = GET_NUMBER(_medicationConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem")); -private _timeTillMaxEffect = GET_NUMBER(_medicationConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect")); -private _viscosityChange = GET_NUMBER(_medicationConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange")); -private _hrIncreaseLow = GET_ARRAY(_medicationConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow")); -private _hrIncreaseNormal = GET_ARRAY(_medicationConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal")); -private _hrIncreaseHigh = GET_ARRAY(_medicationConfig >> "hrIncreaseHigh",getArray (_defaultConfig >> "hrIncreaseHigh")); -private _incompatibleMedication = GET_ARRAY(_medicationConfig >> "incompatibleMedication",getArray (_defaultConfig >> "incompatibleMedication")); -private _alphaFactor = GET_NUMBER(_medicationConfig >> "alphaFactor",getNumber (_defaultConfig >> "alphaFactor")); -private _maxRelief = GET_NUMBER(_medicationConfig >> "maxRelief",getNumber (_defaultConfig >> "maxRelief")); -private _opioidRelief = GET_NUMBER(_medicationConfig >> "opioidRelief",getNumber (_defaultConfig >> "opioidRelief")); -private _opioidEffect = GET_NUMBER(_medicationConfig >> "opioidEffect",getNumber (_defaultConfig >> "opioidEffect")); -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; + +// Get and calculate medication modifiers + private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; + private _medicationConfig = _defaultConfig >> _classname; + if (!isClass _medicationConfig) then { + private _parts = _classname splitString "_"; + if ((count _parts) > 1) then { + _parts deleteAt ((count _parts) - 1); + private _trimmedClassname = _parts joinString "_"; + _medicationConfig = _defaultConfig >> _trimmedClassname; + }; }; -}; + _startDose = 20; + private _parts = (_classname splitString "_"); + if (count _parts > 3) then { + _startDose = parseNumber (_parts select -1); + }; + private _bloodBased = GET_STRING(_medicationConfig >> "bloodBased",getText (_defaultConfig >> "bloodBased")); + private _weightBase = GET_STRING(_medicationConfig >> "weightBased",getText (_defaultConfig >> "weightBased")); + private _weightDose = GET_NUMBER(_medicationConfig >> "weightDose",getNumber (_defaultConfig >> "weightDose")); + _weightMult = 1; + if (_weightBase == "true") then { + private _defaultWeight = _patient getVariable [QEGVAR(vitals,currentWeight), 80]; + private _weightFixed = linearConversion [60, 100, _defaultWeight, 10, 30, true]; + private _weightDoseFixed = _startDose; -// Adjust the medication effects and add the medication to the list -TRACE_3("adjustments",_heartRateChange,_painReduce,_viscosityChange); -[_patient, _className, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect] call EFUNC(vitals,addMedicationAdjustment); + if (_weightDose != 20) then { + private _weightDoseMin = GET_NUMBER(_medicationConfig >> "weightDoseMin",getNumber (_defaultConfig >> "weightDoseMin")); + private _weightDoseMax = GET_NUMBER(_medicationConfig >> "weightDoseMax",getNumber (_defaultConfig >> "weightDoseMax")); + _weightDoseFixed = linearConversion [_weightDoseMin, _weightDoseMax, _startDose, 10, 30, true]; + }; + private _weightMult = (_weightDoseFixed/_weightFixed); + } else { + private _lc = linearConversion [10, 30, _startDose, 0.5, 1.5, true]; + _weightMult = _weightMult * _lc; + TRACE_2("weightMult",_weightMult,_lc); + }; + private _medicationParts = _classname splitString "_"; + private _medicationName = _medicationParts select 1; + private _maximumEffectiveDose = 40; + private _currentDose = [_patient, _medicationName] call ACEFUNC(medical_status,getMedicationCount) select 0; + if !(_classname in ["CWMP", "Painkillers", "Penthrox", "Carbonate", "BubbleWrap", "Caffeine", "Pervitin", "Naloxone"]) then { + private _upperMed = toUpper _medicationName; + if (_upperMed select [count _upperMed - 4] isEqualTo "AUTO") then { + _medicationName = _medicationName select [0, count _medicationName - 4]; + }; + if (_upperMed select [count _upperMed - 2] isEqualTo "IV") then { + _medicationName = _medicationName select [0, count _medicationName - 2]; + }; + private _medicationMEDName = format ["syringe_%1", _medicationName]; + private _doseConfig = _defaultConfig >> _medicationMEDName; + _maximumEffectiveDose = GET_NUMBER(_doseConfig >> "maximumEffectiveDose",getNumber (_defaultConfig >> "maximumEffectiveDose")); + } else { + _maximumEffectiveDose = GET_NUMBER(_medicationConfig >> "maximumEffectiveDose",getNumber (_defaultConfig >> "maximumEffectiveDose")); + }; + TRACE_4("medicationEffectivness",_currentDose,_medicationName,_maximumEffectiveDose,_startDose); + private _unitMedEffectivness = _patient getVariable [QGVAR(medicationEffectivness), 1]; + private _maximumEffectiveDose = _maximumEffectiveDose * _unitMedEffectivness; + private _doseMult = 1; + if ((_currentDose + _startDose) > _maximumEffectiveDose) then { + private _excess = (_currentDose + _startDose) - _maximumEffectiveDose; + private _reductionFactor = linearConversion [0, _maximumEffectiveDose, _excess, 1.0, 0.1, true]; + _doseMult = _doseMult * _reductionFactor; + }; + private _routeMult = 1; + if ((_IVarray select _partIndex) in [1, 13]) then { + _routeMult = random [0.7, 0.85, 1]; + }; + if ((_IVarray select _partIndex) == 14) then { + _routeMult = random [1.1, 1.25, 1.35]; + }; + private _hemocrit = 1; + if (_bloodBased == "true") then { + _hemocrit = (GET_BODY_FLUID_ECB(_patient)/GET_BODY_FLUID_ECP(_patient)) / (DEFAULT_ECB/DEFAULT_ECP) + } else { + _hemocrit = (GET_BODY_FLUID_ECP(_patient)/GET_BODY_FLUID_ECB(_patient)) / (DEFAULT_ECP/DEFAULT_ECB) + }; + private _unitMedEffectivness = _patient getVariable [QGVAR(medicationEffectivness), 1]; + private _drugMult = 1; + if (_classname == "Diazapam") then { + private _diazapamMult = 1; + private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); + private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; + private _fentanylEffectiveness = 0; + private _nalbuphineEffectiveness = 0; + private _morphineEffectiveness = 0; + private _lorazepamEffectiveness = 0; + { + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + private _dose = _x select 1; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max (_dose * _effectiveness); + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max (_dose * _effectiveness); + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max (_dose * _effectiveness); + }; + if ("lorazepam" in _medName) then { + _lorazepamEffectiveness = _lorazepamEffectiveness max (_dose * _effectiveness); + }; + } forEach _medStack; + private _diazapamMult = linearConversion [0, 90, (_fentanylEffectiveness + _nalbuphineEffectiveness + _morphineEffectiveness * _lorazepamEffectiveness), 1, 4, true]; + _drugMult = ((((GET_BLOOD_VOLUME_LITERS(_patient) / DEFAULT_BLOOD_VOLUME) * _hemocrit) max 0.2) min 2) * _weightMult * _doseMult * _unitMedEffectivness * _routeMult * _diazapamMult; + } else { + _drugMult = ((((GET_BLOOD_VOLUME_LITERS(_patient) / DEFAULT_BLOOD_VOLUME) * _hemocrit) max 0.2) min 2) * _weightMult * _doseMult * _unitMedEffectivness * _routeMult; + }; + TRACE_7("_drugMult",_patient,_defaultHeartRate,(GET_BLOOD_VOLUME_LITERS(_patient) / DEFAULT_BLOOD_VOLUME),_drugMult,_weightMult,_doseMult,_unitMedEffectivness); + _painReduce = GET_NUMBER(_medicationConfig >> "painReduce",getNumber (_defaultConfig >> "painReduce")) * _drugMult; + _timeInSystem = GET_NUMBER(_medicationConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem")) * _drugMult; + _timeTillMaxEffect = GET_NUMBER(_medicationConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect")) * _drugMult * (2 - _routeMult); + _viscosityChange = GET_NUMBER(_medicationConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange")) * _drugMult; + _alphaFactor = GET_NUMBER(_medicationConfig >> "alphaFactor",getNumber (_defaultConfig >> "alphaFactor")) * _drugMult; + _opioidRelief = GET_NUMBER(_medicationConfig >> "opioidRelief",getNumber (_defaultConfig >> "opioidRelief")) * _drugMult; + _opioidEffect = GET_NUMBER(_medicationConfig >> "opioidEffect",getNumber (_defaultConfig >> "opioidEffect")) * _drugMult; + _respiratoryRate = GET_NUMBER(_medicationConfig >> "respiratoryRate",getNumber (_defaultConfig >> "respiratoryRate")) * _drugMult; + _opioidDepression = GET_NUMBER(_medicationConfig >> "opioidDepression",getNumber (_defaultConfig >> "opioidDepression")) * _drugMult; + _hrIncreaseLow = GET_ARRAY(_medicationConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow")); + _hrIncreaseNormal = GET_ARRAY(_medicationConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal")); + _hrIncreaseHigh = GET_ARRAY(_medicationConfig >> "hrIncreaseHigh",getArray (_defaultConfig >> "hrIncreaseHigh")); + _incompatibleMedication = GET_ARRAY(_medicationConfig >> "incompatibleMedication",getArray (_defaultConfig >> "incompatibleMedication")); + _maxRelief = GET_NUMBER(_medicationConfig >> "maxRelief",getNumber (_defaultConfig >> "maxRelief")); + _dose = GET_NUMBER(_medicationConfig >> "dose",getNumber (_defaultConfig >> "dose")) * (_drugMult / _doseMult) * _startDose; + _contractility = GET_NUMBER(_medicationConfig >> "contractility",getNumber (_defaultConfig >> "contractility")) * _drugMult; + _nauseaMult = GET_NUMBER(_medicationConfig >> "nauseaMult",getNumber (_defaultConfig >> "nauseaMult")) * _drugMult; + _sedation = GET_STRING(_medicationConfig >> "sedation",getText (_defaultConfig >> "sedation")); + _paralysis = GET_STRING(_medicationConfig >> "paralysis",getText (_defaultConfig >> "paralysis")); -// Check for medication compatiblity -[_patient, _className, _incompatibleMedication] call ACEFUNC(medical_treatment,onMedicationUsage); + private _heartRate = GET_HEART_RATE(_patient); + private _hrIncrease = [_hrIncreaseLow, _hrIncreaseNormal, _hrIncreaseHigh] select (floor ((0 max _heartRate min 110) / 55)); + _hrIncrease params ["_minIncrease", "_maxIncrease"]; + _heartRateChange = (_minIncrease + random (_maxIncrease - _minIncrease)) * _drugMult; -if (_className in ["Lorazepam","EACA","TXA","Atropine","Amiodarone","Flumazenil"]) then { - [format ["kat_pharma_%1Local", toLower _className], [_patient, _bodyPart], _patient] call CBA_fnc_targetEvent; -}; + private _presentPain = GET_PAIN(_patient); + private _presentReduce = 0; + if (_maxRelief > 0) then { + if (_presentPain > _maxRelief) then { + _painReduce = _painReduce / 4; + }; + }; + private _medicationParts = (_classname splitString "_"); + TRACE_1("ClassName being processed:",_classname); + TRACE_1("SplitString result for _classname:",_medicationParts); + if (count _medicationParts > 3) then { + _medicationName = _medicationParts select 1; + private _upperMed = toUpper _medicationName; + if (_upperMed select [count _upperMed - 4] isEqualTo "AUTO") then { + _medicationName = _medicationName select [0, count _medicationName - 4]; + }; + if (_upperMed select [count _upperMed - 2] isEqualTo "IV") then { + _medicationName = _medicationName select [0, count _medicationName - 2]; + }; + TRACE_6("adjustments1",_patient,_medicationName,_timeTillMaxEffect,_timeInSystem,_heartRateChange,_painReduce); + TRACE_7("adjustments2",_viscosityChange,_dose,_alphaFactor,_opioidRelief,_opioidEffect,_opioidDepression,_respiratoryRate); + [_patient, _medicationName, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate, _contractility, _nauseaMult, _sedation, _paralysis] call EFUNC(vitals,addMedicationAdjustment); + [_patient, _medicationName, _incompatibleMedication] call FUNC(onMedicationUsage); + } else { + if (_classname in ["TXAAuto", "PhenylephrineAuto"]) then { + private _medicationName = _classname select [0, count _classname - 4]; + TRACE_6("adjustments1",_patient,_classname,_timeTillMaxEffect,_timeInSystem,_heartRateChange,_painReduce); + TRACE_7("adjustments2",_viscosityChange,_dose,_alphaFactor,_opioidRelief,_opioidEffect,_opioidDepression,_respiratoryRate); + [_patient, _medicationName, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate, _contractility, _nauseaMult, _sedation, _paralysis] call EFUNC(vitals,addMedicationAdjustment); + [_patient, _medicationName, _incompatibleMedication] call FUNC(onMedicationUsage); + } else { + TRACE_6("adjustments1",_patient,_classname,_timeTillMaxEffect,_timeInSystem,_heartRateChange,_painReduce); + TRACE_7("adjustments2",_viscosityChange,_dose,_alphaFactor,_opioidRelief,_opioidEffect,_opioidDepression,_respiratoryRate); + [_patient, _classname, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate, _contractility, _nauseaMult, _sedation, _paralysis] call EFUNC(vitals,addMedicationAdjustment); + [_patient, _classname, _incompatibleMedication] call FUNC(onMedicationUsage); + }; + }; -if (_className in ["Fentanyl","Morphine","Nalbuphine"]) then { - [format ["kat_pharma_%1Local", toLower _className], [_patient, _bodyPart, _opioidRelief], _patient] call CBA_fnc_targetEvent; -}; + if (count _medicationParts > 3) then { + _medicationName = _medicationParts select 1; + private _upperMed = toUpper _medicationName; + if (_upperMed select [count _upperMed - 4] isEqualTo "AUTO") then { + _medicationName = _medicationName select [0, count _medicationName - 4]; + }; + if (_upperMed select [count _upperMed - 2] isEqualTo "IV") then { + _medicationName = _medicationName select [0, count _medicationName - 2]; + }; + if (_medicationName in ["TXA","Amiodarone"]) then { + [format ["kat_pharma_%1Local", toLower _medicationName], [_patient, _bodyPart], _patient] call CBA_fnc_targetEvent; + }; + if (_medicationName in ["EACA"]) then { + [format ["kat_pharma_%1Local", toLower _medicationName], [_patient, _bodyPart, _timeTillMaxEffect, _timeInSystem], _patient] call CBA_fnc_targetEvent; + }; + if (_medicationName in ["Lorazepam","Etomidate","Sugammadex","Flumazenil"]) then { + [format ["kat_pharma_%1Local", toLower _medicationName], [_patient, _dose], _patient] call CBA_fnc_targetEvent; + }; + + if (_medicationName in ["Rocuronium","Succinylcholine"]) then { + [format ["kat_pharma_%1Local", toLower _medicationName], [_patient, _dose, _timeTillMaxEffect, _timeInSystem], _patient] call CBA_fnc_targetEvent; + }; + + if (_medicationName in ["Ketamine","Atropine","Adenosine","Alteplase","Lidocaine"]) then { + [format ["kat_pharma_%1Local", toLower _medicationName], [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; + }; + + if (_medicationName in ["Fentanyl","Morphine","Nalbuphine"]) then { + [format ["kat_pharma_%1Local", toLower _medicationName], [_patient, _bodyPart, _opioidRelief], _patient] call CBA_fnc_targetEvent; + }; + } else { + if (_classname in ["Lorazepam","Ketamine","EACA","TXA","Atropine","Amiodarone","Flumazenil","Lidocaine", "TXAAuto"]) then { + [format ["kat_pharma_%1Local", toLower _classname], [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; + }; + + if (_classname in ["Fentanyl","Morphine","Nalbuphine"]) then { + [format ["kat_pharma_%1Local", toLower _classname], [_patient, _bodyPart, _opioidRelief], _patient] call CBA_fnc_targetEvent; + }; + }; + +/* + private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; + private _medicationConfig = _defaultConfig >> _classname; + _painReduce = GET_NUMBER(_medicationConfig >> "painReduce",getNumber (_defaultConfig >> "painReduce")); + _timeInSystem = GET_NUMBER(_medicationConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem")); + _timeTillMaxEffect = GET_NUMBER(_medicationConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect")); + _viscosityChange = GET_NUMBER(_medicationConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange")); + _alphaFactor = GET_NUMBER(_medicationConfig >> "alphaFactor",getNumber (_defaultConfig >> "alphaFactor")); + _opioidRelief = GET_NUMBER(_medicationConfig >> "opioidRelief",getNumber (_defaultConfig >> "opioidRelief")); + _opioidEffect = GET_NUMBER(_medicationConfig >> "opioidEffect",getNumber (_defaultConfig >> "opioidEffect")); + _respiratoryRate = GET_NUMBER(_medicationConfig >> "respiratoryRate",getNumber (_defaultConfig >> "respiratoryRate")); + _opioidDepression = GET_NUMBER(_medicationConfig >> "opioidDepression",getNumber (_defaultConfig >> "opioidDepression")); + _hrIncreaseLow = GET_ARRAY(_medicationConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow")); + _hrIncreaseNormal = GET_ARRAY(_medicationConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal")); + _hrIncreaseHigh = GET_ARRAY(_medicationConfig >> "hrIncreaseHigh",getArray (_defaultConfig >> "hrIncreaseHigh")); + _incompatibleMedication = GET_ARRAY(_medicationConfig >> "incompatibleMedication",getArray (_defaultConfig >> "incompatibleMedication")); + _maxRelief = GET_NUMBER(_medicationConfig >> "maxRelief",getNumber (_defaultConfig >> "maxRelief")); + _dose = GET_NUMBER(_medicationConfig >> "dose",getNumber (_defaultConfig >> "dose")); + _contractility = GET_NUMBER(_medicationConfig >> "_contractility",getNumber (_defaultConfig >> "_contractility")); + _nauseaMult = GET_NUMBER(_medicationConfig >> "nauseaMult",getNumber (_defaultConfig >> "nauseaMult")); + _sedation = GET_STRING(_medicationConfig >> "sedation",getText (_defaultConfig >> "sedation")); + + private _heartRate = GET_HEART_RATE(_patient); + private _hrIncrease = [_hrIncreaseLow, _hrIncreaseNormal, _hrIncreaseHigh] select (floor ((0 max _heartRate min 110) / 55)); + _hrIncrease params ["_minIncrease", "_maxIncrease"]; + _heartRateChange = _minIncrease + random (_maxIncrease - _minIncrease); + + private _presentPain = GET_PAIN(_patient); + private _presentReduce = 0; + if (_maxRelief > 0) then { + if (_presentPain > _maxRelief) then { + _painReduce = _painReduce / 4; + }; + }; + TRACE_6("adjustments1",_patient,_medicationName,_timeTillMaxEffect,_timeInSystem,_heartRateChange,_painReduce); + TRACE_7("adjustments2",_viscosityChange,_dose,_alphaFactor,_opioidRelief,_opioidEffect,_opioidDepression,_respiratoryRate); + [_patient, _classname, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate, _contractility, _nauseaMult, _sedation] call EFUNC(vitals,addMedicationAdjustment); + [_patient, _classname, _incompatibleMedication] call FUNC(onMedicationUsage); + + if (_classname in ["Lorazepam","Ketamine","EACA","TXA","TXAAuto","Atropine","Amiodarone","Flumazenil","Lidocaine"]) then { + [format ["kat_pharma_%1Local", toLower _classname], [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; + }; + + if (_classname in ["Fentanyl","Morphine","Nalbuphine"]) then { + [format ["kat_pharma_%1Local", toLower _classname], [_patient, _bodyPart, _opioidRelief], _patient] call CBA_fnc_targetEvent; + }; +};*/ +private _TXAmedications = ["syringe_TXA_5ml_10", "syringe_TXA_10ml_10", "TXAAuto"]; + if (_classname in _TXAmedications) then { + TRACE_1("TXADose",_patient); + if (_classname in ["TXAAuto"]) then { + _medicationName = _classname select [0, count _classname - 4]; + }; + private _medicationParts = (_classname splitString "_"); + if (count _medicationParts > 3) then { + _medicationName = _medicationParts select 1; + }; + private _medication = _medicationName; + private _administered = _patient getVariable [QGVAR(TXAActive), []]; + private _effectTriggered = _patient getVariable [QGVAR(TXATriggered), false]; + private _windowActive = _patient getVariable [QGVAR(TXAWindow), false]; + if (!(_medication in _administered)) then { + _administered pushBack _medication; + _patient setVariable [QGVAR(TXAActive), _administered, true]; + }; + if (count _administered == 1) then { + _patient setVariable [QGVAR(TXATriggered), false, true]; + [{ + params ["_patient"]; + _patient setVariable [QGVAR(TXAWindow), true, true]; + }, + [_patient], 120] call CBA_fnc_waitAndExecute; + [{ + params ["_patient"]; + _patient setVariable [QGVAR(TXAWindow), false, true]; + }, + [_patient], 300] call CBA_fnc_waitAndExecute; + }; + if ((count _administered == count _TXAmedications) && (_patient getVariable [QGVAR(TXAWindow), false]) && {!_effectTriggered}) then { + _effectTriggered = true; + [_patient, "EACA", 15, 360] call EFUNC(vitals,addMedicationAdjustment); + [_patient, "Body"] call FUNC(treatmentAdvanced_EACALocal); + _patient setVariable [QGVAR(TXATriggered), false, true]; + _patient setVariable [QGVAR(TXAActive), [], true]; + _patient setVariable [QGVAR(TXAWindow), false, true]; + }; + }; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_occlusionCheck.sqf b/addons/pharma/functions/fnc_occlusionCheck.sqf new file mode 100644 index 000000000..2ce727786 --- /dev/null +++ b/addons/pharma/functions/fnc_occlusionCheck.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Checks if an IV is occluded + * + * Arguments: + * 0: The Unit + * 1: BodyPartNumber + * + * Return Value: + * IsOccluded (Bool) + * + * Example: + * [player, 1] call kat_pharma_fnc_getBloodVolumeChange + * + * Public: No + */ + +params ["_unit", "_bodypartN"]; +private _IVarray = _unit getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _isOccluded = false; +private _tourniquets = GET_TOURNIQUETS(_unit); +private _occlusionMap = [ + [4, [4, 5]], + [5, [5]], + [6, [6, 7]], + [7, [7]], + [8, [8, 9, 3]], + [9, [9, 3]], + [10, [10, 11, 3]], + [11, [11, 3]] +]; +private _idx = _occlusionMap findIf { _x#0 == _bodyPartN }; +private _result = if (_idx != -1) then { _occlusionMap select _idx select 1 } else { [] }; +private _isOccluded = ({ _tourniquets select _x != 0 } count _result > 0); +_isOccluded \ No newline at end of file diff --git a/addons/pharma/functions/fnc_onMedicationUsage.sqf b/addons/pharma/functions/fnc_onMedicationUsage.sqf new file mode 100644 index 000000000..716fdb385 --- /dev/null +++ b/addons/pharma/functions/fnc_onMedicationUsage.sqf @@ -0,0 +1,121 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, Cplhardcore + * Handles the medication given to a patient. + * + * Arguments: + * 0: Patient + * 1: Medication Treatment classname + * 2: Incompatible medication > + * + * Return Value: + * None + * + * Example: + * [player, "morphine", [["x", 1]]] call kat_pharma_fnc_onMedicationUsage + * + * Public: No + */ + +params ["_target", "_className", "_incompatibleMedication"]; +TRACE_3("onMedicationUsage",_target,_className,_incompatibleMedication); + if !(_className in ["CWMP", "Painkillers", "Penthrox", "Carbonate", "BubbleWrap", "Caffeine", "Pervitin", "Naloxone"]) then { + _medicationName = format ["syringe_%1", _className]; + private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; + private _medicationConfig = _defaultConfig >> _medicationName; + TRACE_1("onMedicationUsage2",_medicationConfig); + private _maxDose = GET_NUMBER(_medicationConfig >> "maxDose",getNumber (_defaultConfig >> "maxDose")); + private _weightBase = GET_STRING(_medicationConfig >> "weightBased",getText (_defaultConfig >> "weightBased")); + private _maxDoseMult = 1; + if (_weightBase == "true") then { + private _currentWeight = _target getVariable [QEGVAR(vitals,currentWeight), 80]; + _maxDoseMult = linearConversion [60, 100, _currentWeight, 0.6, 1.4, true]; + }; + private _unitMedEffectivness = _target getVariable [QGVAR(medicationEffectivness), 1]; + private _maxDoseFixed = _maxDose * _maxDoseMult * _unitMedEffectivness; + TRACE_2("onMedUsage1",_maxDoseFixed,_medicationName); + + if (_maxDoseFixed > 0) then { + private _maxDoseDeviation = GET_NUMBER(_medicationConfig >> "maxDoseDeviation",getNumber (_defaultConfig >> "maxDoseDeviation")); + private _currentDose = [_target, _className] call EFUNC(misc,getCurrentDosage); + TRACE_2("onMedUsage2",_currentDose,_className); + // Because both {floor random 0} and {floor random 1} return 0 + if (_maxDoseDeviation > 0) then { + _maxDoseDeviation = _maxDoseDeviation + 1; + }; + _maxDoseDeviation * _maxDoseMult * _unitMedEffectivness; + private _limit = _maxDoseFixed + (floor random _maxDoseDeviation); + if (_currentDose > _limit) then { + TRACE_1("exceeded max dose",_currentDose); + [_target, _className, _currentDose, _limit, _incompatibleMedication] call FUNC(overDose); + }; + { + _x params ["_xMed", "_xLimit"]; + private _inSystem = ([_target, _xMed] call ACEFUNC(medical_status,getMedicationCount)) select 0; + if (_inSystem > _xLimit) then { + [_target, _className, _inSystem, _xLimit, _xMed] call FUNC(overDose); + }; + } forEach _incompatibleMedication; + }; + } else { + private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; + private _medicationConfig = _defaultConfig >> _classname; + private _maxDose = GET_NUMBER(_medicationConfig >> "maxDose",getNumber (_defaultConfig >> "maxDose")); + private _currentWeight = _target getVariable [QEGVAR(vitals,currentWeight), 80]; + private _maxDoseMult = linearConversion [60, 100, _currentWeight, 0.7, 1.3, true]; + private _maxDoseFixed = _maxDose * _maxDoseMult; + TRACE_2("onMedUsage1",_maxDoseFixed,_classname); + if (_maxDoseFixed > 0) then { + private _maxDoseDeviation = GET_NUMBER(_medicationConfig >> "maxDoseDeviation",getNumber (_defaultConfig >> "maxDoseDeviation")); + private _currentDose = [_target, _className] call EFUNC(misc,getCurrentDosage); + TRACE_2("onMedUsage2",_currentDose,_classname); + // Because both {floor random 0} and {floor random 1} return 0 + if (_maxDoseDeviation > 0) then { + _maxDoseDeviation = _maxDoseDeviation + 1; + }; + + private _limit = _maxDoseFixed + (floor random _maxDoseDeviation); + if (_currentDose > _limit) then { + TRACE_1("exceeded max dose",_currentDose); + [_target, _classname, _currentDose, _limit, _classname] call FUNC(overDose); + }; + }; + +// Check incompatible medication (format [med,limit]) + { + _x params ["_xMed", "_xLimit"]; + private _inSystem = ([_target, _xMed] call ACEFUNC(medical_status,getMedicationCount)) select 0; + if (_inSystem > _xLimit) then { + [_target, _classname, _inSystem, _xLimit, _xMed] call FUNC(overDose); + }; + } forEach _incompatibleMedication; + }; + +/*} else { + private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; + private _medicationConfig = _defaultConfig >> _classname; + private _maxDose = GET_NUMBER(_medicationConfig >> "maxDose",getNumber (_defaultConfig >> "maxDose")); + + if (_maxDose > 0) then { + private _maxDoseDeviation = GET_NUMBER(_medicationConfig >> "maxDoseDeviation",getNumber (_defaultConfig >> "maxDoseDeviation")); + private _currentDose = [_target, _className] call ACEFUNC(medical_status,getMedicationCount) select 0; + // Because both {floor random 0} and {floor random 1} return 0 + if (_maxDoseDeviation > 0) then { + _maxDoseDeviation = _maxDoseDeviation + 1; + }; + + private _limit = _maxDose + (floor random _maxDoseDeviation); + if (_currentDose > _limit) then { + TRACE_1("exceeded max dose",_currentDose); + [_target, _classname, _currentDose, _limit, _classname] call FUNC(overDose); + }; + }; + +// Check incompatible medication (format [med,limit]) + { + _x params ["_xMed", "_xLimit"]; + private _inSystem = ([_target, _xMed] call ACEFUNC(medical_status,getMedicationCount)) select 0; + if (_inSystem > _xLimit) then { + [_target, _classname, _inSystem, _xLimit, _xMed] call FUNC(overDose); + }; + } forEach _incompatibleMedication;}*/ diff --git a/addons/pharma/functions/fnc_overDose.sqf b/addons/pharma/functions/fnc_overDose.sqf new file mode 100644 index 000000000..dd83a5692 --- /dev/null +++ b/addons/pharma/functions/fnc_overDose.sqf @@ -0,0 +1,49 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effects of a medication. + * + * Arguments: + * 0: The patient + * 1: Medication Treatment classname + * 2: Incompatable medication > + * + * Return Value: + * None + * + * Example: + * [player, "morphine"] call kat_pharma_fnc_overDose + * Public: No + */ + +params ["_unit", "_className", "_dose", "_limit", "_incompatibleMedication"]; +TRACE_2("overDose",_className,_patient); +[format ["kat_pharma_%1OverdoseLocal", toLower _className], [_unit], _unit] call CBA_fnc_targetEvent; + +/*else { +private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "Medication"; +private _medicationConfig = (configFile >> "ace_medical_treatment" >> _classname); +private _onOverDose = getText (_medicationConfig >> "onOverDose"); + + if (isClass _medicationConfig) then { + _medicationConfig = _medicationConfig >> _classname; + if (isText (_medicationConfig >> "onOverDose")) then { + _onOverDose = getText (_medicationConfig >> "onOverDose"); + }; + }; + TRACE_2("overdose",_classname,_onOverDose); + + [QEGVAR(medical,overdose), [_unit, _classname, _dose, _limit, _incompatibleMed]] call CBA_fnc_localEvent; + + if (_onOverDose == "") exitWith { + TRACE_1("CriticalVitals Event",_unit); + [QEGVAR(medical,CriticalVitals), _unit] call CBA_fnc_localEvent; + }; + + _onOverDose = if (missionNamespace isNil _onOverDose) then { + compile _onOverDose + } else { + missionNamespace getVariable _onOverDose + }; + + [_unit, _classname, _dose, _limit, _incompatibleMed] call _onOverDose};*/ \ No newline at end of file diff --git a/addons/pharma/functions/fnc_prepareInfusion.sqf b/addons/pharma/functions/fnc_prepareInfusion.sqf new file mode 100644 index 000000000..25ca60eb8 --- /dev/null +++ b/addons/pharma/functions/fnc_prepareInfusion.sqf @@ -0,0 +1,35 @@ +#define DEBUG_MODE_FULL +#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", "_infusionClassName", "_size"]; +TRACE_1("Size",_size); +if (_size == "100") then { + _player removeItem "kat_salineIV100"; +} else { + _player removeItem "ace_salineIV_250"; +}; +_katClassName = "kat_" + _medicationType; +_player removeItem _katClassName; +_player addItem _infusionClassName; +private _infusionDisplayName = getText (configFile >> "CfgWeapons" >> _infusionClassName >> "displayName"); +private _name = format [LELSTRING(GUI,Prepared_Infusion), _infusionDisplayName]; +[_name, 2, _player, 10] call ACEFUNC(common,displayTextStructured); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_prepareSyringe.sqf b/addons/pharma/functions/fnc_prepareSyringe.sqf new file mode 100644 index 000000000..56d68456e --- /dev/null +++ b/addons/pharma/functions/fnc_prepareSyringe.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam, modified by Cplhardcore + * Removes a syringe and a given medication and + * returns a "crafted" syringe with fluid + * + * Arguments: + * 0: Player + * 1: Class name of medication + * 2: Syringe type + * 3: Dose type + * + * Return Value: + * None + * + * Example: + * [player, "TXA", "5ml", "1"] call kat_pharma_fnc_prepareSyringe; + * + * Public: No + */ +params ["_player", "_medicationType", "_syringeType", "_doseType"]; + +private _syringeClassName = format ["kat_syringe_%1_%2_%3", _medicationType, _syringeType, _doseType]; +private _baseSyringe = format ["kat_%1_syringe", _syringeType]; +private _katClassName = "kat_" + _medicationType; + +private _container = objNull; +private _where = ""; +if (_baseSyringe in uniformItems _player) then { + _container = uniformContainer _player; + _where = "uniform"; +}; +if (_container isEqualTo objNull && {_baseSyringe in vestItems _player}) then { + _container = vestContainer _player; + _where = "vest"; +}; +if (_container isEqualTo objNull && {_baseSyringe in backpackItems _player}) then { + _container = backpackContainer _player; + _where = "backpack"; +}; +_player removeItem _baseSyringe; +_player removeItem _katClassName; +switch (_where) do { + case "uniform": { _player addItemToUniform _syringeClassName }; + case "vest": { _player addItemToVest _syringeClassName }; + case "backpack": { _player addItemToBackpack _syringeClassName }; + default { _player addItem _syringeClassName }; +}; +private _syringeDisplayName = getText (configFile >> "CfgWeapons" >> _syringeClassName >> "displayName"); +private _name = format [LELSTRING(GUI,Prepared_Syringe), _syringeDisplayName]; + +[_name, 2, _player, 10] call ACEFUNC(common,displayTextStructured); +[ACEFUNC(medical_gui,openMenu), ACEGVAR(medical_gui,target)] call CBA_fnc_execNextFrame; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_removeIV.sqf b/addons/pharma/functions/fnc_removeIV.sqf index 185132ace..71d11f932 100644 --- a/addons/pharma/functions/fnc_removeIV.sqf +++ b/addons/pharma/functions/fnc_removeIV.sqf @@ -21,12 +21,30 @@ params ["_medic", "_patient", "_bodyPart"]; 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; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _return = false; -if (_IVactual > 0) then { - _return = true; +private _limbIndices = [ + ["leftarm", [4, 5]], + ["rightarm", [6, 7]], + ["leftleg", [8, 9]], + ["rightleg", [10, 11]], + ["upperleftarm", [4, 5]], + ["upperrightarm", [6, 7]], + ["upperleftleg", [8, 9]], + ["upperrightleg", [10, 11]] +]; + +private _limb = _limbIndices select {_x#0 == toLower _bodyPart}; + +if (_limb isNotEqualTo []) then { + { + if ((_IVarray select _x) > 0) exitWith {_return = true}; + } forEach (_limb#0#1); +} else { + if (_partIndex >= 0 && (_IVarray select _partIndex) > 0) then { + _return = true; + }; }; _return diff --git a/addons/pharma/functions/fnc_removeIVBag.sqf b/addons/pharma/functions/fnc_removeIVBag.sqf new file mode 100644 index 000000000..ad5e52f15 --- /dev/null +++ b/addons/pharma/functions/fnc_removeIVBag.sqf @@ -0,0 +1,153 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Removes and returns all IV bags of a type to the medic + * Note: Patient may not be local + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Check IV Condition + * + * Example: + * [player, cursorObject, "LeftLeg", "saline"] call kat_pharma_fnc_removeIVBag; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_type"]; + +private _partIndex = ALL_BODY_PARTS find (toLowerANSI _bodyPart); +private _ivBags = _patient getVariable [QACEGVAR(medical,ivBags), []]; + +private _saline = 0; +private _blood = 0; +private _plasma = 0; +private _ringersLactate = 0; +private _packedRBC = 0; +private _hextend = 0; +private _hyperSaline = 0; +private _fbtk = 0; +private _totalIvVolume = 0; + +// Remove matching bags and collect volumes +private _newArray = []; + +{ + _x params ["_volumeRemaining", "_ivType", "_ivPartIndex"]; + + if ( + _ivPartIndex == _partIndex && + ( + (_type isEqualTo "FBTK" && {_ivType in ["FBTK_500", "FBTK_250"]}) || + (_type isNotEqualTo "FBTK" && {_ivType isEqualTo _type}) + ) + ) then { + _totalIvVolume = _totalIvVolume + _volumeRemaining; + switch (_ivType) do { + case "Saline": { _saline = _saline + _volumeRemaining; }; + case "Blood": { _blood = _blood + _volumeRemaining; }; + case "Plasma": { _plasma = _plasma + _volumeRemaining; }; + case "Ringers Lactate": { _ringersLactate = _ringersLactate + _volumeRemaining; }; + case "PackedRBC": { _packedRBC = _packedRBC + _volumeRemaining; }; + case "Hextend": { _hextend = _hextend + _volumeRemaining; }; + case "Hypertonic Saline": { _hyperSaline = _hyperSaline + _volumeRemaining; }; + case "FBTK_500": { _fbtk = _fbtk + _volumeRemaining; }; + case "FBTK_250": { _fbtk = _fbtk + _volumeRemaining; }; + }; + } else { + _newArray pushBack _x; + }; +} forEach _ivBags; + +if (_totalIvVolume >= 1) then { + private _refundIV = { + params ["_volume", "_items"]; + + switch (true) do { + case (_volume >= 3000): { {_medic addItem _x} forEach [_items#0, _items#0, _items#0];}; + case (_volume >= 2750): { {_medic addItem _x} forEach [_items#0, _items#0, _items#1, _items#2];}; + case (_volume >= 2500): { {_medic addItem _x} forEach [_items#0, _items#0, _items#1];}; + case (_volume >= 2250): { {_medic addItem _x} forEach [_items#0, _items#0, _items#2];}; + case (_volume >= 2000): { {_medic addItem _x} forEach [_items#0, _items#0];}; + case (_volume >= 1750): { {_medic addItem _x} forEach [_items#0, _items#1, _items#2];}; + case (_volume >= 1500): { {_medic addItem _x} forEach [_items#0, _items#1];}; + case (_volume >= 1250): { {_medic addItem _x} forEach [_items#0, _items#2];}; + case (_volume >= 1000): { _medic addItem _items#0;}; + case (_volume >= 750): { {_medic addItem _x} forEach [_items#1, _items#2];}; + case (_volume >= 500): { _medic addItem _items#1;}; + case (_volume >= 250): { _medic addItem _items#2;}; + }; + }; + if (_saline > 250) then { + [_saline, ["ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250"]] call _refundIV; + }; + if (_blood > 250) then { + [_blood, ["ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"]] call _refundIV; + }; + if (_plasma > 250) then { + [_plasma, ["ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250"]] call _refundIV; + }; + if (_ringersLactate > 250) then { + [_ringersLactate, ["kat_RingersLactateIV", "kat_RingersLactateIV_500", "kat_RingersLactateIV_250"]] call _refundIV; + }; + if (_hextend > 250) then { + [_hextend, ["kat_HextendIV", "kat_HextendIV_500", "kat_HextendIV_250"]] call _refundIV; + }; + if (_packedRBC > 250) then { + switch (true) do { + case (_packedRBC >= 3000): { for "_i" from 1 to 6 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 2750): { for "_i" from 1 to 5 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 2500): { for "_i" from 1 to 5 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 2250): { for "_i" from 1 to 4 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 2000): { for "_i" from 1 to 4 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 1750): { for "_i" from 1 to 3 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 1500): { for "_i" from 1 to 3 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 1250): { for "_i" from 1 to 2 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 1000): { for "_i" from 1 to 2 do { _medic addItem "kat_PackedRBCIV_500"; }; }; + case (_packedRBC >= 750): { _medic addItem "kat_PackedRBCIV_500"; _medic addItem "kat_PackedRBCIV_250"; }; + case (_packedRBC >= 500): { _medic addItem "kat_PackedRBCIV_500"; }; + case (_packedRBC >= 250): { _medic addItem "kat_PackedRBCIV_250"; }; + }; + }; + if (_hyperSaline > 250) then { + switch (true) do { + case (_hyperSaline >= 3000): { for "_i" from 1 to 6 do { _medic addItem "kat_HypertonicSalineIV_500"; };}; + case (_hyperSaline >= 2750): { for "_i" from 1 to 5 do { _medic addItem "kat_HypertonicSalineIV_500"; }; _medic addItem "kat_HypertonicSalineIV_250";}; + case (_hyperSaline >= 2500): { for "_i" from 1 to 5 do { _medic addItem "kat_HypertonicSalineIV_500"; };}; + case (_hyperSaline >= 2250): { for "_i" from 1 to 4 do { _medic addItem "kat_HypertonicSalineIV_500"; }; _medic addItem "kat_HypertonicSalineIV_250";}; + case (_hyperSaline >= 2000): { for "_i" from 1 to 4 do { _medic addItem "kat_HypertonicSalineIV_500"; };}; + case (_hyperSaline >= 1750): { for "_i" from 1 to 3 do { _medic addItem "kat_HypertonicSalineIV_500"; }; _medic addItem "kat_HypertonicSalineIV_250";}; + case (_hyperSaline >= 1500): { for "_i" from 1 to 3 do { _medic addItem "kat_HypertonicSalineIV_500"; };}; + case (_hyperSaline >= 1250): { for "_i" from 1 to 2 do { _medic addItem "kat_HypertonicSalineIV_500"; }; _medic addItem "kat_HypertonicSalineIV_250";}; + case (_hyperSaline >= 1000): { for "_i" from 1 to 2 do { _medic addItem "kat_HypertonicSalineIV_500"; }; }; + case (_hyperSaline >= 750): { _medic addItem "kat_HypertonicSalineIV_500"; _medic addItem "kat_HypertonicSalineIV_250"; }; + case (_hyperSaline >= 500): { _medic addItem "kat_HypertonicSalineIV_500"; }; + case (_hyperSaline >= 250): { _medic addItem "kat_HypertonicSalineIV_250"; }; + }; + }; + if (_fbtk > 240) then { + + private _blood = [_patient] call EFUNC(circulation,bloodType); + private _item = ""; + switch (true) do { + case (_fbtk >= 490): { + _item = "kat_FBTKbloodIV_" + _blood + "_500"; + }; + case (_fbtk >= 240): { + _item = "kat_FBTKbloodIV_" + _blood + "_250"; + }; + default { + _item = ""; + }; + }; + if (_item != "") then { + _medic addItem _item; + }; + }; +}; + +_patient setVariable [QACEGVAR(medical,ivBags), _newArray, true]; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_removeIVCheck.sqf b/addons/pharma/functions/fnc_removeIVCheck.sqf new file mode 100644 index 000000000..7d4e79d3a --- /dev/null +++ b/addons/pharma/functions/fnc_removeIVCheck.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski.H + * Removes the IV from the patient on the given body part. + * Note: Patient may not be local + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * + * Return Value: + * Remove IV + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_pharma_fnc_removeIV; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _IVactual = _IVarray select _partIndex; +private _return = false; + +if (_IVactual > 0) then { + _return = true; +}; + +_return diff --git a/addons/pharma/functions/fnc_removePressure.sqf b/addons/pharma/functions/fnc_removePressure.sqf new file mode 100644 index 000000000..df3936d67 --- /dev/null +++ b/addons/pharma/functions/fnc_removePressure.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _hasPressureBag = false; +if ((_pressureBag select _partIndex) == 1) then { + _hasPressureBag = true; +}; +_hasPressureBag diff --git a/addons/pharma/functions/fnc_retrieveIV.sqf b/addons/pharma/functions/fnc_retrieveIV.sqf index a3e68c693..b307ad612 100644 --- a/addons/pharma/functions/fnc_retrieveIV.sqf +++ b/addons/pharma/functions/fnc_retrieveIV.sqf @@ -20,108 +20,115 @@ params ["_medic", "_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _newArray = _patient getVariable [QACEGVAR(medical,ivBags), []]; private _IVactual = _IVarray select _partIndex; if(GVAR(IVreuse)) then { - if (_IVactual == 1) then { - _medic addItem "kat_IO_FAST"; - } else { - _medic addItem "kat_IV_16"; - }; + switch (_IVactual) do { + case 1: {_patient addItem "kat_IO_FAST"}; + case 2: {_patient addItem "kat_IV_16"}; + case 3: {_patient addItem "kat_IV_14"}; + case 4: {_patient addItem "kat_IV_20"}; + case 13: {_patient addItem "kat_EZ_IO"}; + default {}; + }; }; _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; -private _totalIvVolume = 0; +private _ivFlow = _patient getVariable [QGVAR(IVFlow), [0,0,0,0,0,0,0,0,0,0,0,0]]; + +private _pairs = [[4,5], [6,7], [8,9], [10,11]]; +private _affectedPair = _pairs findIf { _partIndex in _x }; + +if (_affectedPair != -1) then { + { + _ivFlow set [_x, 0]; + } forEach (_pairs select _affectedPair); +} else { + _ivFlow set [_partIndex, 0]; +}; + +_patient setVariable [QGVAR(IVFlow), _ivFlow, true]; + +private _ivBags = _patient getVariable [QACEGVAR(medical,ivBags), []]; + private _saline = 0; private _blood = 0; private _plasma = 0; +private _ringersLactate = 0; +private _packedRBC = 0; +private _totalIvVolume = 0; + +// Remove matching bags and collect volumes +private _newArray = []; { - _x params ["_volumeRemaining", "_type", "_partIndex2"]; - if (_partIndex2 == _partIndex) then { - _newArray deleteAt _forEachIndex; - - switch (_type) do { - case ("Saline"): { - _saline = _saline + _volumeRemaining; - }; - case ("Blood"): { - _blood = _blood + _volumeRemaining; - }; - case ("Plasma"): { - _plasma = _plasma + _volumeRemaining; - }; + _x params ["_volumeRemaining", "_ivType", "_ivPartIndex"]; + + if (_ivPartIndex == _partIndex) then { + _totalIvVolume = _totalIvVolume + _volumeRemaining; + + switch (_ivType) do { + case "Saline": { _saline = _saline + _volumeRemaining; }; + case "Blood": { _blood = _blood + _volumeRemaining; }; + case "Plasma": { _plasma = _plasma + _volumeRemaining; }; + case "Ringers Lactate": { _ringersLactate = _ringersLactate + _volumeRemaining; }; + case "PackedRBC": { _packedRBC = _packedRBC + _volumeRemaining; }; }; + } else { + _newArray pushBack _x; }; - _totalIvVolume = _totalIvVolume + _volumeRemaining; -} forEach (_patient getVariable [QACEGVAR(medical,ivBags), []]); +} forEach _ivBags; if (_totalIvVolume >= 1) then { - if (_saline > 1) then { + private _refundIV = { + params ["_volume", "_items"]; + switch (true) do { - case (_saline > 1200): { - _medic addItem "ACE_salineIV"; - _medic addItem "ACE_salineIV_500"; - }; - case (_saline > 800): { - _medic addItem "ACE_salineIV"; - }; - case (_saline > 600): { - _medic addItem "ACE_salineIV_500"; - _medic addItem "ACE_salineIV_250"; - }; - case (_saline > 400): { - _medic addItem "ACE_salineIV_500"; - }; - case (_saline > 150): { - _medic addItem "ACE_salineIV_250"; - }; + case (_volume >= 3000): { {_medic addItem _x} forEach [_items#0, _items#0, _items#0];}; + case (_volume >= 2750): { {_medic addItem _x} forEach [_items#0, _items#0, _items#1, _items#2];}; + case (_volume >= 2500): { {_medic addItem _x} forEach [_items#0, _items#0, _items#1];}; + case (_volume >= 2250): { {_medic addItem _x} forEach [_items#0, _items#0, _items#2];}; + case (_volume >= 2000): { {_medic addItem _x} forEach [_items#0, _items#0];}; + case (_volume >= 1750): { {_medic addItem _x} forEach [_items#0, _items#1, _items#2];}; + case (_volume >= 1500): { {_medic addItem _x} forEach [_items#0, _items#1];}; + case (_volume >= 1250): { {_medic addItem _x} forEach [_items#0, _items#2];}; + case (_volume >= 1000): { _medic addItem _items#0;}; + case (_volume >= 750): { {_medic addItem _x} forEach [_items#1, _items#2];}; + case (_volume >= 500): { _medic addItem _items#1;}; + case (_volume >= 250): { _medic addItem _items#2;}; }; }; - if (_blood > 1) then { - switch (true) do { - case (_blood > 1200): { - _medic addItem "ACE_bloodIV"; - _medic addItem "ACE_bloodIV_500"; - }; - case (_blood > 800): { - _medic addItem "ACE_bloodIV"; - }; - case (_blood > 600): { - _medic addItem "ACE_bloodIV_500"; - _medic addItem "ACE_bloodIV_250"; - }; - case (_blood > 400): { - _medic addItem "ACE_bloodIV_500"; - }; - case (_blood > 150): { - _medic addItem "ACE_bloodIV_250"; - }; - }; + if (_saline > 250) then { + [_saline, ["ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250"]] call _refundIV; + }; + if (_blood > 250) then { + [_blood, ["ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250"]] call _refundIV; + }; + if (_plasma > 250) then { + [_plasma, ["ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250"]] call _refundIV; + }; + if (_ringersLactate > 250) then { + [_ringersLactate, ["kat_RingersLactateIV", "kat_RingersLactateIV_500", "kat_RingersLactateIV_250"]] call _refundIV; }; - if (_plasma > 1) then { + + if (_packedRBC > 250) then { switch (true) do { - case (_plasma > 1200): { - _medic addItem "ACE_plasmaIV"; - _medic addItem "ACE_plasmaIV_500"; - }; - case (_plasma > 800): { - _medic addItem "ACE_plasmaIV"; - }; - case (_plasma > 600): { - _medic addItem "ACE_plasmaIV_500"; - _medic addItem "ACE_plasmaIV_250"; - }; - case (_plasma > 400): { - _medic addItem "ACE_plasmaIV_500"; - }; - case (_plasma > 150): { - _medic addItem "ACE_plasmaIV_250"; - }; + case (_packedRBC >= 3000): { for "_i" from 1 to 6 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 2750): { for "_i" from 1 to 5 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 2500): { for "_i" from 1 to 5 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 2250): { for "_i" from 1 to 4 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 2000): { for "_i" from 1 to 4 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 1750): { for "_i" from 1 to 3 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 1500): { for "_i" from 1 to 3 do { _medic addItem "kat_PackedRBCIV_500"; };}; + case (_packedRBC >= 1250): { for "_i" from 1 to 2 do { _medic addItem "kat_PackedRBCIV_500"; }; _medic addItem "kat_PackedRBCIV_250";}; + case (_packedRBC >= 1000): { for "_i" from 1 to 2 do { _medic addItem "kat_PackedRBCIV_500"; }; }; + case (_packedRBC >= 750): { _medic addItem "kat_PackedRBCIV_500"; _medic addItem "kat_PackedRBCIV_250"; }; + case (_packedRBC >= 500): { _medic addItem "kat_PackedRBCIV_500"; }; + case (_packedRBC >= 250): { _medic addItem "kat_PackedRBCIV_250"; }; }; }; }; diff --git a/addons/pharma/functions/fnc_salineCheck.sqf b/addons/pharma/functions/fnc_salineCheck.sqf index 574c8db41..7ae90dd97 100644 --- a/addons/pharma/functions/fnc_salineCheck.sqf +++ b/addons/pharma/functions/fnc_salineCheck.sqf @@ -20,9 +20,9 @@ params ["_medic", "_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; -if (_IVactual != 3) exitWith {false}; +if ([7,8,9] find _IVactual == -1) exitWith {false}; private _fluidCheck = _patient getVariable [QACEGVAR(medical,ivBags), []]; private _check = false; diff --git a/addons/pharma/functions/fnc_tourniquetRemove.sqf b/addons/pharma/functions/fnc_tourniquetRemove.sqf index d7bfabbec..2043025e9 100644 --- a/addons/pharma/functions/fnc_tourniquetRemove.sqf +++ b/addons/pharma/functions/fnc_tourniquetRemove.sqf @@ -24,6 +24,7 @@ TRACE_3("tourniquetRemove",_medic,_patient,_bodyPart); // Remove tourniquet from body part, exit if no tourniquet applied private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); +private _tourniquetArray = GET_KAT_TOURNIQUETS(_patient); if (_tourniquets select _partIndex == 0) exitWith { if (_medic == ACE_player) then { @@ -33,6 +34,8 @@ if (_tourniquets select _partIndex == 0) exitWith { _tourniquets set [_partIndex, 0]; _patient setVariable [VAR_TOURNIQUET, _tourniquets, true]; +_tourniquetArray set [_partIndex, 0]; +_patient setVariable [VAR_KAT_TOURNIQUET, _tourniquetArray, true]; [_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); @@ -57,11 +60,13 @@ if (_medic call ACEFUNC(common,isPlayer)) then { private _occludedMedications = _patient getVariable [QACEGVAR(medical,occludedMedications), []]; private _arrayModified = false; -if (((_patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]) select _partIndex) isNotEqualTo 3) then { +if !(((_patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex) in [7, 8, 9]) then { { - _x params ["_bodyPartN", "_medication"]; + _x params ["_bodyPartN", "_medication", "_unit"]; - if (_partIndex == _bodyPartN) then { + private _isStillOccluded = [_unit, _bodyPartN] call FUNC(occlusionCheck); + TRACE_1("delayed medication call after tourniquet removal",_isStillOccluded); + if (!_isStillOccluded) then { TRACE_1("delayed medication call after tourniquet removal",_x); [QGVAR(medicationLocal), [_patient, _bodyPart, _medication], _patient] call CBA_fnc_targetEvent; _occludedMedications set [_forEachIndex, []]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AdenosineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AdenosineLocal.sqf new file mode 100644 index 000000000..7c34a128c --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AdenosineLocal.sqf @@ -0,0 +1,45 @@ +#include "..\script_component.hpp" +/* + * Author:Cplhardcore + * Does the AV block effect of adenosine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [cursorTarget, "ACE_adenosine"] call kat_pharma_fnc_treatmentAdvanced_AdenosineLocal; + * + * Public: No + */ +params ["_patient", "_classname"]; +if (_classname isEqualTo "ACE_adenosine") exitWith {}; +private _cardiacRhythm = _patient getVariable [QEGVAR(circulation,cardiacArrestType), 0]; +_patient setVariable [QEGVAR(circulation,cardiacArrestType), 1]; +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["Amiodarone"]; +private _amiodaroneEffectiveness = 0; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("amiodarone" in _medName) then { + _amiodaroneEffectiveness = _amiodaroneEffectiveness max _effectiveness; + }; +} forEach _medStack; +_time = 1; +if (_amiodaroneEffectiveness > 0.2) then { + _time = random(12) + 12 +} else { + _time = random(6) + 6 +}; + +[{ + params ["_patient", "_cardiacRhythm"]; + if (((random 1000) < 1) && (_cardiacRhythm > 2)) then { + _patient setVariable [QEGVAR(circulation,cardiacArrestType), 0, true]; + } else { + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _cardiacRhythm, true]; + }; +}, [_patient, _cardiacRhythm], _time] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AdenosineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AdenosineOverdoseLocal.sqf new file mode 100644 index 000000000..782cff18a --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AdenosineOverdoseLocal.sqf @@ -0,0 +1,83 @@ +#include "..\script_component.hpp" +/* + * Author:Cplhardcore + * Handles the overdose effect of Adenosine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [cursorTarget] call kat_pharma_fnc_treatmentAdvanced_AdenosineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; + +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_adenosineOverdoseTarget"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _adenosineOverdoseTarget = _adenosineOverdoseTarget + 1; + _args set [1, _adenosineOverdoseTarget]; + if (_adenosineOverdoseTarget > 12) exitWith { + if (random(100) < 15) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _surfaceArea = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]) - 10; + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea, true]; + }, 15, [_patient, 0]] call CBA_fnc_addPerFrameHandler; +}, _patient, 15] call CBA_fnc_waitAndExecute; +[{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); + private _medIndex = _medStack find "Adenosine"; + private _hasMed = false; + + if (_medIndex > -1) then { + private _medCount = _medStack select (_medIndex + 1); + _hasMed = (_medCount > 0); + if (_hasMed) then { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + }; +}, 5, [_patient]] call CBA_fnc_addPerFrameHandler; +[{_hasmed},{ + params ["_patient"]; + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_AdenosineTarget"]; + _AdenosineTarget = _AdenosineTarget + 1; + _args set [1, _AdenosineTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _AdenosineTarget = _AdenosineTarget + 1; + if (_AdenosineTarget > 18) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _surfaceArea = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]) + 10; + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 10] call CBA_fnc_waitAndExecute; +}, [_patient]] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AlteplaseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AlteplaseLocal.sqf new file mode 100644 index 000000000..f8e9700c4 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AlteplaseLocal.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Alteplase + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [cursorTarget] call kat_pharma_fnc_treatmentAdvanced_AlteplaseLocal; + * + * Public: No + */ +params ["_patient"]; +private _medicationArray = _patient getVariable [QACEGVAR(medical,medications), []]; +{ + _x params ["_medication"]; + private _lowerMed = toLower _medication; + if ( + (_lowerMed find "txa" != -1) || + (_lowerMed find "eaca" != -1) + ) then { + _medicationArray deleteAt (_medicationArray find _x); + }; +} forEach _medicationArray; + +_patient setVariable [QACEGVAR(medical,medications), _medicationArray, true]; +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_AlteplaseTarget"]; + _AlteplaseTarget = _AlteplaseTarget + 1; + _args set [1, _AlteplaseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _AlteplaseTarget = _AlteplaseTarget + 1; + _args set [1, _AlteplaseTarget]; + if (_AlteplaseTarget > 24) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler;}; + private _surfaceArea = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]) + 5; + if (_surfaceArea < 400) then { + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea, true]; + }; + private _bloodlevels = GET_BODY_FLUID(_patient); + _bloodlevels set [5, ((_bloodlevels select 5) - 5) max 0]; + _patient setVariable [QEGVAR(circulation,bodyFluid), _bloodlevels, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 15] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AlteplaseOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AlteplaseOverdoseLocal.sqf new file mode 100644 index 000000000..b5283393a --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AlteplaseOverdoseLocal.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Alteplase + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [cursorTarget] call kat_pharma_fnc_treatmentAdvanced_AlteplaseOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = 10 + floor random ((25 - 10) + 1); +[_patient, "AlteplaseOverdose", 30, 600, _hrAdjust, 0, 0, 0.2] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_AlteplaseTarget"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _AlteplaseTarget = _AlteplaseTarget + 1; + _args set [1, _AlteplaseTarget]; + if (_AlteplaseTarget > 100) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler;}; + private _bloodlevels = GET_BODY_FLUID(_patient); + _bloodlevels set [0, ((_bloodlevels select 0) - 5) max 0]; + _bloodlevels set [5, ((_bloodlevels select 5) - 10) max 0]; + _patient setVariable [QEGVAR(circulation,bodyFluid), _bloodlevels, true]; + }, 5, [_patient, 0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 15] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneLocal.sqf index 04073ee61..cc076e852 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneLocal.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Mazinski.H, Edited by MiszczuZPolski + * Author: Mazinski.H, Edited by MiszczuZPolski and Cplhardcore * Applies Bradycardia randomly * * Arguments: @@ -14,10 +14,9 @@ * * Public: No */ - params ["_patient"]; - private _random = random 3; if (_random <= 1) then { - [_patient, "BRADYCARDIA", 120, 1200, -40, 0, 0] call ACEFUNC(medical_status,addMedicationAdjustment); + private _hrAdjust = -50 + floor random ((-30 - -50) + 1); + [_patient, "BRADYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); }; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneOverdoseLocal.sqf new file mode 100644 index 000000000..6c91759e7 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AmiodaroneOverdoseLocal.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski.H, Edited by MiszczuZPolski and Cplhardcore + * Handles the overdose effect Amiodarone + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [cursorTarget] call kat_pharma_fnc_treatmentAdvanced_AmiodaroneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "BRADYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); +[_patient, "AmiodaroneOverdose", 30, 600, 0, 0, 0, 0.2] call EFUNC(vitals,addMedicationAdjustment); diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_ApplyPressureBag.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_ApplyPressureBag.sqf new file mode 100644 index 000000000..a9166b6cb --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_ApplyPressureBag.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +[QGVAR(applyPressureBag), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_ApplyPressureBagLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_ApplyPressureBagLocal.sqf new file mode 100644 index 000000000..6a74975ea --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_ApplyPressureBagLocal.sqf @@ -0,0 +1,41 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; +_pressureBag set [_partIndex, 1]; +_patient setVariable [QGVAR(pressureBag), _pressureBag, true]; +[{ + params ["_medic", "_patient", "_partIndex"]; + private _iv = (_patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex; + (_iv in [0, 15]); +}, { + params ["_medic", "_patient", "_partIndex"]; + private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; + _pressureBag set [_partIndex, 0]; + _patient setVariable [QGVAR(pressureBag), _pressureBag, true]; + [_medic, "kat_pressureBag"] call ACEFUNC(common,addToInventory); +}, [_medic, _patient, _partIndex], 3600, { + params ["_medic", "_patient", "_partIndex"]; + private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; + _pressureBag set [_partIndex, 0]; + _patient setVariable [QGVAR(pressureBag), _pressureBag, true]; + [_medic, "kat_pressureBag"] call ACEFUNC(common,addToInventory); +}] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AtropineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AtropineLocal.sqf index 478cd95ff..f5d98b333 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_AtropineLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AtropineLocal.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: Mazinski.H - * Locates and Removes Bradycardia Effect. + * * * Arguments: * 0: Patient @@ -10,21 +10,9 @@ * None * * Example: - * [player] call kat_pharma_fnc_treatmentAdvanced_AtropineLocal; + * [player, syringe_atropine_5ml_2] call kat_pharma_fnc_treatmentAdvanced_AtropineLocal; * * Public: No */ -params ["_patient"]; - -private _medicationArray = _patient getVariable [QACEGVAR(medical,medications), []]; - -{ - _x params ["_medication"]; - - if (_medication isEqualTo "BRADYCARDIA") exitWith { - _medicationArray deleteAt (_medicationArray find _x); - }; -} forEach (_medicationArray); - -_patient setVariable [QACEGVAR(medical,medications), _medicationArray, true]; +params ["_patient", "_classname"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_AtropineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_AtropineOverdoseLocal.sqf new file mode 100644 index 000000000..719d79d0d --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_AtropineOverdoseLocal.sqf @@ -0,0 +1,85 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski.H + * Locates and Removes Bradycardia Effect. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, syringe_atropine_5ml_2] call kat_pharma_fnc_treatmentAdvanced_AtropineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_atropineOverdoseTarget"]; + _atropineOverdoseTarget = _atropineOverdoseTarget + 1; + _args set [1, _atropineOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_atropineOverdoseTarget > 12) exitWith { + if (random(100) < 15) then { + [{ + params ["_patient"]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.05; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + private _rr = (_patient getVariable [QEGVAR(breathing,respiratoryRateMultiplier), 1]) - 0.07; + _patient setVariable [QEGVAR(breathing,respiratoryRateMultiplier), _rr, true]; + }, 15, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, _patient, 15] call CBA_fnc_waitAndExecute; +[{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); + private _medIndex = _medStack find "Atropine"; + private _hasMed = false; + + if (_medIndex > -1) then { + private _medCount = _medStack select (_medIndex + 1); + _hasMed = (_medCount > 0); + if (_hasMed) then { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + }; +}, 5, [_patient]] call CBA_fnc_addPerFrameHandler; +[{_hasmed},{ + params ["_patient"]; + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_atropineTarget"]; + _atropineTarget = _atropineTarget + 1; + _args set [1, _atropineTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _atropineTarget = _atropineTarget + 1; + if (_atropineTarget > 18) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) - 0.05; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + private _rr = (_patient getVariable [QEGVAR(breathing,respiratoryRateMultiplier), 1]) + 0.07; + _patient setVariable [QEGVAR(breathing,respiratoryRateMultiplier), _rr, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 120] call CBA_fnc_waitAndExecute; +}, [_patient]] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_BicarbonateOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_BicarbonateOverdoseLocal.sqf new file mode 100644 index 000000000..bca14bb6d --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_BicarbonateOverdoseLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CWMPOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CWMPOverdoseLocal.sqf new file mode 100644 index 000000000..25de06dfc --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CWMPOverdoseLocal.sqf @@ -0,0 +1,77 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Begins CWMP Treatment + * + * Arguments: + * 0: patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_CWMPOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +if GVAR(kidneyAction) then + {[ + { + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_kidneyTarget"]; + _kidneyTarget = _kidneyTarget + 1; + _args set [1, _kidneyTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _kidneyTarget = _kidneyTarget + 1; + if (_kidneyTarget > 12) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler;}; + private _ph = (_patient getVariable [QGVAR(externalPh), 0]) + 30; + _patient setVariable [QGVAR(externalPh), _ph, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, _patient, 15] call CBA_fnc_waitAndExecute; +}; +[{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); + private _medIndex = _medStack find "CWMP"; + private _hasMed = false; + + if (_medIndex > -1) then { + private _medCount = _medStack select (_medIndex + 1); + _hasMed = (_medCount > 0); + if (_hasMed) then { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + }; +}, 5, [_patient]] call CBA_fnc_addPerFrameHandler; +[{_hasmed},{ + params ["_patient"]; + [_patient, "CWMPOverdose", 5, 360, 0, 0, 0, 0.1] call EFUNC(vitals,addMedicationAdjustment); + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_kidneyTarget"]; + _kidneyTarget = _kidneyTarget + 1; + _args set [1, _kidneyTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _kidneyTarget = _kidneyTarget + 1; + if (_kidneyTarget > 12) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler;}; + private _bloodlevels = GET_BODY_FLUID(_patient); + _bloodlevels set [5, ((_bloodlevels select 5) - 5) max 0]; + _patient setVariable [QEGVAR(circulation,bodyFluid), _bloodlevels, true]; + }, 15, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 15] call CBA_fnc_waitAndExecute; +}, [_patient]] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineLocal.sqf index b9e1a2daa..ce70ae68b 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineLocal.sqf @@ -23,7 +23,7 @@ if (ACEGVAR(advanced_fatigue,enabled)) then { [{ params ["_patient"]; - ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 1500; + ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 700; }, [_patient], 2.5] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineOverdoseLocal.sqf new file mode 100644 index 000000000..36cc309ea --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CaffeineOverdoseLocal.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_CaffeineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = 20 + floor random ((30 - 10) + 1); +[_patient, "CaffeineOverdose", 5, 600, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CalciumChlorideOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CalciumChlorideOverdoseLocal.sqf new file mode 100644 index 000000000..bca14bb6d --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CalciumChlorideOverdoseLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CalciumGluconateOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CalciumGluconateOverdoseLocal.sqf new file mode 100644 index 000000000..bca14bb6d --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CalciumGluconateOverdoseLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateLocal.sqf index f6ffcc142..294a49c3b 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateLocal.sqf @@ -18,11 +18,13 @@ params ["_medic", "_patient"]; -private _sedated = _patient getVariable [QEGVAR(surgery,sedated), false]; -if (_sedated) exitWith {}; +private _sedated = _patient getVariable [QEGVAR(surgery,sedated), 0]; +if (_sedated > 0.1) exitWith {}; -private _bloodPressureH = GET_BLOOD_PRESSURE(_patient) select 1; +private _bloodPressure = GET_BLOOD_PRESSURE(_patient); +_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; +private _map = GET_MAP(_patient); -if ((floor (random 100) < ((linearConversion [50, 100, _bloodPressureH, 0, GVAR(carbonateChance), true]) min (linearConversion [140, 200, _bloodPressureH, GVAR(carbonateChance), 0, true]))) && {[_patient] call EFUNC(vitals,hasStableVitals)}) then { +if ((floor (random 100) < ((linearConversion [60, 93, _map, 0, GVAR(carbonateChance), true]) min (linearConversion [93, 120, _map, GVAR(carbonateChance), 0, true]))) && {[_patient] call EFUNC(vitals,hasStableVitals)} && !(GET_CONVERT_STATUS(_patient))) then { [_patient, false] call ACEFUNC(medical,setUnconscious); }; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateOverdoseLocal.sqf new file mode 100644 index 000000000..f1800b8f7 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CarbonateOverdoseLocal.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Checks for Carbonate Wakeup values to restore consciousness + * + * Arguments: + * 1: Patient + * + * Return Value: + * None + *` + * Example: + * [player, cursorTarget] call kat_pharma_fnc_treatmentAdvanced_CarbonateOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = 10 + floor random ((30 - 10) + 1); +[_patient, "CarbonateOverdose", 5, 360, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CheckCoag.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CheckCoag.sqf index 771d25a77..157714a8f 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_CheckCoag.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CheckCoag.sqf @@ -18,20 +18,64 @@ params ["_medic", "_patient"]; -private _coagFactors = _patient getVariable [QGVAR(coagulationFactor), 30]; -private _missionCoagFactors = missionNamespace getVariable [QGVAR(coagulation_factor_count), 30]; -private _slowINR = (_missionCoagFactors / 100) * 75; -private _shighINR = (_missionCoagFactors / 100) * 125; -private _hlowINR = (_missionCoagFactors / 100) * 50; -private _hhighINR = (_missionCoagFactors / 100) * 150; -private _output = ""; - -switch (true) do { - case (_coagFactors < _slowINR && _coagFactors > _hlowINR): { _output = LLSTRING(CheckCoag_slightly_lowINR)}; - case (_coagFactors > _shighINR && _coagFactors < _hhighINR): { _output = LLSTRING(CheckCoag_slightly_aboveINR)}; - case (_coagFactors <= _hlowINR): { _output = LLSTRING(CheckCoag_highly_lowINR)}; - case (_coagFactors >= _hhighINR): { _output = LLSTRING(CheckCoag_highly_aboveINR)}; - default { _output = LLSTRING(CheckCoag_normalINR)}; +private _woundClotDelayMult = 1; +private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["Alteplase", "CWMP"]; +private _alteplaseEffectiveness = 0; +private _cwmpEffectiveness = 0; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("alteplase" in _medName) then { + _alteplaseEffectiveness = _alteplaseEffectiveness max _effectiveness; + }; + if ("cwmp" in _medName) then { + _cwmpEffectiveness = _cwmpEffectiveness max _effectiveness; + }; +} forEach _medStack; +private _cwmpFixedEffectiveness = linearConversion [0, 1, _cwmpEffectiveness, 1, 1.3]; +private _alteplaseFixedEffectiveness = linearConversion [0, 1, _alteplaseEffectiveness, 1, 10]; +private _coagulationFactor = GET_BODY_FLUID_PLATELETS(_patient); +private _coagMult = linearConversion [0, 600, _coagulationFactor, 3, 1, true]; +private _hypothermiaDelay = 1; +if (EGVAR(hypothermia,hypothermiaActive)) then { + _hypothermiaDelay = linearConversion [35, 17, (_patient getVariable [QEGVAR(hypothermia,unitTemperature), 37]), 1, 3, true]; }; +private _ph = GET_PH(_patient); +private _ca = GET_CA(_patient); +// Calcium effect (low Ca = slower clotting) +private _calciumDelayMult = linearConversion [ + 1.2, 2.4, + _ca, + 2.0, 1.0, // up to 2× slower clotting + true +]; +private _phDelayMult = linearConversion [ + 7.0, 7.4, + _ph, + 3.0, 1.0, + true +]; +private _woundClotDelayMult = ( + _alteplaseFixedEffectiveness * + (_coagMult + _hypothermiaDelay) * + _cwmpFixedEffectiveness * + _calciumDelayMult * + _phDelayMult + ) min 10; +[_patient, "quick_view", LLSTRING(Coag_Sense_Log), [_woundClotDelayMult]] call ACEFUNC(medical_treatment,addToLog); +if (EGVAR(circulation,abgEnable)) then { + private _bloodGasArray = GET_BLOOD_GAS(_patient); + _bloodGasArray params ["_paCO2", "_paO2", "_spO2", "_hCO3", "_pH", "_etCO2"]; + private _ca = GET_CA(_patient); + private _patientName = [_patient] call ACEFUNC(common,getName); + private _output = format ["Patient: %1, PaCO2: %2, PaO2: %3, SpO2: %4", _patientName, _paCO2 toFixed 2, _paO2 toFixed 2, _spO2 toFixed 2]; + private _output1 = format ["Patient: %1, HCO3: %2, pH: %3, Ca %4", _patientName, _hCO3 toFixed 2, _pH toFixed 2, _ca toFixed 2]; + [_output, 3, _medic] call ACEFUNC(common,displayTextStructured); + [_patient, "quick_view", _output, [_medic]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "quick_view", _output1, [_medic]] call ACEFUNC(medical_treatment,addToLog); + _bloodGasArray pushBack _ca; + _patient setVariable [QEGVAR(circulation,testedBloodGas), _bloodGasArray, true]; + _patient setVariable [QEGVAR(circulation,bloodGasTime), CBA_missionTime, true]; -[_patient, "quick_view", LLSTRING(Coag_Sense_Log), [_output]] call ACEFUNC(medical_treatment,addToLog); +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_CheckVein.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_CheckVein.sqf new file mode 100644 index 000000000..60e6f8fa8 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_CheckVein.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Checks the Coag Factors and displays it to the player + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Bodypart + * + * Return Value: + * None + *` + * Example: + * [player, cursorTarget, "LeftLeg"] call kat_pharma_fnc_treatmentAdvanced_CheckVein; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodypart"]; + + private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; + private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _IVactual = _IVarray select _partIndex; + + if (_IVactual == 20) then { + [QACEGVAR(common,displayTextStructured), [[LSTRING(CheckVein_VeinBlown)], 1.5, _medic], _medic] call CBA_fnc_targetEvent; +} else { + [QACEGVAR(common,displayTextStructured), [[LSTRING(CheckVein_VeinFine)], 1.5, _medic], _medic] call CBA_fnc_targetEvent; +}; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_DialysisLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_DialysisLocal.sqf index d3f69e4ef..59e07ff11 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_DialysisLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_DialysisLocal.sqf @@ -16,13 +16,43 @@ * Public: No */ +params ["_medic", "_patient"]; +/* + * Performs dialysis over 5 minutes. + * Fails if patient moves or changes seat/vehicle. + * + * Arguments: + * 0: Medic + * 1: Patient + */ + params ["_medic", "_patient"]; -_patient setVariable [QACEGVAR(medical,medications), [], true]; -_patient setVariable [QGVAR(externalPh), 0, true]; -_patient setVariable [QGVAR(kidneyFail), false, true]; -_patient setVariable [QGVAR(kidneyArrest), false, true]; -_patient setVariable [QGVAR(kidneyPressure), false, true]; +if (isNull _patient || !alive _patient) exitWith {}; +if (_patient getVariable [QGVAR(dialysisRunning), false]) exitWith {}; +private _startVeh = vehicle _patient; +_patient setVariable [QGVAR(dialysisRunning), true, true]; +[_patient, "activity", LSTRING(dialysis_Start), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); -[_patient, "Dialysis"] call ACEFUNC(medical_treatment,addToTriageCard); -[_patient, "activity", LSTRING(dialysis_log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); +[{ + params ["_patient", "_startVeh"]; + (!alive _patient) || (abs (speed _patient) > 1 && isNull objectParent _patient) || ((vehicle _patient) != _startVeh); +}, { + [_patient, "activity", LSTRING(dialysis_Failed), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); +}, [_patient, _startVeh], 300, { + params ["_patient"]; + _patient setVariable [QACEGVAR(medical,medications), [], true]; + _patient setVariable [QGVAR(externalPh), 0, true]; + _patient setVariable [QGVAR(kidneyFail), false, true]; + _patient setVariable [QGVAR(kidneyArrest), false, true]; + _patient setVariable [QGVAR(kidneyPressure), false, true]; + _patient setVariable [QGVAR(serumCalcium), 2.4, true]; + _patient setVariable [QGVAR(externalCa), 0, true]; + _patient setVariable [QGVAR(dialysisRunning), false, true]; + private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; + _ht deleteAt (_ht find "hypercalcemia"); + _ht deleteAt (_ht find "hypocalcemia"); + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; + [_patient, "Dialysis"] call ACEFUNC(medical_treatment,addToTriageCard); + [_patient, "activity", LSTRING(dialysis_Finished), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); +}] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_DiazepamOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_DiazepamOverdoseLocal.sqf new file mode 100644 index 000000000..33da163e3 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_DiazepamOverdoseLocal.sqf @@ -0,0 +1,45 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _diazapamMult = 1; +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _fentanylEffectiveness = 0; +private _nalbuphineEffectiveness = 0; +private _morphineEffectiveness = 0; +private _lorazepamEffectiveness = 0; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + private _dose = _x select 1; + if ("fentanyl" in _medName) then { + _fentanylEffectiveness = _fentanylEffectiveness max (_dose * _effectiveness); + }; + if ("nalbuphine" in _medName) then { + _nalbuphineEffectiveness = _nalbuphineEffectiveness max (_dose * _effectiveness); + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max (_dose * _effectiveness); + }; + if ("morphine" in _medName) then { + _morphineEffectiveness = _morphineEffectiveness max (_dose * _effectiveness); + }; + if ("lorazepam" in _medName) then { + _lorazepamEffectiveness = _lorazepamEffectiveness max (_dose * _effectiveness); + }; +} forEach _medStack; +private _diazapamMult = linearConversion [0, 90, (_fentanylEffectiveness + _nalbuphineEffectiveness + _morphineEffectiveness + _lorazepamEffectiveness), 1, 3, true]; +[_patient, "DiazepamOverdose", 30, 600, 0, 0, 0, 0, 0, 0, 0, -(random [0.1, 0.15, 0.3] * _diazapamMult)] call EFUNC(vitals,addMedicationAdjustment); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_DoxapramOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_DoxapramOverdoseLocal.sqf new file mode 100644 index 000000000..acab5f606 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_DoxapramOverdoseLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effects of Doxapram + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_DoxapramOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_EACALocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_EACALocal.sqf index 1d68d41d3..cfc20b37c 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_EACALocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_EACALocal.sqf @@ -16,12 +16,12 @@ * Public: No */ -params ["_patient", "_bodyPart"]; +params ["_patient", "_bodyPart", "_timeTillMaxEffect", "_timeInSystem"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; -private _countEACA = ([_patient, "EACA"] call ACEFUNC(medical_status,getMedicationCount)) select 1; +private _eacaEffectiveness = [_patient, "EACA", false] call ACEFUNC(medical_status,getMedicationCount) select 1; private _allowStack = missionNamespace getVariable [QGVAR(allowStackScript_EACA), true]; private _keepRunning = missionNamespace getVariable [QGVAR(keepScriptRunning_EACA), false]; private _cycleTime = missionNamespace getVariable [QGVAR(bandageCycleTime_EACA), 5]; @@ -29,31 +29,146 @@ private _cycleTime = missionNamespace getVariable [QGVAR(bandageCycleTime_EACA), if (_IVactual > 1) then { private _randomNumber = random 100; - if (_IVactual != 4) exitWith { + if (_IVactual in [2, 3, 4]) exitWith { if (_randomNumber < GVAR(blockChance)) then { [{ params ["_patient", "_IVarray", "_partIndex", "_IVactual"]; - if (_IVactual > 1 && _IVactual != 4) exitWith {}; - _IVarray set [_partIndex, 3]; + if (_IVactual > 1 && ([10,11,12] find _IVactual == -1)) exitWith {}; + _IVarray set [_partIndex, _IVactual + 5]; _patient setVariable [QGVAR(IV), _IVarray, true]; }, [_patient, _IVarray, _partIndex, _IVactual], (random 300)] call CBA_fnc_waitAndExecute; }; }; - _IVarray set [_partIndex, 2]; + _IVarray set [_partIndex, _IVactual]; _patient setVariable [QGVAR(IV), _IVarray, true]; }; -if (!(GVAR(coagulation)) || GVAR(coagulation_allow_EACA_script)) then { - if (_IVactual != 3) then { - if (_countEACA > 1 && !(_allowStack)) exitWith {}; +private _fnc_eacaClot = { + params ["_patient", "_bodyPart", "_id", "_amount", "_bleeding", "_damage", "_delay", "_oldBandage"]; + [{ + params ["_patient", "_bodyPart", "_id", "_amount", "_bleeding", "_damage", "_oldBandage", "_newBandage"]; + if !(alive _patient) exitWith {}; + private _coagWoundsLive = GET_COAGED_WOUNDS(_patient); + private _currentWounds = _coagWoundsLive getOrDefault [_bodyPart, []]; + private _minorIndex = -1; + private _minorWound = -1; + { + _x params ["_idW", "_amount", "_bleeding", "_damage", "_bandage", "_time"]; + if ((_bandage isEqualTo _oldBandage) && (_idW isEqualTo _id)) exitWith { + _minorIndex = _forEachIndex; + _minorWound = _x; + }; + } forEach _currentWounds; + + if (_minorIndex == -1) exitWith {}; + _minorWound params ["_id", "_amount", "_bleeding", "_damage", "_bandage", "_time"]; + _currentWounds deleteAt _minorIndex; + private _newWound = [_id, _amount, _bleeding, _damage, _newBandage, CBA_missionTime]; + _currentWounds pushBack _newWound; + _coagWoundsLive set [_bodyPart, _currentWounds]; + _patient setVariable [VAR_COAGED_WOUNDS, _coagWoundsLive, true]; + + private _impact = _amount; + private _woundIndex = count _currentWounds - 1; + private _finalWound = _currentWounds select _woundIndex; + [_patient, _impact, _bodyPart, _woundIndex, _finalWound, _newBandage, false] call EFUNC(misc,handleCoagReopening); + }, [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _oldBandage, _newBandage], _delay] call CBA_fnc_waitAndExecute; +}; + + +if (GVAR(coagulation)) then { + if (([7,8,9] find _IVactual) == -1) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_timeInSystem", "_fnc_eacaClot"]; + + if !(alive _patient) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + private _random = random [6.4, 6.8, 7.2]; + private _ph = GET_PH(_patient); + + if (_random <= _ph) then { + private _coagWounds = GET_COAGED_WOUNDS(_patient); + private _pulse = _patient getVariable [VAR_HEART_RATE, 80]; + + if (_coagWounds isEqualTo createHashMap) exitWith {}; + if (GET_BLOOD_VOLUME_LITERS(_patient) < GVAR(coagulation_requireBV)) exitWith {}; + if ((_pulse < 20) && {GVAR(coagulation_requireHR)}) exitWith {}; + + { + private _bodyPart = _x; + + // Skip if tourniquet applied and blocking is enabled + private _bodyPartN = ALL_BODY_PARTS find _x; + if ([_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck) + && { missionNamespace getVariable [QGVAR(coagulation_tourniquetBlock), true] }) then { + continue; + }; + + private _wounds = _coagWounds getOrDefault [_bodyPart, []]; + + { + _x params ["_id", "_amount", "_bleeding", "_damage", "_bandage", "_time"]; + switch (true) do { + case (_bandage isEqualTo "BloodClotMinor"): { + private _delay = random [30, 45, 60]; + private _newBandage = "BloodClotMinorEACA"; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage] call _fnc_eacaClot; + }; + case (_bandage isEqualTo "BloodClotMedium"): { + private _delay = random [60, 90, 120]; + private _newBandage = "BloodClotMediumEACA"; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage] call _fnc_eacaClot; + }; + case (_bandage isEqualTo "BloodClotLarge"): { + private _delay = random [90, 120, 160]; + private _newBandage = "BloodClotLargeEACA"; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage] call _fnc_eacaClot; + }; + case (_bandage isEqualTo "BloodClotMinorTXA"): { + private _delay = random [20, 35, 60]; + private _newBandage = "BloodClotMinorEACA"; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage] call _fnc_eacaClot; + }; + case (_bandage isEqualTo "BloodClotMediumTXA"): { + private _delay = random [45, 60, 90]; + private _newBandage = "BloodClotMediumEACA"; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage] call _fnc_eacaClot; + }; + case (_bandage isEqualTo "BloodClotLargeTXA"): { + private _delay = random [60, 90, 120]; + private _newBandage = "BloodClotLargeEACA"; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage] call _fnc_eacaClot; + }; + default {}; + }; + } forEach _wounds; + + } forEach (keys _coagWounds); + }; + [{ + params ["_patient", "_idPFH"]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }, [_patient, _idPFH], _timeInSystem] call CBA_fnc_waitAndExecute; + + }, 10, [_patient, _timeInSystem, _fnc_eacaClot]] call CBA_fnc_addPerFrameHandler; + }; +}; + + +if (!(GVAR(coagulation)) || GVAR(coagulation_allow_EACA_script)) then { + if ([7,8,9] find _IVactual == -1) then { + if ((_eacaEffectiveness < 0.3) && (!_allowStack)) exitWith {}; [{ params ["_args", "_idPFH"]; - _args params ["_patient", "_keepRunning"]; + _args params ["_patient", "_keepRunning", "_timeInSystem"]; private _alive = alive _patient; private _exit = true; @@ -69,10 +184,10 @@ if (!(GVAR(coagulation)) || GVAR(coagulation_allow_EACA_script)) then { { _x params ["_targetBodyPart"]; - private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); - private _bandagedWoundsOnPart = _bandagedWounds getOrDefault [_targetBodyPart, []]; - - if (_bandagedWoundsOnPart isEqualTo [] || [_patient,_x] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) then { + private _coagWounds = GET_BANDAGED_WOUNDS(_patient); + private _bandagedWoundsOnPart = _coagWounds getOrDefault [_targetBodyPart, []]; + private _bodyPartN = ALL_BODY_PARTS find _x; + if (_bandagedWoundsOnPart isEqualTo [] || [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck)) then { continue; }; @@ -98,9 +213,9 @@ if (!(GVAR(coagulation)) || GVAR(coagulation_allow_EACA_script)) then { _patient setVariable [VAR_STITCHED_WOUNDS, _stitchedWounds, true]; _bandagedWoundsOnPart deleteAt _index; - _bandagedWounds set [_targetBodyPart, _bandagedWoundsOnPart]; + _coagWounds set [_targetBodyPart, _bandagedWoundsOnPart]; - _patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; + _patient setVariable [VAR_BANDAGED_WOUNDS, _coagWounds, true]; private _partIndex = ALL_BODY_PARTS find _targetBodyPart; private _bodyPartDamage = _patient getVariable [QACEGVAR(medical,bodyPartDamage), []]; @@ -122,12 +237,12 @@ if (!(GVAR(coagulation)) || GVAR(coagulation_allow_EACA_script)) then { params ["_patient", "_idPFH"]; [_idPFH] call CBA_fnc_removePerFrameHandler; }, - [_patient, _idPFH], 300] call CBA_fnc_waitAndExecute; + [_patient, _idPFH], _timeInSystem] call CBA_fnc_waitAndExecute; if (_exit && !(_keepRunning)) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - }, _cycleTime,[_patient, _keepRunning]] call CBA_fnc_addPerFrameHandler; + }, _cycleTime,[_patient, _keepRunning, _timeInSystem]] call CBA_fnc_addPerFrameHandler; }; }; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_EACAOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_EACAOverdoseLocal.sqf new file mode 100644 index 000000000..77d0fe284 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_EACAOverdoseLocal.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of EACA + * + * Arguments: + * 0: Patient + * + * + * Return Value: + * None + * + * Example: + * [_patient] call kat_pharma_fnc_treatmentAdvanced_EACAOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; + +[_patient, "EACAOverdose", 1, 900, 0, 0, -0.5] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_EACAOverdoseTarget"]; + _EACAOverdoseTarget = _EACAOverdoseTarget + 1; + _args set [1, _EACAOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_EACAOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _surface = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]); + if (_surface > 150) then { + private _surfaceArea = _surface - 10; + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea, true];; + }; + private _bloodlevels = GET_BODY_FLUID(_patient); + _bloodlevels set [5, ((_bloodlevels select 5) - 20) max 0]; + _patient setVariable [QEGVAR(circulation,bodyFluid), _bloodlevels, true]; + if ((random 10000) < 1) then {[_patient, "EACAOD"] call ACEFUNC(medical_status,setDead);}; + }, 15, [_patient, 0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 15] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_EpinephrineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_EpinephrineOverdoseLocal.sqf new file mode 100644 index 000000000..88aa52123 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_EpinephrineOverdoseLocal.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Local function for Epi Overdose + * + * Arguments: + * 0: Patient + * 1: Body Part + * + * Return Value: + * None + * + * Example: + * [_patient] call kat_pharma_fnc_treatmentAdvanced_EpinephrineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = 30 + floor random ((60 - 30) + 1); +[_patient, "TACHYCARDIA", 30, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); +if (random 10 < 1) then { + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_EtomidateLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_EtomidateLocal.sqf new file mode 100644 index 000000000..b4883d927 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_EtomidateLocal.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the effect of Etomidate + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_EtomidateLocal; + * + * Public: No + */ +params ["_patient", "_dose"]; + +private _currentWeight = _patient getVariable [QEGVAR(vitals,currentWeight), 80]; +private _doseNormalized = linearConversion [10, 30, _dose, 15, 35, true]; +private _weightNormalized = linearConversion [60, 100, _currentWeight, 10, 30, true]; +if (_doseNormalized > _weightNormalized) then { + _patient setVariable [QGVAR(activeEtomidateLoadingDose), true, true]; + [_patient, "Etomidate", 5, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "true"] call EFUNC(vitals,addMedicationAdjustment); + [_patient, true] call ACEFUNC(medical,setUnconscious); + [{ + params ["_patient"]; + _patient setVariable [QGVAR(activeEtomidateLoadingDose), false, true]; + }, [_patient], 180] call CBA_fnc_waitAndExecute; + +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_EtomidateOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_EtomidateOverdoseLocal.sqf new file mode 100644 index 000000000..0900c4bc2 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_EtomidateOverdoseLocal.sqf @@ -0,0 +1,177 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Etomidate + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_EtomidateOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; + +private _randomNumber = floor (random 3) + 1; +switch (_randomNumber) do { + case 1: { + [_patient, "EtomidateOverdose", 120, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0] call EFUNC(vitals,addMedicationAdjustment); + private _hrAdjust = -40 + floor random ((-20 - -40) + 1); + [_patient, "BRADYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_etomidateOverdoseTarget"]; + _etomidateOverdoseTarget = _etomidateOverdoseTarget + 1; + _args set [1, _etomidateOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_etomidateOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "EtomidateOD"}) == -1) then { + _ht pushBack "EtomidateOD"; + + 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; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 30, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 30] call CBA_fnc_waitAndExecute; + }; + case 2: { + [_patient, "EtomidateOverdose", 120, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0] call EFUNC(vitals,addMedicationAdjustment); + private _hrAdjust = 20 + floor random ((40 - 20) + 1); + [_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_etomidateOverdoseTarget"]; + _etomidateOverdoseTarget = _etomidateOverdoseTarget + 1; + _args set [1, _etomidateOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_etomidateOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "EtomidateOD"}) == -1) then { + _ht pushBack "EtomidateOD"; + + 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; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 30, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 30] call CBA_fnc_waitAndExecute; + }; + case 3: { + [_patient, "EtomidateOverdose", 120, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0] call EFUNC(vitals,addMedicationAdjustment); + private _hrAdjust = 20 + floor random ((40 - 20) + 1); + [_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_etomidateOverdoseTarget"]; + _etomidateOverdoseTarget = _etomidateOverdoseTarget + 1; + _args set [1, _etomidateOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_etomidateOverdoseTarget > 12) exitWith { + if (random(100) < 15) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + private _rr = (_patient getVariable [QEGVAR(breathing,respiratoryRateMultiplier), 1]) - 0.06; + _patient setVariable [QEGVAR(breathing,respiratoryRateMultiplier), _rr, true]; + }, 30, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 30] call CBA_fnc_waitAndExecute; + }; + case 4: { + [_patient, "EtomidateOverdose", 120, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0] call EFUNC(vitals,addMedicationAdjustment); + private _hrAdjust = -40 + floor random ((-20 - -40) + 1); + [_patient, "BRADYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + [{ + params ["_patient"]; + + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_etomidateOverdoseTarget"]; + _etomidateOverdoseTarget = _etomidateOverdoseTarget + 1; + _args set [1, _etomidateOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_etomidateOverdoseTarget > 12) exitWith { + if (random(100) < 15) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + private _rr = (_patient getVariable [QEGVAR(breathing,respiratoryRateMultiplier), 1]) - 0.06; + _patient setVariable [QEGVAR(breathing,respiratoryRateMultiplier), _rr, true]; + }, 30, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 30] call CBA_fnc_waitAndExecute; + }; +}; +if (EGVAR(feedback,effectOverdose)) then + { + PP_wetD = ppEffectCreate ["WetDistortion",300]; + PP_wetD ppEffectEnable true; + PP_wetD ppEffectAdjust [9.7,0.2,-0.1,1.84,1.46,0.33,0.86,0.05,0.05,0.05,0.05,0.1,0.1,0.2,0.2]; + PP_wetD ppEffectCommit 0; + // Date YYYY-MM-DD-HH-MM: [2035,6,24,8,0]. Overcast: 0.3. Fog: 0.0823474. Fog params: [0.0800016,0.013,0] + // GF PostProcess Editor parameters: Copy the following line to clipboard and click Import in the editor. + //[[false,100,[0.2,0.2,0.26,0.3]],[false,200,[0.05,0.05,true]],[true,300,[9.7,0.2,-0.1,1.84,1.46,0.33,0.86,0.05,0.05,0.05,0.05,0.1,0.1,0.2,0.2]],[false,1500,[1,1,0,[2,2,2,-0.1],[5,5,5,1],[4,0.33,0.33,0],[0.66,0,0.96,0,0,0,4]]],[false,500,[2.06]],[false,2000,[0.44,1,1,0.5,0.5,true]],[false,2500,[1,1,1]]] + [{PP_wetD ppEffectEnable false; PP_wetD ppEffectCommit 0;}, [], 600] call CBA_fnc_waitAndExecute;}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FentanylOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylOverdoseLocal.sqf new file mode 100644 index 000000000..2a4fd022c --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylOverdoseLocal.sqf @@ -0,0 +1,53 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Fentanyl + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_FentanylOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; + +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "fentanylOverdose", 120, 1200, _hrAdjust, 0, 0, 0, 0.4, 0, 0, 0.17, -0.3] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_fentanylOverdoseTarget"]; + _fentanylOverdoseTarget = _fentanylOverdoseTarget + 1; + _args set [1, _fentanylOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_fentanylOverdoseTarget > 6) exitWith { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "opioidOD"}) == -1) then { + _ht pushBack "opioidOD"; + 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], 10] call CBA_fnc_waitAndExecute; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medications = _patient getVariable [QACEGVAR(medical,medications), []]; + if (_medications findIf {_x isEqualTo "naloxone"} != -1) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 10] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatch.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatch.sqf new file mode 100644 index 000000000..13477e7e6 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatch.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Modified: Mazinski + * Triggers the fentanyl visual effect and applies the opioid factor from Fentanyl. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg", 1] call kat_pharma_fnc_treatmentAdvanced_FentanylLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; + +[QGVAR(fentanylPatchLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; + +[_patient, _classname] call ACEFUNC(medical_treatment,addToTriageCard); +[_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), LSTRING(fentpatch_display)]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchCheck.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchCheck.sqf new file mode 100644 index 000000000..51d8fd0c6 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchCheck.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Modified: Mazinski + * Triggers the fentanyl visual effect and applies the opioid factor from Fentanyl. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg", 1] call kat_pharma_fnc_treatmentAdvanced_FentanylLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +private _fentPatchArray = _patient getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _return = _fentPatchArray findIf { _x > 0 } > -1; +_return \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchLocal.sqf new file mode 100644 index 000000000..342af1be4 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchLocal.sqf @@ -0,0 +1,43 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Modified: Mazinski + * Triggers the fentanyl visual effect and applies the opioid factor from Fentanyl. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg", 1] call kat_pharma_fnc_treatmentAdvanced_FentanylLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _fentPatch = _patient getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]; +[_patient, "Fentanyl", 0, 3, 0, 0, 0, 1, 0, 1.02, 0.05, 0.1, -0.05, 0, 0.12] call EFUNC(vitals,addMedicationAdjustment); +_fentPatch set [_partIndex, 1]; +_patient setVariable [VAR_FENT_PATCH, _fentPatch, true]; +[{ + params ["_patient", "_partIndex"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_partIndex"]; + if !((alive _patient) || (HAS_FENT_PATCH(_patient,_partIndex))) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _fentPatch = _patient getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _fentPatchIndex = _fentPatch select _partIndex; + _fentPatch set [_partIndex, ((_fentPatchIndex - (0.002 * random [0.8, 1, 1.2])) max 0)]; + _patient setVariable [VAR_FENT_PATCH, _fentPatch, true]; + private _painAdjust = linearConversion [0.6, 0, _fentPatchIndex, 1, 0.01, true]; + private _painSuppress = _patient getVariable [QACEGVAR(medical,painSuppress), 0]; + private _painSupressAdjustment = ((0.6 - _painSuppress) max 0) min _painAdjust; + _patient setVariable [QACEGVAR(medical,painSuppress), 0 max _painSupressAdjustment, true]; + [_patient, "Fentanyl", 0, 3, 0, 0, 0, 3, 0, 1.02, 0.05, 0.1, -0.05, 0, 0.12] call EFUNC(vitals,addMedicationAdjustment); + }, 2, [_patient,_partIndex]] call CBA_fnc_addPerFrameHandler; +}, [_patient, _partIndex], 1] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchRemoveCheck.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchRemoveCheck.sqf new file mode 100644 index 000000000..99d682e84 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FentanylPatchRemoveCheck.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Modified: Mazinski + * Triggers the fentanyl visual effect and applies the opioid factor from Fentanyl. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg", 1] call kat_pharma_fnc_treatmentAdvanced_FentanylLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _fentPatchArray = _patient getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _fentActual = _fentPatchArray select _partIndex; +private _return = false; + +if (_fentActual > 0) then { + _return = true; +}; + +_return \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilLocal.sqf index c40be45a6..de6bb4668 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilLocal.sqf @@ -15,6 +15,42 @@ * Public: No */ -params ["_patient"]; +params ["_patient", "_dose"]; +private _currentWeight = _patient getVariable [QEGVAR(vitals,currentWeight), 80]; +private _doseNormalized = linearConversion [10, 30, _dose, 15, 35, true]; +private _weightNormalized = linearConversion [60, 100, _currentWeight, 10, 30, true]; +if (_doseNormalized > _weightNormalized) then { + private _medications = _patient getVariable [QACEGVAR(medical,medications), []]; + if (_medications findIf {_x isEqualTo "Lorazepam"} != -1) exitWith { + [{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_FlumanzenilTarget"]; + _FlumanzenilTarget = _FlumanzenilTarget + 1; + _args set [1, _FlumanzenilTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _FlumanzenilTarget = _FlumanzenilTarget + 1; + if (_FlumanzenilTarget > 12) exitWith { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _medicationArray = _patient getVariable [QACEGVAR(medical,medications), []]; + { + _x params ["_medication"]; + if (_medication isEqualTo "Lorazapam") then { + _medicationArray deleteAt (_medicationArray find _x); + }; + } forEach _medicationArray; + _patient setVariable [QACEGVAR(medical,medications), _medicationArray, true]; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) - 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; + }, [_patient], 10] call CBA_fnc_waitAndExecute;}; +}; -_patient setVariable [QEGVAR(surgery,sedated), false, true]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilOverdoseLocal.sqf new file mode 100644 index 000000000..9f009da14 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FlumazenilOverdoseLocal.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: MiszczuZPolski + * Begins Flumazenil unsedating process + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_FlumazenilOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = 20 + floor random ((40 - 20) + 1); +[_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); +if (EGVAR(feedback,effectOverdose)) then + { + PP_wetD = ppEffectCreate ["WetDistortion",300]; + PP_wetD ppEffectEnable true; + PP_wetD ppEffectAdjust [10,0.2,0.2,1.84,1.46,0.33,0.86,0.05,0.05,0.05,0.05,0.1,0.1,0.2,0.2]; + PP_wetD ppEffectCommit 0; + [{PP_wetD ppEffectEnable false; PP_wetD ppEffectCommit 0;}, [], 600] call CBA_fnc_waitAndExecute;}; + // Date YYYY-MM-DD-HH-MM: [2035,6,24,8,0]. Overcast: 0.3. Fog: 0.0806154. Fog params: [0.0800015,0.013,0] + // GF PostProcess Editor parameters: Copy the following line to clipboard and click Import in the editor. + //[[false,100,[0.2,0.2,0.26,0.3]],[false,200,[0.05,0.05,true]],[true,300,[10,0.2,0.2,1.84,1.46,0.33,0.86,0.05,0.05,0.05,0.05,0.1,0.1,0.2,0.2]],[false,1500,[1,1,0,[2,2,2,-0.1],[5,5,5,1],[4,0.33,0.33,0],[0.66,0,0.96,0,0,0,4]]],[false,500,[2.06]],[false,2000,[0.44,1,1,0.5,0.5,true]],[false,2500,[1,1,1]]] + \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_FlushLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_FlushLocal.sqf index 5b08ff9e8..2f2339cf3 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_FlushLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_FlushLocal.sqf @@ -20,10 +20,13 @@ params ["_medic", "_patient", "_bodyPart"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; - -_IVarray set [_partIndex, 4]; +if ([7,8,9] find _IVactual != -1) then { + _IVarray set [_partIndex, _IVactual + 3]; +} else { + _IVarray set [_partIndex, _IVactual + 8]; + }; _patient setVariable [QGVAR(IV), _IVarray, true]; private _occludedMedications = _patient getVariable [QACEGVAR(medical,occludedMedications), []]; @@ -32,13 +35,15 @@ private _occludedFlushed = false; [_patient, "activity", LLSTRING(flush_log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); -if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith {}; +if ([_patient, _partIndex] call FUNC(occlusionCheck)) exitWith {}; { - _x params ["_partIndexN", "_medication"]; + _x params ["_bodyPartN", "_medication", "_patient"]; - if(_partIndex isEqualTo _partIndexN) then { - [QGVAR(medicationLocal), [_patient, _bodyPart, _medication], _patient] call CBA_fnc_targetEvent; + private _isStillOccluded = [_patient, _bodyPartN] call FUNC(occlusionCheck); + TRACE_1("delayed medication call after tourniquet removal",_isStillOccluded); + if (!_isStillOccluded) then { + [QGVAR(medicationLocal), [_patient, _bodyPart, _medication, true], _patient] call CBA_fnc_targetEvent; _occludedMedications set [_forEachIndex, []]; _occludedFlushed = true; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_KetamineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_KetamineLocal.sqf new file mode 100644 index 000000000..449b77dc3 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_KetamineLocal.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Sedates the patient + * + * Arguments: + * 0: Patient + * 1: bodypart + * 2 classname + * + * Return Value: + * None + * + * Example: + * [player, leftLeg, syringe_ketamine_5ml_3] call kat_pharma_fnc_treatmentAdvanced_ketamineLocal; + * + * Public: No + */ + +params ["_patient", "_bodyPart", "_classname"]; +private _parts = _classname splitString "_"; +private _lastTwo = [_parts select -2, _parts select -1]; +private _isMatch = _lastTwo in [ + ["5ml", "22"], + ["5ml", "24"], + ["5ml", "26"], + ["5ml", "28"], + ["5ml", "30"] +]; +if (_isMatch) then { + private _timeInSystem = linearConversion [22, 30, (parseNumber (_parts select -1)), 60, 300]; + [_patient, "Ketamine", 10, _timeInSystem, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "true"] call EFUNC(vitals,addMedicationAdjustment); + [_patient, true] call ACEFUNC(medical,setUnconscious); +}; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_KetamineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_KetamineOverdoseLocal.sqf new file mode 100644 index 000000000..c08c7186f --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_KetamineOverdoseLocal.sqf @@ -0,0 +1,46 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Ketamine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_KetamineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_KetamineOverdoseTarget"]; + _KetamineOverdoseTarget = _KetamineOverdoseTarget + 1; + _args set [1, _KetamineOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _KetamineOverdoseTarget = + 1; + if (_KetamineOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _rr = (_patient getVariable [QEGVAR(breathing,respiratoryRateMultiplier), 1]) - 0.04; + _patient setVariable [QEGVAR(breathing,respiratoryRateMultiplier), _rr, true]; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.04; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 15, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 15] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_LidocaineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_LidocaineLocal.sqf new file mode 100644 index 000000000..95ccde4d2 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_LidocaineLocal.sqf @@ -0,0 +1,62 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Lidocaine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_LidocaineOverdoseLocal; + * + * Public: No + */ +params ["_patient", "_bodyPart", "_classname"]; +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +if (_classname in ["syringe_Lidocaine_10ml_10", "syringe_Lidocaine_5ml_10"]) then { + [{ + params ["_patient", "_partIndex"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_lidocaineTarget", "_partIndex"]; + _lidocaineTarget = _lidocaineTarget + 1; + _args set [1, _lidocaineTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_lidocaineTarget > 20) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _anesthesiaArray = _patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _localAnesthesia = _anesthesiaArray select _partIndex; + private _localAnesthesia = (_localAnesthesia + 0.05) min 1; + _anesthesiaArray set [_partIndex, _localAnesthesia]; + _patient setVariable [VAR_LOCAL_ANESTHESIA, _anesthesiaArray, true]; + }, 0.5, [_patient,0,_partIndex]] call CBA_fnc_addPerFrameHandler; +}, [_patient,_partIndex], 5] call CBA_fnc_waitAndExecute; + +[{ + params ["_patient", "_partIndex"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_lidocaineTarget", "_partIndex"]; + _lidocaineTarget = _lidocaineTarget + 1; + _args set [1, _lidocaineTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_lidocaineTarget > 20) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _anesthesiaArray = _patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _localAnesthesia = _anesthesiaArray select _partIndex; + private _localAnesthesia = (_localAnesthesia - 0.05) max 0; + _anesthesiaArray set [_partIndex, _localAnesthesia]; + _patient setVariable [VAR_LOCAL_ANESTHESIA, _anesthesiaArray, true]; + }, 3, [_patient,0,_partIndex]] call CBA_fnc_addPerFrameHandler; +}, [_patient,_partIndex], 30] call CBA_fnc_waitAndExecute; + +} diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_LidocaineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_LidocaineOverdoseLocal.sqf new file mode 100644 index 000000000..7b8e0d511 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_LidocaineOverdoseLocal.sqf @@ -0,0 +1,46 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Lidocaine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_LidocaineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -20 + floor random ((-20 - -20) + 1); +[_patient, "LidocaineOD", 30, 1200, _hrAdjust, 0, 0, 0, 0.2] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_lidocaineOverdoseTarget"]; + _lidocaineOverdoseTarget = _lidocaineOverdoseTarget + 1; + _args set [1, _lidocaineOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_lidocaineOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medications = _patient getVariable [QACEGVAR(medical,medications), []]; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 30, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 30] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamLocal.sqf index 52e9e9db3..82f08a800 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamLocal.sqf @@ -15,12 +15,19 @@ * Public: No */ -params ["_patient"]; +params ["_patient", "_dose"]; private _random = random 3; if (_random <= 1) then { - [_patient, "BRADYCARDIA", 120, 1200, -40, 0, 0] call ACEFUNC(medical_status,addMedicationAdjustment); + private _hrValue = [-40, -30, -50]; + private _hrAdjust = selectRandom _hrValue; + [_patient, "BRADYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); +}; +private _currentWeight = _patient getVariable [QEGVAR(vitals,currentWeight), 80]; +private _doseNormalized = linearConversion [10, 30, _dose, 15, 35, true]; +private _weightNormalized = linearConversion [60, 100, _currentWeight, 10, 30, true]; +if (_doseNormalized > _weightNormalized) then { + [_patient, "Lorazepam", 10, 600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "true"] call EFUNC(vitals,addMedicationAdjustment); + [_patient, true] call ACEFUNC(medical,setUnconscious); }; -_patient setVariable [QEGVAR(surgery,sedated), true, true]; -[_patient, true] call ACEFUNC(medical,setUnconscious); diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamOverdoseLocal.sqf new file mode 100644 index 000000000..d549d20a9 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_LorazepamOverdoseLocal.sqf @@ -0,0 +1,56 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Lorazepam + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_LorazepamOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "LorazepamOverdose", 30, 1200, _hrAdjust, 0, 0, 0, 0.2] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + private _LorazepamOverdoseTarget = 0; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_LorazepamOverdoseTarget"]; + _LorazepamOverdoseTarget = _LorazepamOverdoseTarget + 1; + _args set [1, _LorazepamOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_LorazepamOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 15, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 15] call CBA_fnc_waitAndExecute; + + +if (EGVAR(feedback,effectOverdose)) then + { + PP_wetD = ppEffectCreate ["WetDistortion",300]; + PP_wetD ppEffectEnable true; + PP_wetD ppEffectAdjust [10,0.2,0.2,1.84,1.46,0.33,0.86,0.05,0.05,0.05,0.05,0.1,0.1,0.2,0.2]; + PP_wetD ppEffectCommit 0; + [{PP_wetD ppEffectEnable false; PP_wetD ppEffectCommit 0;}, [], 600] call CBA_fnc_waitAndExecute;}; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_ManualBagPressure.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_ManualBagPressure.sqf new file mode 100644 index 000000000..ec2728655 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_ManualBagPressure.sqf @@ -0,0 +1,57 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; +if ((_pressureBag select _partIndex) > 0) exitWith { + [LLSTRING(Pressure_already), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}; +_pressureBag set [_partIndex, ((_pressureBag select _partIndex) + random [0.4, 0.6, 0.8])]; + +_patient setVariable [QGVAR(pressureBag), _pressureBag, true]; + +_medic setVariable [QGVAR(pressureIVApplied), true, true]; + +[LLSTRING(Pressure_Ready), 1.5, _medic, 11] call ACEFUNC(common,displayTextStructured); + +[{ + params ["_medic", "_patient", "_partIndex"]; + private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; + private _bodyPart = ALL_BODY_PARTS select _partIndex; + (((_patient distance2D _medic) > 5) || ((_pressureBag select _partIndex) == 1) || !([_medic, _patient, _bodyPart] call FUNC(hasIVBag))); +}, { + params ["_medic", "_patient", "_partIndex"]; + private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; + if ((_pressureBag select _partIndex) != 1) then { + _pressureBag set [_partIndex, 0]; + }; + _patient setVariable [QGVAR(pressureBag), _pressureBag, true]; + _medic setVariable [QGVAR(pressureIVApplied), false, true]; + [LLSTRING(Pressure_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}, [_medic, _patient, _partIndex], 3600, { + params ["_medic", "_patient", "_partIndex"]; + private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; + if ((_pressureBag select _partIndex) != 1) then { + _pressureBag set [_partIndex, 0]; + }; + _patient setVariable [QGVAR(pressureBag), _pressureBag, true]; + _medic setVariable [QGVAR(pressureIVApplied), false, true]; + [LLSTRING(Pressure_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_MetoprololOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_MetoprololOverdoseLocal.sqf new file mode 100644 index 000000000..e88cace64 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_MetoprololOverdoseLocal.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -20 + floor random ((-20 - -40) + 1); +[_patient, "MetoprololOverdose", 60, 600, _hrAdjust, 0, 0, 0, 0, 0, 0, 0, -0.2] call EFUNC(vitals,addMedicationAdjustment); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_MorphineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_MorphineOverdoseLocal.sqf new file mode 100644 index 000000000..b19a49ee5 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_MorphineOverdoseLocal.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Morphine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_MorphineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "morphineOverdose", 30, 1200, _hrAdjust, 0, 0, 0, 0.3, 0, 0, 0.17, -0.3] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_morphineOverdoseTarget"]; + _morphineOverdoseTarget = _morphineOverdoseTarget + 1; + _args set [1, _morphineOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _morphineOverdoseTarget = _morphineOverdoseTarget + 1; + if (_morphineOverdoseTarget > 6) exitWith { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "opioidOD"}) == -1) then { + _ht pushBack "opioidOD"; + 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], 10] call CBA_fnc_waitAndExecute; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medications = _patient getVariable [QACEGVAR(medical,medications), []]; + if (_medications findIf {_x isEqualTo "naloxone"} != -1) exitWith {}; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.08; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 10] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_NalbuphineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_NalbuphineOverdoseLocal.sqf new file mode 100644 index 000000000..e8ffe8d78 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_NalbuphineOverdoseLocal.sqf @@ -0,0 +1,51 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Nalbuphine + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NalbuphineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "nalbuphineOverdose", 30, 1200, _hrAdjust, 0, 0, 0, 0.3, 0, 0, 0.17, -0.3] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + private _nalbuphineOverdoseTarget = 0; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_nalbuphineOverdoseTarget"]; + _nalbuphineOverdoseTarget = _nalbuphineOverdoseTarget + 1; + _args set [1, _nalbuphineOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_nalbuphineOverdoseTarget > 6) exitWith { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; + if ((_ht findIf {_x isEqualTo "opioidOD"}) == -1) then { + _ht pushBack "opioidOD"; + 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], 10] call CBA_fnc_waitAndExecute; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medications = _patient getVariable [QACEGVAR(medical,medications), []]; + if (_medications findIf {_x isEqualTo "naloxone"} != -1) exitWith {}; + private _depression = (_patient getVariable [QEGVAR(pharma,opioidDepression), 0]) + 0.05; + _patient setVariable [QEGVAR(pharma,opioidDepression), _depression, true]; + }, 10, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 10] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneLocal.sqf index 7bfb9f37c..642bde1b8 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneLocal.sqf @@ -18,12 +18,26 @@ params ["_patient"]; private _medicationArray = _patient getVariable [QACEGVAR(medical,medications), []]; - +private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; +if (random 1 < 0.33) then { { _x params ["_medication"]; - if (_medication isEqualTo "Morphine" || _medication isEqualTo "Fentanyl" || _medication isEqualTo "Nalbuphine") then { + private _lowerMed = toLower _medication; + if ( + (_lowerMed find "morphine" != -1) || + (_lowerMed find "morphineoverdose" != -1) || + (_lowerMed find "fentanyl" != -1) || + (_lowerMed find "fentanyloverdose" != -1) || + (_lowerMed find "nalbuphine" != -1) || + (_lowerMed find "nalbuphineoverdose" != -1) + ) then { _medicationArray deleteAt (_medicationArray find _x); + _patient setVariable [QEGVAR(pharma,opioidFactor), 1, true]; + _ht deleteAt (_ht find "opioidOD"); + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; }; -} forEach _medicationArray; + + } forEach _medicationArray; +}; -_patient setVariable [QACEGVAR(medical,medications), _medicationArray, true]; +_patient setVariable [QACEGVAR(medical,medications), _medicationArray, true]; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneOverdoseLocal.sqf new file mode 100644 index 000000000..bca14bb6d --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_NaloxoneOverdoseLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_NitroglycerinOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_NitroglycerinOverdoseLocal.sqf new file mode 100644 index 000000000..d2b5f4f74 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_NitroglycerinOverdoseLocal.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Nitroglycerin. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NitroglycerinOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrValue = [-20, -25, -30, -35, -40, -45, 20, 25, 30, 35, 40, 45]; +private _hrAdjust = selectRandom _hrValue; + +[_patient, "NitroglycerinOverdose", 30, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); +if (random 3 < 1) then { + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; +}; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_NorepinephrineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_NorepinephrineLocal.sqf new file mode 100644 index 000000000..57a63abce --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_NorepinephrineLocal.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NorepinephrineLocal; + * + * Public: No + */ +params ["_patient"]; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_NorepinephrineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_NorepinephrineOverdoseLocal.sqf new file mode 100644 index 000000000..73d204c5e --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_NorepinephrineOverdoseLocal.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Applies Norepinephrine Overdose Effects + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NorepinephrineOverdoseLocal; + * + * Public: No + */ + params ["_patient"]; +private _hrAdjust = 30 + floor random ((50 - 30) + 1); +[_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); +if (random 10 < 1) then { + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_OndansetronOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_OndansetronOverdoseLocal.sqf new file mode 100644 index 000000000..bfef96e99 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_OndansetronOverdoseLocal.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -20 + floor random ((-30 - -40) + 1); +[_patient, "OndansetronOverdose", 20, 300, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_PenthroxOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_PenthroxOverdoseLocal.sqf new file mode 100644 index 000000000..33ee5d15f --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_PenthroxOverdoseLocal.sqf @@ -0,0 +1,85 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Penthrox + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_PenthroxOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +[{ + params ["_patient"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_PenthroxOverdoseTarget"]; + _PenthroxOverdoseTarget = _PenthroxOverdoseTarget + 1; + _args set [1, _PenthroxOverdoseTarget]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (_PenthroxOverdoseTarget > 6) exitWith { + [{ + params ["_patient"]; + if (random 25 < 1) then { + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; + }; + }, [_patient], 20] call CBA_fnc_waitAndExecute; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _surfaceArea = (_patient getVariable [QGVAR(lungSurfaceArea), 400]) - 5; + _patient setVariable [QGVAR(lungSurfaceArea), _surfaceArea, true]; + private _respRate = _patient getVariable [VAR_BREATHING_RATE, 15]; + _patient setVariable [VAR_BREATHING_RATE, (_respRate + 1), true]; + }, 20, [_patient,0]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 20] call CBA_fnc_waitAndExecute; +[{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); + private _medIndex = _medStack find "Penthrox"; + private _hasMed = false; + + if (_medIndex > -1) then { + private _medCount = _medStack select (_medIndex + 1); + _hasMed = (_medCount > 0); + if (_hasMed) then { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + }; +}, 5, [_patient]] call CBA_fnc_addPerFrameHandler; +[{_hasmed},{ + params ["_patient"]; + private _PenthroxOverdoseTarget = 0; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_PenthroxOverdoseTarget"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _PenthroxOverdoseTarget = _PenthroxOverdoseTarget + 1; + if (_PenthroxOverdoseTarget > 6) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _surfaceArea = (_patient getVariable [QGVAR(lungSurfaceArea), 400]) + 5; + _patient setVariable [QGVAR(lungSurfaceArea), _surfaceArea, true]; + }, 60, [_patient,_PenthroxOverdoseTarget]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 150] call CBA_fnc_waitUntilAndExecute; + diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_PervitinLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_PervitinLocal.sqf index bc6e2ba65..fff754b78 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_PervitinLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_PervitinLocal.sqf @@ -28,7 +28,7 @@ if (ACEGVAR(advanced_fatigue,enabled)) then { params ["_patient", "_defaultAnimSpeed"]; if !(alive _patient) exitWith {}; - ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 3000; + ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 1000; ["kat_PDF", 0] call ACEFUNC(advanced_fatigue,addDutyFactor); [LLSTRING(Pervitin_start), 2, _patient] call ACEFUNC(common,displayTextStructured); @@ -62,7 +62,7 @@ if (ACEGVAR(advanced_fatigue,enabled)) then { params ["_patient"]; if !(alive _patient) exitWith {}; - ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 3000; + ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 1000; ["kat_PDF", 0.4] call ACEFUNC(advanced_fatigue,addDutyFactor); [LLSTRING(Pervitin_mid2), 2, _patient] call ACEFUNC(common,displayTextStructured); }, @@ -73,7 +73,7 @@ if (ACEGVAR(advanced_fatigue,enabled)) then { params ["_patient"]; if !(alive _patient) exitWith {}; - ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 3000; + ACEGVAR(advanced_fatigue,anReserve) = ACEGVAR(advanced_fatigue,anReserve) + 1000; ["kat_PDF", 0.6] call ACEFUNC(advanced_fatigue,addDutyFactor); [LLSTRING(Pervitin_mid3), 2, _patient] call ACEFUNC(common,displayTextStructured); }, diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_PervitinOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_PervitinOverdoseLocal.sqf new file mode 100644 index 000000000..bc2bf717f --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_PervitinOverdoseLocal.sqf @@ -0,0 +1,52 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Pervatin + * + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_PervitinOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _randomNumber = floor (random 3) + 1; +switch (_randomNumber) do { + case 1: { + private _bpAdjust = 20 + floor random ((35 - 20) + 1); + [_patient, _bpAdjust, _bpAdjust, "PervitinOverdose"] call EFUNC(circulation,updateBloodPressureChange); + private _hrAdjust = 30 + floor random ((50 - 30) + 1); + [_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + }; + case 2: { + private _bpAdjust = 20 + floor random ((35 - 20) + 1); + [_patient, _bpAdjust, _bpAdjust, "PervitinOverdose"] call EFUNC(circulation,updateBloodPressureChange); + private _hrAdjust = 30 + floor random ((50 - 30) + 1); + [_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; + }; + case 3: { + private _bpAdjust = 20 + floor random ((35 - 20) + 1); + [_patient, _bpAdjust, _bpAdjust, "PervitinOverdose"] call EFUNC(circulation,updateBloodPressureChange); + private _hrAdjust = 30 + floor random ((50 - 30) + 1); + [_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; + }; + case 4: { + private _bpAdjust = 20 + floor random ((35 - 20) + 1); + [_patient, _bpAdjust, _bpAdjust, "PervitinOverdose"] call EFUNC(circulation,updateBloodPressureChange); + private _hrAdjust = 30 + floor random ((50 - 30) + 1); + [_patient, "TACHYCARDIA", 120, 1200, _hrAdjust] call EFUNC(vitals,addMedicationAdjustment); + _patient setVariable [QEGVAR(circulation,cardiacArrestType), 0, true]; + }; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_PhenylephrineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_PhenylephrineOverdoseLocal.sqf new file mode 100644 index 000000000..e21a27fcb --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_PhenylephrineOverdoseLocal.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Phenylephrine + * + * Arguments: + * 0: Patient + + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_PhenylephrineOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrValue = [20, 25, 30, 35, 40, 45]; +private _hrAdjust = selectRandom _hrValue; +private _alphaValue = [-0.7, -0.6, -0.8]; +private _alphaAdjust = selectRandom _alphaValue; +[_patient, "PhenylephrineOverdose", 30, 1200, _hrAdjust, 0, 0, 0, _alphaAdjust] call EFUNC(vitals,addMedicationAdjustment); +if (random 5 < 1) then { + private _randomValue = [3, 4]; + private _randomRhythm = selectRandom _randomValue; + _patient setVariable [QEGVAR(circulation,cardiacArrestType), _randomRhythm, true]; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_RemoveFentanylPatch.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_RemoveFentanylPatch.sqf new file mode 100644 index 000000000..413126bac --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_RemoveFentanylPatch.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Modified: Mazinski + * Triggers the fentanyl visual effect and applies the opioid factor from Fentanyl. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg", 1] call kat_pharma_fnc_treatmentAdvanced_FentanylLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +[QGVAR(removeFentanylPatchLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_RemoveFentanylPatchLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_RemoveFentanylPatchLocal.sqf new file mode 100644 index 000000000..664a10b1b --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_RemoveFentanylPatchLocal.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Modified: Mazinski + * Triggers the fentanyl visual effect and applies the opioid factor from Fentanyl. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player, "LeftLeg", 1] call kat_pharma_fnc_treatmentAdvanced_FentanylLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +private _partIndex = ALL_BODY_PARTS find _bodyPart; +private _fentPatch = _patient getVariable [VAR_FENT_PATCH, [0,0,0,0,0,0,0,0,0,0,0,0]]; +_fentPatch set [_partIndex, 0]; +_patient setVariable [VAR_FENT_PATCH, _fentPatch, true]; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_RemovePressureBag.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_RemovePressureBag.sqf new file mode 100644 index 000000000..8aa6527bf --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_RemovePressureBag.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; +[QGVAR(removePressureBag), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_RemovePressureBagLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_RemovePressureBagLocal.sqf new file mode 100644 index 000000000..cbb3c4eea --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_RemovePressureBagLocal.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam + * Overstretch the head of the patient for airway management without items + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_ManualBagPressure; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart"]; + +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _pressureBag = _patient getVariable [QGVAR(pressureBag), [0,0,0,0,0,0,0,0,0,0,0,0]]; +_pressureBag set [_partIndex, 0]; +_patient setVariable [QGVAR(pressureBag), _pressureBag, true]; +[_medic, "kat_pressureBag"] call ACEFUNC(common,addToInventory); diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_ReorientationLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_ReorientationLocal.sqf index 2d686d841..405e9ac08 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_ReorientationLocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_ReorientationLocal.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient"]; private _pulse = GET_HEART_RATE(_patient); -if ((floor (random 100) < ((linearConversion [40, 79, _pulse, 0, GVAR(reorientationChance), true]) min (linearConversion [80, 220, _pulse, GVAR(reorientationChance), 0, true]))) && {[_patient] call EFUNC(vitals,hasStableVitals)}) then { +if ((floor (random 100) < ((linearConversion [40, 79, _pulse, 0, GVAR(reorientationChance), true]) min (linearConversion [80, 220, _pulse, GVAR(reorientationChance), 0, true]))) && {[_patient] call EFUNC(vitals,hasStableVitals)} && !(GET_CONVERT_STATUS(_patient))) then { [_patient, false] call ACEFUNC(medical,setUnconscious); _output = LLSTRING(ReorientingSuccess); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_RocuroniumLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_RocuroniumLocal.sqf new file mode 100644 index 000000000..985cc3616 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_RocuroniumLocal.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient", "_dose", "_timeTillMaxEffect", "_timeInSystem"]; +private _currentWeight = _patient getVariable [QEGVAR(vitals,currentWeight), 80]; +private _doseNormalized = linearConversion [10, 30, _dose, 15, 35, true]; +private _weightNormalized = linearConversion [60, 100, _currentWeight, 10, 30, true]; +if (_doseNormalized > _weightNormalized) then { + [_patient, "Rocuronium", _timeTillMaxEffect, _timeInSystem, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "false", "true"] call EFUNC(vitals,addMedicationAdjustment); +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_RocuroniumOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_RocuroniumOverdoseLocal.sqf new file mode 100644 index 000000000..9689ed9a9 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_RocuroniumOverdoseLocal.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = 20 + floor random ((50 - 20) + 1); +[_patient, "RocuroniumOverdose", 10, 600, _hrAdjust, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "false", "true"] call EFUNC(vitals,addMedicationAdjustment); diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_SuccinylcholineLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_SuccinylcholineLocal.sqf new file mode 100644 index 000000000..db81bbfe0 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_SuccinylcholineLocal.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient", "_dose", "_timeTillMaxEffect", "_timeInSystem"]; +private _currentWeight = _patient getVariable [QEGVAR(vitals,currentWeight), 80]; +private _doseNormalized = linearConversion [10, 30, _dose, 15, 35, true]; +private _weightNormalized = linearConversion [60, 100, _currentWeight, 10, 30, true]; +if (_doseNormalized > _weightNormalized) then { + [_patient, "Succinylcholine", _timeTillMaxEffect, _timeInSystem, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "false", "true"] call EFUNC(vitals,addMedicationAdjustment); +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_SuccinylcholineOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_SuccinylcholineOverdoseLocal.sqf new file mode 100644 index 000000000..0a182cd0c --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_SuccinylcholineOverdoseLocal.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "SuccinylcholineOverdose", 20, 300, _hrAdjust, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "false", "true"] call EFUNC(vitals,addMedicationAdjustment); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_SugammadexLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_SugammadexLocal.sqf new file mode 100644 index 000000000..0f8af05f4 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_SugammadexLocal.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; + +private _medicationArray = _patient getVariable [QACEGVAR(medical,medications), []]; + +{ + _x params ["_medication"]; + private _lowerMed = toLower _medication; + if ( + (_lowerMed find "rocuronium" != -1) || + (_lowerMed find "rocuroniumoverdose" != -1) + + ) then { + _medicationArray deleteAt (_medicationArray find _x); + }; +} forEach _medicationArray; + +_patient setVariable [QACEGVAR(medical,medications), _medicationArray, true]; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_SugammadexOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_SugammadexOverdoseLocal.sqf new file mode 100644 index 000000000..a8588d349 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_SugammadexOverdoseLocal.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of Naloxone. + * + * Arguments: + * 0: Patient + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_NaloxoneOverdoseLocal; + * + * Public: No + */ +params ["_patient"]; +private _hrAdjust = -50 + floor random ((-30 - -50) + 1); +[_patient, "SugammadexOverdose", 60, 300, _hrAdjust, 0, 0, 0, 0.3] call EFUNC(vitals,addMedicationAdjustment); \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_TXAAutoLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_TXAAutoLocal.sqf new file mode 100644 index 000000000..13acdcabf --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_TXAAutoLocal.sqf @@ -0,0 +1,83 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski/Cplhardcore + * Begins TXA bandaging process + * + * Arguments: + * 0: Medic + * 1: Body Part + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_TXAAutoLocal; + * + * Public: No + */ + +params ["_patient", "_bodyPart"]; +private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["TXA"]; +private _txaEffectiveness = 0; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("txa" in _medName) then { + _txaEffectiveness = _txaEffectiveness max _effectiveness; + }; +} forEach _medStack; +private _allowStack = missionNamespace getVariable [QGVAR(allowStackScript_TXA), true]; +private _keepRunning = missionNamespace getVariable [QGVAR(keepScriptRunning_TXA), false]; +private _cycleTime = missionNamespace getVariable [QGVAR(bandageCycleTime_TXA), 5]; + +if (!(GVAR(coagulation)) || GVAR(coagulation_allow_TXA_script)) then { + + if ((_txaEffectiveness > 0.3) && !(_allowStack)) exitWith {}; + + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_keepRunning"]; + + private _alive = alive _patient; + private _exit = true; + private _random = random [6.4, 6.8, 7.2]; + private _ph = GET_PH(_patient); + + if !(_alive) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + if (_random <= _ph) then { + { + _x params ["_targetBodyPart"]; + + private _openWounds = GET_OPEN_WOUNDS(_patient); + private _openWoundsOnPart = _openWounds getOrDefault [_targetBodyPart, []]; + private _bodyPartN = ALL_BODY_PARTS find _x; + if (_openWoundsOnPart isEqualTo [] || [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck)) then { + continue; + }; + + private _woundIndex = _openWoundsOnPart findIf {(_x select 1) > 0 && (_x select 2) > 0}; + + if (_woundIndex != -1) exitWith { + [QACEGVAR(medical_treatment,bandageLocal), [_patient, _targetBodyPart, "PackingBandage"], _patient] call CBA_fnc_targetEvent; + _exit = false; + }; + } forEach ALL_BODY_PARTS_PRIORITY; + }; + + [{ + params["_patient", "_idPFH"]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }, + [_patient, _idPFH], 300] call CBA_fnc_waitAndExecute; + + if (_exit && !(_keepRunning)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + }, _cycleTime, [_patient, _keepRunning]] call CBA_fnc_addPerFrameHandler; +}; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_TXALocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_TXALocal.sqf index 1ef24e1e1..32b1f40ac 100644 --- a/addons/pharma/functions/fnc_treatmentAdvanced_TXALocal.sqf +++ b/addons/pharma/functions/fnc_treatmentAdvanced_TXALocal.sqf @@ -16,12 +16,20 @@ * Public: No */ -params ["_patient", "_bodyPart"]; - +params ["_patient", "_bodyPart", "_timeTillMaxEffect", "_timeInSystem"]; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; -private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; +private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _IVactual = _IVarray select _partIndex; -private _countTXA = ([_patient, "TXA"] call ACEFUNC(medical_status,getMedicationCount)) select 1; +private _medStack = [_patient, false] call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["TXA"]; +private _txaEffectiveness = 0; +{ + private _medName = toLower (_x select 0); + private _effectiveness = _x select 2; + if ("txa" in _medName) then { + _txaEffectiveness = _txaEffectiveness max _effectiveness; + }; +} forEach _medStack; private _allowStack = missionNamespace getVariable [QGVAR(allowStackScript_TXA), true]; private _keepRunning = missionNamespace getVariable [QGVAR(keepScriptRunning_TXA), false]; private _cycleTime = missionNamespace getVariable [QGVAR(bandageCycleTime_TXA), 5]; @@ -29,32 +37,135 @@ private _cycleTime = missionNamespace getVariable [QGVAR(bandageCycleTime_TXA), if (_IVactual > 1) then { private _randomNumber = random 100; - if (_IVactual != 4) exitWith { + if (_IVactual != 14) exitWith { if (_randomNumber < GVAR(blockChance)) then { [{ params ["_patient", "_IVarray", "_partIndex", "_IVactual"]; - if (_IVactual > 1 && _IVactual != 4) exitWith {}; - _IVarray set [_partIndex, 3]; + if (_IVactual > 1 && ([10,11,12] find _IVactual == -1)) exitWith {}; + _IVarray set [_partIndex, _IVactual + 5]; _patient setVariable [QGVAR(IV), _IVarray, true]; }, [_patient, _IVarray, _partIndex, _IVactual], (random 300)] call CBA_fnc_waitAndExecute; }; }; - _IVarray set [_partIndex, 2]; + _IVarray set [_partIndex, _IVactual]; _patient setVariable [QGVAR(IV), _IVarray, true]; }; +private _fnc_txaClot = { + params ["_patient", "_bodyPart", "_id", "_amount", "_bleeding", "_damage", "_delay", "_oldBandage", "_newBandage", "_factorCountToRemove"]; + [{ + params ["_patient", "_bodyPart", "_id", "_amount", "_bleeding", "_damage", "_oldBandage", "_newBandage", "_factorCountToRemove"]; + if !(alive _patient) exitWith {}; + private _eacaAmount = [_patient, "EACA",false] call ACEFUNC(medical_status,getMedicationCount) select 1; + if (_eacaAmount > 0.1) exitWith {}; + private _coagWoundsLive = GET_COAGED_WOUNDS(_patient); + private _currentWounds = _coagWoundsLive getOrDefault [_bodyPart, []]; + private _minorIndex = -1; + private _minorWound = -1; + { + _x params ["_idW", "_amount", "_bleeding", "_damage", "_bandage", "_time"]; + if ((_bandage isEqualTo _oldBandage) && (_idW isEqualTo _id)) exitWith { + _minorIndex = _forEachIndex; + _minorWound = _x; + }; + } forEach _currentWounds; + + if (_minorIndex == -1) exitWith {}; + _minorWound params ["_id", "_amount", "_bleeding", "_damage", "_bandage", "_time"]; + _currentWounds deleteAt _minorIndex; + private _newWound = [_id, _amount, _bleeding, _damage, _newBandage, CBA_missionTime]; + _currentWounds pushBack _newWound; + _coagWoundsLive set [_bodyPart, _currentWounds]; + _patient setVariable [VAR_COAGED_WOUNDS, _coagWoundsLive, true]; + private _bodyFluid = GET_BODY_FLUID(_patient); + private _coagulationFactor = GET_BODY_FLUID_PLATELETS(_patient); + if (_coagulationFactor <= 0) exitWith {}; + _bodyFluid set [5, (_coagulationFactor - _factorCountToRemove)]; + _patient setVariable [VAR_BODY_FLUID, _bodyFluid, true]; + private _impact = _amount; + private _woundIndex = count _currentWounds - 1; + private _finalWound = _currentWounds select _woundIndex; + [_patient, _impact, _bodyPart, _woundIndex, _finalWound, _newBandage, false] call EFUNC(misc,handleCoagReopening); + }, [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _oldBandage, _newBandage,_factorCountToRemove], _delay] call CBA_fnc_waitAndExecute; +}; + + +if (GVAR(coagulation)) then { + if (([7,8,9] find _IVactual) == -1) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_timeInSystem", "_fnc_txaClot"]; + + if !(alive _patient) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _eacaAmount = [_patient, "EACA", false] call ACEFUNC(medical_status,getMedicationCount) select 1; + if (_eacaAmount > 0.1) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + + private _random = random [6.4, 6.8, 7.2]; + private _ph = GET_PH(_patient); + + if (_random <= _ph) then { + private _coagWounds = GET_COAGED_WOUNDS(_patient); + private _pulse = _patient getVariable [VAR_HEART_RATE, 80]; + private _coagulationFactor = GET_BODY_FLUID_PLATELETS(_patient); + if (_coagWounds isEqualTo createHashMap) exitWith {}; + if (GET_BLOOD_VOLUME_LITERS(_patient) < GVAR(coagulation_requireBV)) exitWith {}; + if ((_pulse < 20) && {GVAR(coagulation_requireHR)}) exitWith {}; + if (_coagulationFactor <= 0) exitWith {}; + { + private _bodyPart = _x; + private _wounds = _coagWounds getOrDefault [_bodyPart, []]; + { + _x params ["_id", "_amount", "_bleeding", "_damage", "_bandage", "_time"]; + switch (true) do { + case (_bandage isEqualTo "BloodClotMinor"): { + private _delay = random [10, 15, 20]; + private _newBandage = "BloodClotMinorTXA"; + private _factorCountToRemove = random [6, 11, 15]; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage, _factorCountToRemove] call _fnc_txaClot; + }; + case (_bandage isEqualTo "BloodClotMedium"): { + private _delay = random [15, 23, 45]; + private _newBandage = "BloodClotMediumTXA"; + private _factorCountToRemove = random [12, 18, 25]; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage, _factorCountToRemove] call _fnc_txaClot; + }; + case (_bandage isEqualTo "BloodClotLarge"): { + private _delay = random [20, 40, 60]; + private _newBandage = "BloodClotLargeTXA"; + private _factorCountToRemove = random [16, 23, 30]; + [_patient, _bodyPart, _id, _amount, _bleeding, _damage, _delay, _bandage, _newBandage, _factorCountToRemove] call _fnc_txaClot; + }; + default {}; + }; + } forEach _wounds; + + } forEach (keys _coagWounds); + }; + [{ + params ["_patient", "_idPFH"]; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }, [_patient, _idPFH], _timeInSystem] call CBA_fnc_waitAndExecute; + + }, 10, [_patient, _timeInSystem, _fnc_txaClot]] call CBA_fnc_addPerFrameHandler; + }; +}; if (!(GVAR(coagulation)) || GVAR(coagulation_allow_TXA_script)) then { - if (_IVactual != 3) then { + if ([7,8,9] find _IVactual == -1) then { - if (_countTXA > 1 && !(_allowStack)) exitWith {}; + if ((_txaEffectiveness > 0.3) && !(_allowStack)) exitWith {}; [{ params ["_args", "_idPFH"]; - _args params ["_patient", "_keepRunning"]; + _args params ["_patient", "_keepRunning", "_timeInSystem"]; private _alive = alive _patient; private _exit = true; @@ -72,7 +183,8 @@ if (!(GVAR(coagulation)) || GVAR(coagulation_allow_TXA_script)) then { private _openWounds = GET_OPEN_WOUNDS(_patient); private _openWoundsOnPart = _openWounds getOrDefault [_targetBodyPart, []]; - if (_openWoundsOnPart isEqualTo [] || [_patient,_x] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) then { + private _bodyPartN = ALL_BODY_PARTS find _x; + if (_openWoundsOnPart isEqualTo [] || [_patient,_bodyPartN] call EFUNC(pharma,occlusionCheck)) then { continue; }; @@ -89,12 +201,12 @@ if (!(GVAR(coagulation)) || GVAR(coagulation_allow_TXA_script)) then { params["_patient", "_idPFH"]; [_idPFH] call CBA_fnc_removePerFrameHandler; }, - [_patient, _idPFH], 300] call CBA_fnc_waitAndExecute; + [_patient, _idPFH], _timeInSystem] call CBA_fnc_waitAndExecute; if (_exit && !(_keepRunning)) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; - }, _cycleTime, [_patient, _keepRunning]] call CBA_fnc_addPerFrameHandler; + }, _cycleTime, [_patient, _keepRunning, _timeInSystem]] call CBA_fnc_addPerFrameHandler; }; }; \ No newline at end of file diff --git a/addons/pharma/functions/fnc_treatmentAdvanced_TXAOverdoseLocal.sqf b/addons/pharma/functions/fnc_treatmentAdvanced_TXAOverdoseLocal.sqf new file mode 100644 index 000000000..6b2bb1e04 --- /dev/null +++ b/addons/pharma/functions/fnc_treatmentAdvanced_TXAOverdoseLocal.sqf @@ -0,0 +1,54 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Handles the overdose effect of TXA + * + * Arguments: + * 0: Medic + * + * Return Value: + * None + * + * Example: + * [player] call kat_pharma_fnc_treatmentAdvanced_TXAOverdoseLocal; + * + * Public: No + */ + +params ["_patient"]; +[_patient, "TXAOverdose", 1, 900, 0, 0, -0.5] call EFUNC(vitals,addMedicationAdjustment); +[{ + params ["_patient"]; + private _TXAOverdoseTarget = 0; + [{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_TXAOverdoseTarget"]; + if (!(alive _patient)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _TXAOverdoseTarget = _TXAOverdoseTarget + 1; + if (_TXAOverdoseTarget > 12) exitWith { + if (random(100) < 25) then { + [{ + params ["_args", "_idPFH"]; + _args params ["_patient"]; + + if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { + [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; + }; + }, [_patient], 15] call CBA_fnc_waitAndExecute; + }; + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _surface = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]); + if (_surface < 150) then { + } else { + private _surfaceArea = _surface - 10; + _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea, true]; + }; + private _bloodlevels = GET_BODY_FLUID(_patient); + _bloodlevels set [5, ((_bloodlevels select 5) - 20) max 0]; + _patient setVariable [QEGVAR(circulation,bodyFluid), _bloodlevels, true]; + if ((random 10000) < 1) then {[_patient, "TXAOD"] call ACEFUNC(medical_status,setDead);}; + }, 15, [_patient,_TXAOverdoseTarget]] call CBA_fnc_addPerFrameHandler; +}, [_patient], 15] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_vehicleCheckDialysis.sqf b/addons/pharma/functions/fnc_vehicleCheckDialysis.sqf index 95569eaad..cbeb3f4db 100644 --- a/addons/pharma/functions/fnc_vehicleCheckDialysis.sqf +++ b/addons/pharma/functions/fnc_vehicleCheckDialysis.sqf @@ -17,14 +17,12 @@ */ params ["_medic", "_patient"]; - -private _checkArray = _patient nearEntities 10; -private _return = false; - -{ - if (_x getVariable [QACEGVAR(medical,isMedicalVehicle), false]) exitWith { - _return = true; - }; -} forEach _checkArray; - -_return +private _isRunning = _patient getVariable [QGVAR(dialysisRunning), false]; +if (!(_isRunning) && + ((_patient nearEntities 10) findIf { + _x getVariable [QACEGVAR(medical,isMedicalVehicle), false] + } > -1) +) exitWith {true }; +if (!(_isRunning) && (_patient call ACEFUNC(medical_treatment,isInMedicalFacility))) exitWith { true }; +if (!(_isRunning) && (_patient call ACEFUNC(medical_treatment,isInMedicalVehicle))) exitWith { true }; +false \ No newline at end of file diff --git a/addons/pharma/initSettings.inc.sqf b/addons/pharma/initSettings.inc.sqf index e2cdecc0f..7c9f99de3 100644 --- a/addons/pharma/initSettings.inc.sqf +++ b/addons/pharma/initSettings.inc.sqf @@ -1,5 +1,3 @@ - -// Basic Settings Category [ QGVAR(RequireInsIV), "CHECKBOX", @@ -7,7 +5,7 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(MedicationsRequireInsIV), @@ -16,7 +14,7 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(RequireInsIVBloodDraw), @@ -25,7 +23,7 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(IVflowControl), @@ -34,7 +32,7 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(IVdropEnable), @@ -43,7 +41,7 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(IVdrop), @@ -52,7 +50,7 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [60, 1200, 600, 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(IVreuse), @@ -61,7 +59,43 @@ [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +/*[ + QGVAR(AMS_Enabled), + "CHECKBOX", + [LLSTRING(advancedMedicationSystem), LLSTRING(advancedMedicationSystem_Desc)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [false], + true +] call CBA_Settings_fnc_init;*/ + +[ + QGVAR(medLvl_PrepSyringe), + "LIST", + [LLSTRING(medLvl_PrepSyringe), LLSTRING(medLvl_PrepSyringe_Desc)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(prepTime_PrepSyringe), + "SLIDER", + [LLSTRING(prepTime_PrepSyringe), LLSTRING(prepTime_PrepSyringe_Desc)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [1, 15, 6, 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(prepTime_PrepInfusion), + "SLIDER", + [LLSTRING(prepTime_PrepInfusion), LLSTRING(prepTime_PrepInfusion_Desc)], + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [1, 25, 12, 0], + true +] call CBA_Settings_fnc_init; //IV Settings Category [ @@ -71,7 +105,34 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Apply14IV), + "LIST", + [LLSTRING(medLvl_Apply14IV), LLSTRING(medLvl_Apply14IV_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Apply20IV), + "LIST", + [LLSTRING(medLvl_Apply20IV), LLSTRING(medLvl_Apply20IV_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_ApplyEJV), + "LIST", + [LLSTRING(medLvl_ApplyEJV), LLSTRING(medLvl_ApplyEJV_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; [ QGVAR(treatmentTime_ApplyIV), @@ -80,7 +141,34 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_Apply14IV), + "SLIDER", + [LLSTRING(treatmentTime_Apply14IV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_Apply20IV), + "SLIDER", + [LLSTRING(treatmentTime_Apply20IV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_ApplyEJV), + "SLIDER", + [LLSTRING(treatmentTime_ApplyEJV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; [ QGVAR(ivCheckLimbDamage), @@ -89,7 +177,87 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +[ + QGVAR(ivDamageThreshold), + "SLIDER", + [LLSTRING(SETTING_ivDamageThreshold), LLSTRING(SETTING_ivDamageThreshold_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [1, 40, 10, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(ivLeakageThreshold), + "SLIDER", + [LLSTRING(SETTING_ivLeakageThreshold), LLSTRING(SETTING_ivLeakageThreshold_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [1, 20, 10, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(IVComplications), + "CHECKBOX", + [LLSTRING(IVComplications), LLSTRING(IVComplications_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [false], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(LimbIVComplications), + "CHECKBOX", + [LLSTRING(LimbIVComplications), LLSTRING(LimbIVComplications_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [false], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(IVFailures), + "SLIDER", + [LLSTRING(IVFailures), LLSTRING(IVFailures_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0, 100, 5, 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_IV), + "SLIDER", + [LLSTRING(treatmentTime_IV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_IM), + "SLIDER", + [LLSTRING(treatmentTime_IM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; +[ + QGVAR(medLvl_SalineFlush), + "LIST", + [LLSTRING(medLvl_SalineFlush), LLSTRING(medLvl_SalineFlush_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_SalineFlush), + "SLIDER", + [LLSTRING(treatmentTime_SalineFlush)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIV)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; // IO Settings Category [ @@ -99,7 +267,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIO)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(treatmentTime_ApplyIO), @@ -108,7 +276,25 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIO)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_ApplyEZIO), + "LIST", + [LLSTRING(medLvl_ApplyEZIO), LLSTRING(medLvl_ApplyEZIO_Desc)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIO)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_ApplyEZIO), + "SLIDER", + [LLSTRING(treatmentTime_ApplyEZIO)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ApplyIO)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; // Reorientation Settings Category [ @@ -118,7 +304,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Reorientation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(medLvl_Reorientation), @@ -127,7 +313,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Reorientation)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_settings_fnc_init; [ QGVAR(treatmentTime_Reorientation), @@ -136,7 +322,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Reorientation)], [0.1, 10, 2, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ @@ -146,7 +332,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Reorientation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(reorientationChance), @@ -155,7 +341,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Reorientation)], [0, 100, 50, 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Carbonate Settings Category [ @@ -165,7 +351,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Carbonate)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(treatmentTime_Carbonate), @@ -174,7 +360,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Carbonate)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(carbonateChance), @@ -183,64 +369,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Carbonate)], [0, 100, 100, 0], true -] call CBA_fnc_addSetting; - -//Lorazepam Settings Category -[ - QGVAR(medLvl_Lorazepam), - "LIST", - [LLSTRING(medLvl_Lorazepam)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Lorazepam)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Lorazepam), - "SLIDER", - [LLSTRING(treatmentTime_Lorazepam)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Lorazepam)], - [0.1, 10, 2, 1], - true -] call CBA_fnc_addSetting; - -//Etomidate Settings Category -[ - QGVAR(medLvl_Etomidate), - "LIST", - [LLSTRING(medLvl_Etomidate)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Etomidate)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Etomidate), - "SLIDER", - [LLSTRING(treatmentTime_Etomidate)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Etomidate)], - [0.1, 10, 2, 1], - true -] call CBA_fnc_addSetting; - -//FLumazenil Settings Category -[ - QGVAR(medLvl_Flumezenil), - "LIST", - [LLSTRING(medLvl_Flumazenil)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Flumazenil)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Flumazenil), - "SLIDER", - [LLSTRING(treatmentTime_Flumazenil)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Flumazenil)], - [0.1, 10, 2, 1], - true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Naloxone Settings Category [ @@ -250,7 +379,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Naloxone)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(treatmentTime_Naloxone), @@ -259,7 +388,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Naloxone)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Pervitin Settings Category @@ -270,7 +399,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Pervitin)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(treatmentTime_Pervitin), @@ -279,7 +408,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Pervitin)], [0.1, 10, 5, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(weapon_sway_pervitin), @@ -288,7 +417,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Pervitin)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(pervitinSpeed), @@ -297,7 +426,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Pervitin)], [1, 1.5, 1.15, 2], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // TXA Settings Category @@ -308,7 +437,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(keepScriptRunning_TXA), @@ -317,7 +446,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(medLvl_TXA), @@ -326,16 +455,34 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_TXAIM), + "LIST", + [LLSTRING(medLvl_TXAIM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_TXAAuto), + "LIST", + [LLSTRING(medLvl_TXAAuto)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; [ - QGVAR(treatmentTime_TXA), + QGVAR(treatmentTime_TXAAuto), "SLIDER", - [LLSTRING(treatmentTime_TXA)], + [LLSTRING(treatmentTime_TXAAuto)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(bandageCycleTime_TXA), @@ -344,253 +491,75 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_TXA)], [1, 180, 5], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + -// EpinephrineIV Settings Category [ - QGVAR(medLvl_EpinephrineIV), - "LIST", - [LLSTRING(medLvl_EpinephrineIV)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EpinephrineIV)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + QGVAR(allowStackScript_EACA), + "CHECKBOX", + [LLSTRING(SETTING_allowStackScript_EACA), LLSTRING(SETTING_allowStackScript_EACA_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], + [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(treatmentTime_EpinephrineIV), - "SLIDER", - [LLSTRING(treatmentTime_EpinephrineIV)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EpinephrineIV)], - [0.1, 10, 7, 1], + QGVAR(keepScriptRunning_EACA), + "CHECKBOX", + [LLSTRING(SETTING_keepScriptRunning_EACA), LLSTRING(SETTING_keepScriptRunning_EACA_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], + [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; -// Norepinephrine Settings Category [ - QGVAR(medLvl_Norepinephrine), + QGVAR(medLvl_EACA), "LIST", - [LLSTRING(medLvl_Norepinephrine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Norepinephrine)], + [LLSTRING(medLvl_EACA)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + [ - QGVAR(treatmentTime_Norepinephrine), - "SLIDER", - [LLSTRING(treatmentTime_Norepinephrine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Norepinephrine)], - [0.1, 10, 7, 1], + QGVAR(eacaClearTrauma), + "CHECKBOX", + [LLSTRING(SETTING_EACA_Trauma), LLSTRING(SETTING_EACA_Trauma_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], + [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; -// Phenylephrine Settings Category [ - QGVAR(medLvl_Phenylephrine), + QGVAR(bandageCycleTime_EACA), + "TIME", + [LLSTRING(SETTING_bandageCycleTime_EACA), LLSTRING(SETTING_bandageCycleTime_EACA_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], + [1, 180, 8], + true +] call CBA_Settings_fnc_init; + + +[ + QGVAR(medLvl_ApplyFentPatch), "LIST", - [LLSTRING(medLvl_Phenylephrine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Phenylephrine)], + [LLSTRING(medLvl_ApplyFentPatch)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Fentanyl)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(treatmentTime_Phenylephrine), + QGVAR(treatmentTime_ApplyFentPatch), "SLIDER", - [LLSTRING(treatmentTime_Phenylephrine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Phenylephrine)], + [LLSTRING(treatmentTime_ApplyFentPatch)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Fentanyl)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; -// Nitroglycerin Settings Category -[ - QGVAR(medLvl_Nitroglycerin), - "LIST", - [LLSTRING(medLvl_Nitroglycerin)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Nitroglycerin)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Nitroglycerin), - "SLIDER", - [LLSTRING(treatmentTime_Nitroglycerin)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Nitroglycerin)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -// Amiodarone Settings Category -[ - QGVAR(medLvl_Amiodarone), - "LIST", - [LLSTRING(medLvl_Amiodarone)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Amiodarone)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Amiodarone), - "SLIDER", - [LLSTRING(treatmentTime_Amiodarone)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Amiodarone)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -// Lidocaine Settings Category -[ - QGVAR(medLvl_Lidocaine), - "LIST", - [LLSTRING(medLvl_Lidocaine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Lidocaine)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Lidocaine), - "SLIDER", - [LLSTRING(treatmentTime_Lidocaine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Lidocaine)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -// Atropine Settings Category -[ - QGVAR(medLvl_Atropine), - "LIST", - [LLSTRING(medLvl_Atropine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Atropine)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Atropine), - "SLIDER", - [LLSTRING(treatmentTime_Atropine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Atropine)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -// EACA Settings Category - -[ - QGVAR(allowStackScript_EACA), - "CHECKBOX", - [LLSTRING(SETTING_allowStackScript_EACA), LLSTRING(SETTING_allowStackScript_EACA_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], - [true], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(keepScriptRunning_EACA), - "CHECKBOX", - [LLSTRING(SETTING_keepScriptRunning_EACA), LLSTRING(SETTING_keepScriptRunning_EACA_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], - [true], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(medLvl_EACA), - "LIST", - [LLSTRING(medLvl_EACA)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_EACA), - "SLIDER", - [LLSTRING(treatmentTime_EACA)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(eacaClearTrauma), - "CHECKBOX", - [LLSTRING(SETTING_EACA_Trauma), LLSTRING(SETTING_EACA_Trauma_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], - [false], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(bandageCycleTime_EACA), - "TIME", - [LLSTRING(SETTING_bandageCycleTime_EACA), LLSTRING(SETTING_bandageCycleTime_EACA_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_EACA)], - [1, 180, 8], - true -] call CBA_fnc_addSetting; - -//Ketamine Settings Category -[ - QGVAR(medLvl_Ketamine), - "LIST", - [LLSTRING(medLvl_Ketamine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Ketamine)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Ketamine), - "SLIDER", - [LLSTRING(treatmentTime_Ketamine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Ketamine)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -//Fentanyl Settings Category -[ - QGVAR(medLvl_Fentanyl), - "LIST", - [LLSTRING(medLvl_Fentanyl)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Fentanyl)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(treatmentTime_Fentanyl), - "SLIDER", - [LLSTRING(treatmentTime_Fentanyl)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Fentanyl)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; - -//Nalbuphine Settings Category -[ - QGVAR(medLvl_Nalbuphine), - "LIST", - [LLSTRING(medLvl_Nalbuphine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Nalbuphine)], - [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], - true -] call CBA_fnc_addSetting; -[ - QGVAR(treatmentTime_Nalbuphine), - "SLIDER", - [LLSTRING(treatmentTime_Nalbuphine)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_Nalbuphine)], - [0.1, 10, 7, 1], - true -] call CBA_fnc_addSetting; // Penthrox Settings Category [ @@ -600,7 +569,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Penthrox)], [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(treatmentTime_Penthrox), @@ -609,7 +578,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Penthrox)], [0.1, 10, 8, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Kidney Settings [ @@ -619,7 +588,7 @@ [CBA_SETTINGS_CAT], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // IV Block Chance Settings [ @@ -629,7 +598,7 @@ CBA_SETTINGS_CAT, [0, 100, 20, 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Coagulation Settings [ @@ -639,25 +608,26 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + [ - QGVAR(coagulation_on_all_Bodyparts), + QGVAR(coagulation_tourniquetBlock), "CHECKBOX", - [LLSTRING(SETTING_Coagulation_on_all_Bodyparts), LLSTRING(SETTING_Coagulation_on_all_Bodyparts_DESC)], + [LLSTRING(SETTING_Coagulation_tourniquetBlock), LLSTRING(SETTING_Coagulation_tourniquetBlock_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_tourniquetBlock), + QGVAR(pressureInfluenceCoag), "CHECKBOX", - [LLSTRING(SETTING_Coagulation_tourniquetBlock), LLSTRING(SETTING_Coagulation_tourniquetBlock_DESC)], + [LLSTRING(SETTING_Coagulation_pressureInfluenceCoag), LLSTRING(SETTING_Coagulation_pressureInfluenceCoag_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [true], + [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(coagulation_allow_clot_text), @@ -666,7 +636,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(coagulation_allow_TXA_script), @@ -675,7 +645,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(coagulation_allow_EACA_script), @@ -684,7 +654,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(coagulation_allowOnAI), @@ -693,7 +663,18 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + +[ + QGVAR(coagulation_time), + "TIME", + [LLSTRING(SETTING_Coagulation_Time), LLSTRING(SETTING_Coagulation_Time_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], + [1, 300, 10], + true, + {}, + true +] call CBA_Settings_fnc_init; [ QGVAR(coagulation_allow_MinorWounds), @@ -702,109 +683,107 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_allow_MediumWounds), - "CHECKBOX", - [LLSTRING(SETTING_Coagulation_allow_MediumWounds), LLSTRING(SETTING_Coagulation_allow_MediumWounds_DESC)], + QGVAR(coagulation_chance_MinorWounds), + "SLIDER", + [LLSTRING(SETTING_Coagulation_chance_MinorWounds), LLSTRING(SETTING_Coagulation_chance_MinorWounds_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [true], + [10, 100, 75, 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_allow_LargeWounds), - "CHECKBOX", - [LLSTRING(SETTING_Coagulation_allow_LargeWounds), LLSTRING(SETTING_Coagulation_allow_LargeWounds_DESC)], + QGVAR(coagulation_time_minor), + "TIME", + [LLSTRING(SETTING_Coagulation_Time_Minor), LLSTRING(SETTING_Coagulation_Time_Clotting_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [true], + [0, 300, 15], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_requireHR), + QGVAR(coagulation_allow_MediumWounds), "CHECKBOX", - [LLSTRING(SETTING_Coagulation_requireHR), LLSTRING(SETTING_Coagulation_requireHR_DESC)], + [LLSTRING(SETTING_Coagulation_allow_MediumWounds), LLSTRING(SETTING_Coagulation_allow_MediumWounds_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_requireBV), + QGVAR(coagulation_chance_MediumWounds), "SLIDER", - [LLSTRING(SETTING_Coagulation_requireBV), LLSTRING(SETTING_Coagulation_requireBV_DESC)], + [LLSTRING(SETTING_Coagulation_chance_MediumWounds), LLSTRING(SETTING_Coagulation_chance_MediumWounds_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [0, 6.0, 3.6, 1], + [10, 100, 55, 0], true -] call CBA_fnc_addSetting; - +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_factor_count), - "SLIDER", - [LLSTRING(SETTING_Coagulation_FactorCount), LLSTRING(SETTING_Coagulation_FactorCount_DESC)], + QGVAR(coagulation_time_medium), + "TIME", + [LLSTRING(SETTING_Coagulation_Time_Medium), LLSTRING(SETTING_Coagulation_Time_Clotting_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [0, 100, 30, 0], + [0, 300, 30], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_factor_limit), - "SLIDER", - [LLSTRING(SETTING_coagulation_Factor_Limit), LLSTRING(SETTING_coagulation_Factor_Limit_DESC)], + QGVAR(coagulation_allow_LargeWounds), + "CHECKBOX", + [LLSTRING(SETTING_Coagulation_allow_LargeWounds), LLSTRING(SETTING_Coagulation_allow_LargeWounds_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [1, 200, 60, 0], + [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_time), - "TIME", - [LLSTRING(SETTING_Coagulation_Time), LLSTRING(SETTING_Coagulation_Time_DESC)], + QGVAR(coagulation_chance_LargeWounds), + "SLIDER", + [LLSTRING(SETTING_Coagulation_chance_LargeWounds), LLSTRING(SETTING_Coagulation_chance_LargeWounds_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [1, 300, 10], - true, - {}, + [10, 100, 35, 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_time_minor), + QGVAR(coagulation_time_large), "TIME", - [LLSTRING(SETTING_Coagulation_Time_Minor), LLSTRING(SETTING_Coagulation_Time_Clotting_DESC)], + [LLSTRING(SETTING_Coagulation_Time_Large), LLSTRING(SETTING_Coagulation_Time_Clotting_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [0, 300, 15], + [0, 300, 45], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; + [ - QGVAR(coagulation_time_medium), - "TIME", - [LLSTRING(SETTING_Coagulation_Time_Medium), LLSTRING(SETTING_Coagulation_Time_Clotting_DESC)], + QGVAR(coagulation_requireHR), + "CHECKBOX", + [LLSTRING(SETTING_Coagulation_requireHR), LLSTRING(SETTING_Coagulation_requireHR_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [0, 300, 30], + [true], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ - QGVAR(coagulation_time_large), - "TIME", - [LLSTRING(SETTING_Coagulation_Time_Large), LLSTRING(SETTING_Coagulation_Time_Clotting_DESC)], + QGVAR(coagulation_requireBV), + "SLIDER", + [LLSTRING(SETTING_Coagulation_requireBV), LLSTRING(SETTING_Coagulation_requireBV_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [0, 300, 45], + [0, 6.0, 3.6, 1], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(coagulation_factor_regenerate_time), "TIME", [LLSTRING(SETTING_Coagulation_Factor_Regenerate_Time), LLSTRING(SETTING_Coagulation_Factor_Regenerate_Time_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coagulation)], - [1, 900, 150], + [1, 120, 30], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Stamina Settings [ @@ -814,7 +793,7 @@ CBA_SETTINGS_CAT, [false], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; // Coag Sense setLightnings [ @@ -824,7 +803,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coag_Sense)], [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(CheckCoag_Location), @@ -833,7 +812,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coag_Sense)], [[0,1,2,3],["STR_ACE_Common_Anywhere", "STR_ACE_Common_Vehicle", "STR_ACE_Medical_Treatment_MedicalFacilities", "STR_ACE_Medical_Treatment_VehiclesAndFacilities"],0], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(CheckCoag_TreatmentTime), @@ -842,7 +821,7 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_Coag_Sense)], [1, 30, 10], true -] call CBA_fnc_addSetting; +] call CBA_Settings_fnc_init; [ QGVAR(medLvl_Caffeine), @@ -862,6 +841,24 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(CheckVein_MedLevel), + "LIST", + LLSTRING(SETTING_CheckVein_MedLevel), + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(CheckVein_TreatmentTime), + "SLIDER", + LLSTRING(SETTING_CheckVein_treatmentTime), + [CBA_SETTINGS_CAT, ELSTRING(GUI,SubCategory_Basic)], + [1, 15, 4, 1], + true +] call CBA_Settings_fnc_init; + [ QGVAR(medLvl_CWMP), "LIST", @@ -878,4 +875,312 @@ [CBA_SETTINGS_CAT, LSTRING(SubCategory_CWMP)], [0.1, 10, 7, 1], true -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting; + +[ + QGVAR(medLvl_adenosineIV), + "LIST", + [LLSTRING(medLvl_adenosineIV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Alteplase), + "LIST", + [LLSTRING(medLvl_Alteplase)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; +// Amiodarone +[ + QGVAR(medLvl_Amiodarone), + "LIST", + [LLSTRING(medLvl_Amiodarone)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Atropine +[ + QGVAR(medLvl_Atropine), + "LIST", + [LLSTRING(medLvl_Atropine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_Atropine), + "SLIDER", + [LLSTRING(treatmentTime_Atropine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_AtropineIV), + "LIST", + [LLSTRING(medLvl_AtropineIV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_bicarbonate), + "LIST", + [LLSTRING(medLvl_bicarbonate)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_CalciumChloride), + "LIST", + [LLSTRING(medLvl_CalciumChloride)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_calciumGluconate), + "LIST", + [LLSTRING(medLvl_calciumGluconate)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Diazepam), + "LIST", + [LLSTRING(medLvl_Diazepam)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Epinephrine IV +[ + QGVAR(medLvl_EpinephrineIV), + "LIST", + [LLSTRING(medLvl_EpinephrineIV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Etomidate +[ + QGVAR(medLvl_Etomidate), + "LIST", + [LLSTRING(medLvl_Etomidate)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Fentanyl +[ + QGVAR(medLvl_Fentanyl), + "LIST", + [LLSTRING(medLvl_Fentanyl)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_FentanylIM), + "LIST", + [LLSTRING(medLvl_FentanylIM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Flumazenil +[ + QGVAR(medLvl_Flumezenil), + "LIST", + [LLSTRING(medLvl_Flumazenil)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Ketamine +[ + QGVAR(medLvl_Ketamine), + "LIST", + [LLSTRING(medLvl_Ketamine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_KetamineIM), + "LIST", + [LLSTRING(medLvl_KetamineIM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Lidocaine +[ + QGVAR(medLvl_Lidocaine), + "LIST", + [LLSTRING(medLvl_Lidocaine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_LidocaineIM), + "LIST", + [LLSTRING(medLvl_LidocaineIM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Lorazepam +[ + QGVAR(medLvl_Lorazepam), + "LIST", + [LLSTRING(medLvl_Lorazepam)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Metoprolol), + "LIST", + [LLSTRING(medLvl_Metoprolol)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_morphineIV), + "LIST", + [LLSTRING(medLvl_MorphineIV)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_morphineIM), + "LIST", + [LLSTRING(medLvl_MorphineIM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Nalbuphine +[ + QGVAR(medLvl_Nalbuphine), + "LIST", + [LLSTRING(medLvl_Nalbuphine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_NalbuphineIM), + "LIST", + [LLSTRING(medLvl_NalbuphineIM)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Nitroglycerin +[ + QGVAR(medLvl_Nitroglycerin), + "LIST", + [LLSTRING(medLvl_Nitroglycerin)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Norepinephrine +[ + QGVAR(medLvl_Norepinephrine), + "LIST", + [LLSTRING(medLvl_Norepinephrine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; +[ + QGVAR(medLvl_Ondansetron), + "LIST", + [LLSTRING(medLvl_Ondansetron)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +// Phenylephrine +[ + QGVAR(medLvl_Phenylephrine), + "LIST", + [LLSTRING(medLvl_Phenylephrine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_PhenylephrineAuto), + "LIST", + [LLSTRING(medLvl_PhenylephrineAuto)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(treatmentTime_PhenylephrineAuto), + "SLIDER", + [LLSTRING(treatmentTime_PhenylephrineAuto)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [0.1, 10, 7, 1], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Rocuronium), + "LIST", + [LLSTRING(medLvl_Rocuronium)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(medLvl_Succinylcholine), + "LIST", + [LLSTRING(medLvl_Succinylcholine)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Medications)], + [[0, 1, 2], [ACELSTRING(medical_treatment,Anyone), ACELSTRING(medical_treatment,Medics), ACELSTRING(medical_treatment,Doctors)], 0], + true +] call CBA_Settings_fnc_init; \ No newline at end of file diff --git a/addons/pharma/stringtable.xml b/addons/pharma/stringtable.xml index d444fdbc5..11a14dc2b 100644 --- a/addons/pharma/stringtable.xml +++ b/addons/pharma/stringtable.xml @@ -1,4509 +1,6174 @@ + + Allow applying 16g IV + Poziom wyszkolenia medycznego dla IV + 允许使用IV + Permetti utilizzo IV + Povolit zavedení IV + Autoriser la pose d'IV + IV 설정 허용 + Erlaubt die Anwendung von IV + IVの使用許可 + Permitir colocar IV + Permitir aplicar IV + Salli hakeminen IV + Разрешить внутривенное введение + IV plaatsing niveau + + + Changes what medical level is required to set 16 gauge IVs + Benötigter medizinischer Grad, welcher für das Legen von IVs erforderlich ist + Poziom wyszkolenia medycznego potrzebnego do założenia kaniul IV + Niveau nécessaire pour poser une IV + 改变设置静脉注射所需的医疗级别 + 改变设置 IV 所需的医疗级别 + Cambia il livello medico richiesto per impostare le IV + Cambia el nivel médico que se requiere para colocar las IVs + IV를 설정하는 데 필요한 의료 레벨 수준 변경 + IV'leri'ları ayarlamak için gereken tıbbi düzeyi değiştirir + Změní, která zdravotnická úroveň je potřeba k zavedení IV + IVの使用に必要な医療スキルのレベルを設定します。 + Изменяет медицинский уровень, необходимый для установки IV. + Muda qual nível médico é necessário para aplicar IVs + Muuttaa, mitä lääketieteen koulutustasoa tarvitaan IV:n lisäämiseen + Bepaald welk medisch niveau benodigd is om IV's aan te kunnen leggen + + + Allow applying 14g IV + + + Changes what medical level is required to set 14 gauge IVs + + + Allow applying 20g IV + + + Changes what medical level is required to set 20 gauge IVs + + + Allow applying IO + Poziom wyszkolenia medycznego dla IO + 允许使用IO + Permetti utilizzo IO + Povolit zavedení IO + Autoriser la pose d'IO + IO 설정 허용 + Erlaubt die Anwendung von IO + IOの使用許可 + Permitir colocar IO + Permitir aplicar IO + Salli IO:n käyttö + Разрешить применение IO + IO plaatsing niveau + + + Changes what medical level is required to set IOs + Poziom wyszkolenia medycznego potrzebnego do założenia IO + 更改设置 IO 所需的医疗级别 + Cambia quale livello medico è richiesto per posizionare la IO. + Změní, která zdravotnická úroveň je potřeba k zavedení IO + Change le niveau médical requis pour poser des IO + IO를 설정하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, welcher für das Legen von IOs erforderlich ist + IOの使用に必要な医療スキルのレベルを設定します。 + Cambia el nivel médico que se requiere para colocar las IOs + Muda qual nível médico é necessário para aplicar IOs + Muuttaa IO:iden asettamiseen vaadittavaa lääketieteellistä tasoa + Изменяет, какой медицинский уровень требуется для установки IO + Bepaald welk medisch niveau benodigd is om IO's aan te kunnen leggen + + + Enables IV/IO drop times + Aktiviert das herausfallen von IOs/IVs + Włącz wypadanie IV/IO + Habilitar los tiempos de caída de IV/IO + 启用IV/IO下降时间 + 启用 IV/IO 的脱落时间 + Povolit čas vypadnutí pro IV/IO + IV/IO를 떼어내는 시간 활성화 + Activer les délais d'attente pour les IV/IO + IV/IO bırakma sürelerini etkinleştir + Abilitare i tempi di staccamento IV/IO + IV/IOの時間経過での脱落を有効化 + Включает время сброса IV/IO + Habilita tempo de queda de IV/IO + Mahdollistaa IV/IO-pudotusajat + Schakel IV/IO uitvaltijd in + + + IV/IO drop time + IOs/IVs Herausfallzeit + Temps de chute de l'IV/IO + IV/IO脱落までの時間 + IV/IO를 떼어내는 시간 + Tempo di staccamento IV/IO + Tempo de queda de IV/IO + Czas do wypadnięcia IV/IO + Tiempo de caida de IV/IO + Čas vypadnutí IV/IO + IV/IO pudotusaika + Время выпадения IV/IO + IV/IO uitvaltijd + + + Changes the time at which IVs/IOs fall out of a patient + Ändert den Zeitpunkt, nachdem IVs/IOs aus einem Patienten herausfallen + Czas samoistnego wypadnięcia IV/IO z pacjenta + Temps au bout du quel l'IV/IO tombe du patient + 改变病人的静脉注射/IOs脱落的时间 + IVs/IOs 脱落的时间 + Cambia il tempo in cui le IV/IO si staccano da un paziente + Cambia el tiempo en el que las IVs/IOs se caen de un paciente + IV/IO가 환자에게서 떼지는 시간 변경 + IV'lerin/IO'ların bir hastadan düştüğü zamanı değiştirir + Změní čas po kterém samovolně vypadnou IV/IO z pacienta + 患者からIV/IOが抜け落ちるのにかかる時間を設定します + Изменяет время выпадения IV/IO капельниц у пациента + Altera o tempo em que IVs/IOs caem de um paciente + Muuttaa aikaa, jolloin IVs/IO + Veranderd de benodigde uitvaltijd voor IV's/IO's + + + Sets if IV/IO needles are reusable + Ändert ob IVs/IOs wiederverwendbar sind + Czy igły IV/IO są do ponownego użytku + IV/IO réutilisables ? + 如果静脉注射针头是可重复使用的,则应设置。 + 如果 IV/IO 注射针头是可重复使用的, 则应启用。 + Imposta se gli aghi IV/IO sono riutilizzabili + Establece si las IV/IO son reutilizables + IV/IO 바늘 재사용 가능 여부 + IV/IO iğnelerinin yeniden kullanılabilir olup olmadığını ayarlar + Nastaví, zda IV/IO jehly jsou znovu-použitelné + IV/IO針を再利用可能にする + Устанавливает, можно ли использовать иглы IV/IO повторно + Define se as agulhas IV/IO são reutilizáveis + Asettaa, jos IV/IO-neulat ovat uudelleenkäytettäviä + Bepaald of IV/IO naalden herbruikbaar zijn + + + Time to establish a 16g IV + + + Time to establish a 14g IV + + + Time to establish a 20g IV + + + Time to establish IOs + Zeit zum Anlegen von IOs + Czas zakładania IO + Temps pour poser une IO + 建立国际组织的时间 + 建立 IO 注射的时间 + Tempo per posizionare gli IO + Tiempo para establecer las IO + IO를 꽂는 시간 변경 + IO'ları oluşturma zamanı + Čas k zavedení IO + IO刺入の所要時間 + Время установки IO + Tempo de estabelecimento de IO + Aika luoda IO:t + Aanbrengtijd voor IO's + + + Combat Wound Medication Pill Pack<br/>Used to suppress minor pain and relieve blood incompatibility symptoms + 戦闘傷病治療薬パック<br/>軽度の痛みを抑え、血液不適合による症状を緩和するために使用される + Paquete de medicación para heridas de combate. Se utiliza para suprimir el dolor leve y aliviar los síntomas de incompatibilidad sanguínea + Gevechts wond medicatie pil pak<br/>Wordt gebruikt om milde pijn en bloed incompatibiliteit op te lossen + Pack de Pilules Médicales pour Blessures de Combat </br> Utilisé pour supprimer les douleurs mineures et soulager les symptômes d'incompatibilité sanguine. + Pacchetto di Pillole per Medicazioni da Combattimento<br/>Usato per sopprimere il dolore lieve e alleviare i sintomi di incompatibilità del sangue + + + Combat Pill Pack + 戦闘治療薬パック + Paquete de Comprimidos de Combate + Comprimidos de Combate + Gevechtspillendoosje + Pack de Pilules de combat + Pacchetto di Pillole da Combattimento + + + Use CWMP + 使用 CWMP*(战斗药物) + 戦闘傷病治療薬を投与 + Usar Comprimidos de Combate + Utilizar Comprimidos de Combate + Gebruik Gevechtspillendoosje + Utiliser le PMBC + Usa il Pacchetto di Pillole da Combattimento (CWMP) + + + Used to restore consciousness + Wird zur Wiederherstellung des Bewusstseins verwendet + Używane w celu przywrócenia przytomności + Utilisé pour stimuler le patient et l'aider à reprendre conscience. + Usato per riprendere coscienza + Usado para ​​recuperar la consciencia + 用于恢复知觉 + 用于恢复知觉 + 의식 회복에 사용 + Bilinci geri yüklemek için kullanılır + Používá se k obnovení vědomí + 意識を回復するために使用される + Используется для восстановления сознания + Usado para restaurar a consciência + Käytetään tajunnan palauttamiseen + Wordt gebruikt om bewustzijn te herstellen + + + Ammonium Carbonate + Ammoniumkarbonat + Sole trzeźwiące + Sels d'Ammoniac + Carbonato d'ammonio + Carbonato de amonio + 碳酸铵 + 碳酸铵 + 탄산암모늄 + Amonyum karbonat + Uhličitan amonný + 炭酸アンモニウム + Карбонат аммония + Carbonato de Amônio + Ammoniumkarbonaatti + Ammoniumcarbonaat + + + Use Carbonate + Ammoniumkarbonat verwenden + Użyj soli trzeźwiących + Utiliser Sels d'Ammoniac + Somministra Carbonato d'ammonio + Administrar carbonato de amonio + 使用碳酸盐 + 使用碳酸铵 + 탄산암모늄 사용 + Karbonat kullanın + Použít Uhličitan + 炭酸アンモニウムを使う + Ввести Карбонат + Administrar Carbonato de Amônio + Käytä karbonaattia + Gebruik carbonaat + + + Penthrox Inhaler + ペンスロックス吸入器 + Inhalateur de Penthrox + 펜트록스 흡입기 + Penthrox-Inhalator + Inalador de Penthrox + Inhalador Penthrox + Penthrox inhalaattori + Ингалятор Пентрокс + Penthrox inhalator + Inalatore Penthrox + + + Use Penthrox Inhaler + 使用“绿哨”吸入式止痛药物 + ペンスロックス吸入器を使う + Utiliser l'inhalateur de Penthrox + 펜트록스 흡입기 사용 + Verwende Penthrox-Inhalator + Usar Inalador de Penthrox + Usar inhalador Penthrox + Käytä penthrox-inhalaattoria + Использовать ингалятор Пентрокс + Gebruik Penthrox inhalator + Usa l'Inalatore Penthrox + + + Volatile anesthetic, used to suppress moderate pain + 揮発性麻酔薬、 中程度の痛みを抑えるのに使用される + Anestésico inhalable, utilizado para suprimir el dolor moderado + volatiel anestheticum, wordt gebruik om stevige pijn te onderdrukken + Anesthésique volatil, utilisé pour supprimer les douleurs modérées + Anestetico volatile, usato per sopprimere il dolore moderato + + + Used to reverse opioid overdoses + Zur Umkehrung einer Opioid-Überdosis + Używany do zwalczania przedawkowania opioidów + Utilisé pour traiter les overdoses d'opiacés + Usato per trattare le overdose da oppiacei + Usado para tratar las sobredosis de opiáceos + 用于逆转阿片类药物的过量使用 + 用于逆转阿片类药物的过量使用 + 아편유사제 과다 복용을 역전시키는 데 사용 + Opioid aşırı dozlarını tersine çevirmek için kullanılır + Používá se ke zvrácení předávkování opioidy + オピオイド過剰摂取を元に戻すために使用される + Используется для устранения передозировок опиоидами. + Usado para reverter overdoses de opioides + Käytetään opioidien yliannostusten kumoamiseen + Wordt gebruikt om opïode overdossisen tegen te gaan + + + Naloxone + Naloxone + Nalokson + Naloxone + Naloxone + Naloxona + 纳洛酮 + 纳洛酮 + 날록손 + Nalokson + Naloxon + ナロキソン + Налоксон + Naloxona + naloksoni + Naloxone + + + Use Naloxone + Naloxone verwenden + Użyj Naloksonu + Administrer Naloxone + Somministrare Naloxone + Administrar Naloxona + 使用纳洛酮 + 使用纳洛酮 + 날록손 복용 + Nalokson kullanın + Použít Naloxon + ナロキソンを投与 + Ввести Налоксон + Administrar Naloxona + Käytä naloksonia + Gebruik Naloxone + + + Used to combat cardiac arrest + Einsatz zur Bekämpfung des Herzstillstands + Używany do zwalczania zatrzymania akcji serca + Utilisé pour combattre l'arrêt cardiaque. + 用于防治心脏骤停 + 用于防治心脏骤停 + Usato per combattere l'arresto cardiaco + Se utiliza para combatir un paro cardiaco + 심장 마비 퇴치를 위해 사용 + Kalp durmasıyla mücadele için kullanılır + Používá se k léčení srdeční zástavy + 心停止に対応する為に使用される + Используется для борьбы с остановкой сердца + Usado para combater a parada cardíaca + Käytetään sydämenpysähdyksen torjuntaan + Wordt gebruikt om hartstilstand te bestrijden + - Amiodarone - Amiodaron + Vial: Amiodarone + Amiodaron + Amiodaron Amiodarone - Amiodarona + 胺碘酮 + 胺碘酮 Amiodarone - Amiodaron - Amiodarona - Амиодарон - Amiodaron + Amiodarona 아미오다론 - アミオダロン - 胺碘酮 (Amiodarone) - 胺碘酮 Amiodaron + Amiodaron + アミオダロン + Амиодарон + Amiodarona Amiodaroni Amiodaron - - Used to combat cardiac arrest - Používá se k léčení srdeční zástavy - Utilisé pour combattre l'arrêt cardiaque. - Se utiliza para combatir un paro cardiaco - Usato per combattere l'arresto cardiaco - Używany do zwalczania zatrzymania akcji serca - Usado para combater a parada cardíaca - Используется для борьбы с остановкой сердца - Einsatz zur Bekämpfung des Herzstillstands - 심장 마비 퇴치를 위해 사용 - 心停止に対応する為に使用される - 用於防治心臟驟停 - 用于防治心脏骤停 - Kalp durmasıyla mücadele için kullanılır - Käytetään sydämenpysähdyksen torjuntaan - Wordt gebruikt om hartstilstand te bestrijden + + Used to reverse TXA and EACA overdose + + + Vial: Alteplase + + + Push Amiodarone + Amiodaron verabreichen + Wstrzyknij Amiodaron + Injecter Amiodarone + 推广胺碘酮 + 推注胺碘酮 + Iniettare l'amiodarone + Administrar Amiodarona + 아미오다론 투여 + Amiodaron'u itin + Aplikovat Amiodaron + アミオダロンを注入 + Ввести Амиодарон + Injetar Amiodarona + Työnnä amiodaria + Injecteer Amiodaron + + + Used to combat cardiac arrest + Einsatz zur Bekämpfung des Herzstillstands + Używany do zwalczania zatrzymania akcji serca + Antiarythmique utilisé pour combattre les formes choquables arrêt cardiaque. + 用于防治心脏骤停 + 用于对抗心脏骤停 + Usato per combattere l'arresto cardiaco + Se utiliza para combatir un paro cardiaco + 심장 마비 퇴치를 위해 사용 + Kalp durmasıyla mücadele için kullanılır + Používá se k léčení srdeční zástavy + 心停止に対応する為に使用される + Используется для борьбы с остановкой сердца + Usado para combater a parada cardíaca + Käytetään sydämenpysähdyksen torjuntaan + Wordt gebruikt om hartstilstand te bestrijden + + + Vial: Lidocaine + Lidocain + Lidokaina + Lidocaïne + 利多卡因 + 利多卡因 + Lidocaina + Lidocaína + 리도카인 + Lidokain + Lidokain + リドカイン + Лидокаин + Lidocaína + Lidokaiini + Lidocaïne + + + Push Lidocaine + Lidocain verabreichen + Wstrzyknij Lidokainę + Injecter Lidocaïne + 推动利多卡因 + 推注利多卡因 + Iniettare la lidocaina + Administrar Lidocaína + 리도카인 투여 + Push Lidokain + Aplikovat Lidokain + リドカインを注入 + Ввести Лидокаин + Injetar Lidocaína + Paina lidokaiinia + Injecteer Lidocaïne + + + Used to treat chemical exposure and bradycardia + Zur Behandlung von Bradykardie + Używany do zwalczania bradykardii + Utiliser pour traiter une bradycardie + 用于治疗心动过缓 + 用于治疗心动过缓 + Usato per trattare la bradicardia + Se utiliza para tratar la bradicardia + 서맥 치료에 사용 + Bradikardi tedavisinde kullanılır + Používá se k léčbě bradykardie + 徐脈の治療に使用される + Используется для лечения брадикардии + Usado para tratar bradicardia + Käytetään bradykardian hoitoon + Wordt gebruikt om chemische blootstelling en bradycardie te behandelen + + + Atropine Autoinjector + Atropin + Atropina + Atropine + 阿托品 + 阿托品 + Atropina + Atropina + 아트로핀 + Atropin + Atropin + アトロピン + Атропин + Autoinjetor de Atropina + Atropiini + Atropine autoinjector + + + Vial: Atropine + + + Inject Atropine + Atropin verabreichen + Wstrzyknij Atropinę + Injecter Atropine + 推动阿托品 + 推注阿托品 + Iniettare l'atropina + Administrar Atropina + 아트로핀 투여 + Atropin itin + Aplikovat Atropin + アトロピンを注入 + Ввести Атропин + Injetar Atropina + Työnnä atropiinia + Injecteer Atropine + + + Inject Atropine IV + + + Encourages clot formation + Fördert die Gerinnungsbildung + Wspomaga tworzenie skrzepów + Favorise la coagulation + Favorisce la coagulazione + Favorece la coagulación + 鼓励血凝块的形成 + 促进血凝块的形成, 有利于抑制出血 + 혈전 형성 촉진 + Pıhtı oluşumunu teşvik eder + Podporuje tvorbu sraženin + 血液凝固を促進し、出血を抑えます + Способствует образованию тромбов + Intensifica a coagulação + Edistää verihyytymien muodostumista + Bevorderd bloedstolling + + + Vial: TXA + TXA + TXA + Acide Tranexamique + TXA + ATX + TXA + 血栓素 + TXA + TXA + TXA + トラネキサム酸 (TXA) + TXA + TXA + TXA + TXA + + + Push TXA + TXA verabreichen + Wstrzyknij TXA + Injecter Acide Tranexamique + Iniettare TXA + Administrar ATX + 推动TXA + 推注血栓素 + TXA 투여 + TXA'yı itin + Aplikovat TXA + トラネキサム酸 (TXA)を注入 + Ввести TXA + Injetar TXA + Paina TXA + Injecteer TXA + + + Used to raise blood pressure + Wird zur Erhöhung des Blutdrucks verwendet + Używana do podniesienia ciśnienia krwi + Utilisé pour remonter la pression artérielle + 用于提高血压 + 用于提高血压 + Usato per aumentare la pressione sanguigna + Se utiliza para subir la presión arterial + 혈압을 높이는 데 사용 + Kan basıncını yükseltmek için kullanılır + Používáno ke zvýšení krevního tlaku + 血圧を上げるために使用される + Используется для повышения артериального давления + Usado para aumentar a pressão arterial + Käytetään verenpaineen nostamiseen + Wordt gebruikt om de bloeddruk te verhogen + + + Vial: Norepinephrine + Noradrenalin + Noradrenalina + Noradrénaline + 去甲肾上腺素 + 去甲肾上腺素 + Norepinefrina + Norepinefrina + 노르에피네프린 + Norepinefrin + Norepinefrin + ノルアドレナリン + Норадреналин + Norepinefrina + Norepinefriini + Noradrenaline + + + Push Norepinephrine + Noradrenalin verabreichen + Wstrzyknij Noradrenalinę + Injecter Noradrénaline + 推动去甲肾上腺素 + 推注去甲肾上腺素 + Iniettare la norepinefrina + Administrar Norepinefrina + 노르에피네프린 투여 + Norepinefrin itin + Aplikovat Norepinefrin + ノルアドレナリンを注入 + Ввести Норадреналин + Injetar Norepinefrina + Työnnä norepinefriiniä + Injecteer Noradrenaline + + + Used to raise blood pressure + Wird zur Erhöhung des Blutdrucks verwendet + Używana do podniesienia ciśnienia krwi + Utilisé pour remonter la pression artérielle + 用于提高血压 + 用于提高血压 + Usato per aumentare la pressione sanguigna + Se utiliza para subir la presión arterial + 혈압을 높이는 데 사용 + Kan basıncını yükseltmek için kullanılır + Používáno ke zvýšení krevního tlaku + 血圧を上げるために使用される + Используется для повышения артериального давления + Usado para aumentar a pressão arterial + Käytetään verenpaineen nostamiseen + Wordt gebruikt om de bloeddruk te verhogen + + + Vial: Phenylephrine + Phenylephrin + Fenylefryna + Phényléphrine + 苯肾上腺素 + 苯肾上腺素 + Fenilefrina + Fenilefrina + 페닐에프린 + Fenilefrin + Fenylefrin + フェニレフリン + Фенилэфрин + Fenilefrina + Fenyyliefriini + Fenylefrine + + + Push Phenylephrine + Phenylephrin verabreichen + Wstrzyknij Fenylefrynę + Injecter Phényléphrine + 推注苯肾上腺素 + 推注苯肾上腺素 + Iniettare la fenilefrina + Administrar Fenilefrina + 페닐에프린 투여 + Fenilefrin itin + Aplikovat Fenylefrin + フェニレフリンを注入 + Ввести Фенилэфрин + Injetar Fenilefrina + Työnnä fenyyliefriiniä + Injecteer Fenylefrine (IV) + + + Phenylephrine Autoinjector + Автоинъектор фенилэфрина + Autoinyector de Fenilefrina + フェニレフリン自動注射器 + Autoinjecteur de Phényléphrine + Autoinjetor de Fenilefrina + Fenylefrine autoinjector + Autoiniettore di Fenilefrina + + + Used to raise blood pressure + 血圧を上げるために使用される + Usato per aumentare la pressione sanguigna + Utilisé pour augmenter la pression artérielle + + + Inject Phenylephrine + Phenylephrin verabreichen + Wstrzyknij Fenylefrynę + Injecter Phényléphrine + 推注苯肾上腺素 + 推注苯肾上腺素 + Iniettare la fenilefrina + Administrar Fenilefrina + 페닐에프린 투여 + Fenilefrin itin + Aplikovat Fenylefrin + フェニレフリンを注射 + Ввести Фенилэфрин + Injetar Fenilefrina + Injecteer Fenylefrine + + + Used to lower blood pressure + Zur Senkung des Blutdrucks + Używana do obniżenia ciśnienia krwi + Utilisé pour diminuer la pression artérielle + 用于降低血压 + 用于降低血压 + Usato per abbassare la pressione sanguigna + Se utiliza para bajar la presión arterial + 혈압을 낮추는 데 사용 + Kan basıncını düşürmek için kullanılır + Používáno ke snížení krevního tlaku + 血圧を下げるために使用される + Используется для снижения артериального давления + Usado para baixar a pressão arterial + Käytetään alentamaan verenpainetta + Wordt gebruikt om de bloeddruk te laten dalen + + + Vial: Nitroglycerin + Nitroglycerin + Nitrogliceryna + Nitroglycérine + 硝化甘油 + 硝化甘油 + Nitroglicerina + Nitroglicerina + 니트로글리세린 + Nitrogliserin + Nitroglycerin + ニトログリセリン + Нитроглицерин + Nitroglicerina + Nitroglyseriini + Nitroglycerine + + + Push Nitroglycerin + Nitroglycerin verabreichen + Wstrzyknij Nitroglicerynę + Injecter Nitroglycérine + 推动硝化甘油 + 推注硝化甘油 + Iniettare la nitroglicerina + Administrar Nitroglicerina + 니트로글리세린 투여 + Nitrogliserin itin + Aplikovat Nitroglycerin + ニトログリセリンを注入 + Ввести Нитроглицерин + Injetar Nitroglicerina + Paina nitroglyseriiniä + Injecteer Nitroglycerine + + + Reorient Patient + Patient umorientieren + Ocuć pacjenta + Stimuler le patient + 调整病人的方向 + 刺激患者 + Stimolare il paziente + Estimular al paciente + 환자 깨우기 + Reorientovat pacienta + 患者を刺激する + Переориентация пациента + Reorientar Paciente + Suuntaa potilas uudelleen + Heroriënteer patiënt + + + Reorienting + Umorientieren + Cucenie + Stimulation + 调整方向 + 刺激中... + Stimolando + Abofeteando + 깨우는 중 + Yeniden yönlendirme + Reoritentuji + 刺激しています + Переориентация + Reorientando + Suuntaa uudelleen + Aan het heroriënteren + + + You hit the cheek, but patient still asleep! + Du hast die Wange getroffen, aber Patient schläft noch! + Uderzyłeś w policzek, ale pacjent nadal śpi! + ¡Cacheteaste el paciente pero sigue dormido! + 你打你的脸颊,但病人还在睡觉! + 患者仍未苏醒 + Udeřil jsi do tváře, ale pacient stále spí! + 뺨을 때렸지만 여전히 의식 불명 상태입니다! + Vous avez frappé la joue, mais le patient est encore endormi! + Yanağına vurdun ama hasta hala uyuyor! + Hai colpito la guancia, ma il paziente dorme ancora! + Вы уларили по щеке, но больной еще спит! + あなたは頬を叩いたが、 患者はまだ眠っている! + Após a bofetada, o paciente continua desacordado! + Lyöt poskelle, mutta potilas nukkuu edelleen! + Je hebt de wang geraakt, maar de patiënt slaapt nog! + + + Patient woke up with a hard hit! + Patient wachte mit einem harten Schlag auf! + Pacjent obudził się z mocnym uderzeniem! + ¡El paciente se despertó con tremendo bofetón! + 患者被重击醒来! + 患者苏醒了! + Pacient se probudil po silném úderu! + 환자는 강한 타격으로 깨어났습니다! + Le patient s'est réveillé avec un coup dur ! + Hasta sert bir vuruşla uyandı! + Il paziente si è svegliato con un duro colpo! + Пациент проснулся от сильного удара! + 患者は強打で飛び起きた! + O bofetão acorda o paciente! + Potilas heräsi kovalla iskulla! + Patiënt werd wakker na een harde klap! + + + Using + Verwenden + Używanie + Usando + 服用中 + 服用中 + Používám + 사용 중 + Utilisation + Kullanılıyor + Usando + 使用中 + С использованием + Usando + Käyttämällä + Wordt gebruikt + + + Pushing + Verabreichen + Wstrzykiwanie + Administrando + 服用中 + 使用中 + Aplikuji + 투여 중 + Administration + Kullanılıyor + Iniettando + 注入中 + Ввести + Administrando + Työntää + Wordt geïnjecteerd + + + %1 pushed %2 + %1 verabreichte %2 + %1 wstrzyknął %2 + %1 administró %2 + %1 被插入一個 %2 + %1 被注射了 %2 + %1 aplikoval %2 + %1 이(가) %2 에게 투여됨 + %1 a administré un(e) %2 + % 1,% 2 eklendi + %1 ha somministrato %2 + %1 が%2を注入した + %1 нажал %2 + %1 administrou %2 + %1 työnnettiin %2 + %1 injecteerde %2 + + + %1 injected %2 + %1 verabreichte %2 + %1 włożył %2 + %1 inyectó %2 + %1 被插入一個 %2 + %1 被注射了 %2 + %1 aplikoval %2 + %1 이(가) %2 에게 주사됨 + %1 a injecté un(e) %2 + % 1,% 2 eklendi + %1 ha iniettato %2 + %1 が%2を注射した + %1 введено %2 + %1 injetou %2 + %1 pistetään %2 + %1 injecteerde %2 + + + %1 used %2 + %1 nutzte %2 + %1 użył %2 + %1 usó %2 + %1 被插入一個 %2 + %1 被施用了 %2 + %1 aplikoval %2 + %1 이(가) %2 에게 사용됨 + %1 a utilisé un(e) %2 + % 1,% 2 eklendi + %1 ha usato %2 + %1 が%2を使用した + %1 использует %2 + %1 usou %1 + %1 käytetty %2 + %1 gebruikte %2 + + + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16g IV + 16г IV + 16g IV + 16g IV + 16g IV + + + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14g IV + 14r IV + 14g IV + 14g IV + + + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20g IV + 20r IV + 20g IV + 20g IV + + + Intravenous Needle + Intravenöse Kanüle + Kaniula dożylna (wenflon) + Catéter Intravenoso + 用於舒緩疼痛 + 静脉注射(IV)针头 + Nitrožilní jehla + 정맥 주사 바늘 + Cathéther intra-veineux + Ağrıyı bastırmak için kullanılır + Catetere intravenoso + 経静脈注射 (IV) 針 + Внутривенная игла + Cateter Intravenoso + Laskimonsisäinen neula + intraveneuze canule + + + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + FAST IO + + + Intraosseous Needle + Intraossäre Kanüle + Igła doszpikowa + Catéter Intraóseo + 用於舒緩疼痛 + 骨髓注射(IO)针头 + Intraoseální jehla + 골내 주사 바늘 + Cathéther intra-osseux + Ağrıyı bastırmak için kullanılır + Sistema d'infusione intraossea + 経骨髄注射 (IO) 針 + Внутривенная игла + Infusão Intraóssea + Luonsisäinen neula + Intraossale canule + + + Establish 16g IV + 16g IV einrichten + Załóż 16G IV + Insertar 16g IV + Insertion 16g IV + Posiziona 16g IV + 建立16g IV + 建立16g IV + 16g IV 주사 + 16g IV oluşturun + Zavádím IV + 16g IVを刺入 + Установить 16г IV + Inserir 16g IV + Aseta 16g IV + Leg 16g IV aan + + + Establish FAST IO + FAST IO einrichten + Załóż FAST IO + Insertar FAST IO + Zavést FAST IO + Insertion FAST IO + Inserisci FAST IO + 建立FAST IO + 建立FAST IO + FAST IO 주사 + HIZLI IO kurun + FAST IOを刺入 + Установить FAST IO + Inserir FAST IO + Perusta FAST IO + Leg FAST IO aan + + + Establishing IV/IO + IV legen + Zakładanie IV + Colocando IV + Zavádím IV + Insertion IV + IV/IO'nun kurulması + Posizionando IV + 建立IV/IO + 建立IV中 + IV/IO 주사 중 + IV/IOの刺入中 + Установить IV + Inserindo IV + IV/IO:n perustaminen + IV/IO wordt aangelegd + + + Establishing IO + IO legen + Zakładanie IO + Colocando IO + Zavádím IO + Insertion IO + IO'nun kurulması + Inserendo IO + 建立IO + 建立IO中 + IO 주사 중 + IOの刺入中 + Установить IO + Inserindo IO + IO:n perustaminen + IO wordt aangelegd + + + %1 established a %2 + %1 legte ein %2 + %1 założył %2 + %1 ha colocado %2 + %1 被插入一個 %2 + %1 被建立了一个 %2 + %1 zavedl %2 + %1 가 %2 에게 주사됨 + %1 a inseré un(e) %2 + % 1,% 2 eklendi + %1 ha posizionato %2 + %1 が%2を刺入した + %1 ввёл %2 + %1 inseriu %2 + %1 perusti %2 + %1 heeft een %2 aangelegd + + + Remove IV/IO + IV/IO entfernen + Zdejmij IV/IO + Retirar IV/IO + Retirer IV/IO + IV/IO'yu kaldır + Rimuovi IV/IO + 移除IV/IO + 移除 IV/IO + IV/IO 제거 + Odstraňuji IV + IV/IOを抜去 + Удалить IV/IO + Remover IV/IO + Poista IV/IO + Verwijder IV/IO + + + Removing IV/IO + Entferne + Zdejmowanie + Retirando + Retrait + Kaldırma + Rimuovendo + 移除 + 移除中 + 제거 중 + Odstraňuji + IV/IOを抜去中 + Удаление IV/IO + Removendo + IV/IO poisto + IV/IO wordt verwijderd + + + Fluid Require inserted IV/IO + Flüssigkeiten Erfordert eingefügtes IV/IO + 輸液にIV/IO刺入を要求する + Требовать установки IV/IO + Los Fluidos requieren que se inserte la IV/IO + Les fluides nécessitent une IV/IO insérée + Fluido necessita de inserção IV/IO + Vloeistoffen vereisen een aangelegde IV/IO + Fluido richiede IV/IO inserito + + + Default false. If true, you will need to insert IV/IO first before being able to give someone saline/blood/plasma. \nIf false, it retains standard ACE behaviour for using saline/blood/plasma. + Standardeinstellung falsch. Wenn wahr, müssen Sie zuerst eine IV/IO einführen, bevor Sie jemandem Kochsalzlösung/Blut/Plasma geben können. \nWenn falsch, behält es das Standard-ACE-Verhalten für die Verwendung von Kochsalzlösung/Blut/Plasma bei. + Domyślnie wyłączone. Jeśli włączone, należy najpierw umieścić IV/IO przed podaniem płynów. \nJeśli wyłączone, mechanika będzie taka sama jak w ACE przy podawaniu soli fizjologicznej/krwi/osocza. + Predeterminado desactivado. Si se activa, se necesitará insertar una IV/IO primero antes de poder suministrar salino/sangre/plasma. \nSi esta desactivado, se mantiene el funcionamiento de ACE para aplicar salino/sangre/plasma. + Par défaut désactivé. Si activé, vous avez besoin de poser une IV/IO avant de pouvoir administrer de la saline/sang/plasma. \nSi désactivé, le comportement standard de ACE pour l'usage de saline/sang plasma est utilisé. + VDefault false. Doğruysa, birine salin/kan/plazma vermeden önce IV/IO eklemeniz gerekir. \nYanlışsa, salin/kan/plazma kullanımı için standart ACE davranışını korur. + Predefinito falso. Se è vero, dovrai prima inserire l'IV/IO per poter somministrare a qualcuno soluzione salina/sangue/plasma. \nSe falso, mantiene il comportamento ACE standard per l'utilizzo di soluzione salina/sangue/plasma. + 默认为真。 如果为 false,您需要先插入 IV/IO,然后才能给某人注射盐水/血液/血浆。 \n如果为 false,它保留使用盐水/血液/血浆的标准 ACE 行为。 + 默认为真。 如果为 false, 您需要先建立 IV/IO, 然后才能给某人注射盐水/血液/血浆。 \n如果为 false, 它保留使用盐水/血液/血浆的标准 ACE 行为。 + 기본값은 참입니다. 참이면 식염수/혈액/혈장을 제공하기 전에 먼저 IV/IO를 삽입해야 합니다. \n거짓이면 식염수/혈액/혈장 사용에 대한 표준 ACE 동작을 유지합니다. + Výchozí zakázáno. Pokud je povoleno, budete muset nejprve vložit IV/IO, než budete moci někomu podat fyziologický roztok/krev/plazmu. \nPokud je zakázano, zachová standardní chování ACE pro použití fyziologického roztoku/krve/plazmy. + デフォルトではfalseです。trueの場合、生理食塩水/血液/血漿の輸液を行う前にIV/IOの刺入が必要になります。 \nfalseの場合はACE標準の生理食塩水/血液/血漿と同様に作用します。 + Истина по умолчанию. Если это правда, вам нужно будет сначала ввести IV/IO, прежде чем вы сможете дать кому-то физиологический раствор/кровь/плазму. \nЕсли false, он сохраняет стандартное поведение ACE для использования физиологического раствора/крови/плазмы. + Falso, por padrão. Se verdadeiro, você precisará inserir IV/IO primeiro antes de poder administrar solução salina/sangue/plasma a alguém. \nSe falso, mantém o comportamento padrão do ACE para uso de solução salina/sangue/plasma. + Oletusarvo epätosi. Jos totta, sinun on lisättävä IV/IO ensin, ennen kuin voit antaa jollekulle suolaliuosta/verta/plasmaa \nJos väärin, se säilyttää normaalin ACE-käyttäytymisen suolaliuoksen/veren/plasman käytössä. + Standaard vals. Wanneer waar moet er eerst een IV/IO aangelegd worden voordat je vloeistoffen kan toedienen.\nWanneer vals, wordt standaard ACE gedrag gebruikt voor vloeistoffen + + + Medications Require IV/IO + 薬液にIV/IO刺入を要求する + Les médicaments nécessitent une IV/IO + 药物需要通过IV/IO注射 + Le medicazioni richiedono un accesso IV/IO + Léčiva vyžadující IV/IO + Leki wymagają IV/IO + 투약에 IV/IO가 필요함 + Medikamente erfordern eine IV/IO + Requerir IV/IO para fármacos + Medicamentos requerem IV/IO + Lääkkeet vaativat IV/IO:n + Лекарства требуют внутривенного введения + Medicaties vereisen IV/IO + + + Default false. If true, you will need to insert IV/IO first before being able to give someone medications. \nIf false, you can give them without it. + デフォルトではfalseです。trueの場合、薬液注射を行う前にIV/IOの刺入が必要になります。 \nfalseの場合は薬品だけで投与可能になります。 + Faux par défaut. Si vrai, il sera nécessaire d'insérer une IV/IO avant de pouvoir donner des médicaments à quelqu'un. \nSi faux, ils pourront être donnés sans + 默认假。 如果为真,您将需要先建立 IV/IO, 然后才能给某人注射药。 \n如果为假, 您可以在没有IV/IO的情况下注射药物他们。 + Falso nel default. Se vero/true, dovrai prima inserire un IV/IO per poter effettuare alcune medicazioni. \nSe falso, potrai dargliele senza IV/IO. + V základu vypnuto. Pokud zapnuto, budete potřebovat zavést IV/IO jako první, než budete moct někomu dávat léčiva \nPokud vypnuto, tak je můžete dávat bez nich. + Domyślnie wyłączone. Jeśli włączone leki będą wymagać założonego IV/IO \nWyłączone pozwoli podać leki bez tego. + 기본값은 false입니다. true일 경우 누군가에게 약을 주입하기 전에 먼저 주사를 꽂아야 합니다. \nfalse일 경우 주사없이 투약이 가능합니다. + Standardmäßig falsch. Bei "wahr" muss zuerst ein IV/IO gelegt sein, bevor jemandem Medikamente geben werden können. \nBei "falsch" können Medikamente ohne IV/IO geben werden. + Predeterminado desactivado. Si se activa, se necesitará insertar una IV/IO primero antes de poder suministrar fármacos. \nSi esta desactivado, se podrán suministrar sin IV/IO. + Falso, por padrão. Se verdadeiro, você precisará inserir IV/IO primeiro antes de poder administrar medicamentos a alguém. \nSe falso, você pode administrá-los sem ele. + Oletusarvo epätosi. Jos totta, sinun on lisättävä IV/IO ensin, ennen kuin voit antaa jollekin lääkkeitä. \nJos vääriä, voit antaa ne ilman sitä. + По умолчанию false. Если true, вам нужно будет сначала ввести IV/IO, прежде чем вы сможете давать кому-либо лекарства. n\Если false, вы можете давать их без этого. + Standaard vals. Wanneer waar moet er eerst een IV/IO aangelegd worden voordat medicatie toegedient kan worden. \nWanneer vals kunnen medicijnen gegeven worden zonder IV/IO + + + Blood Drawing Require IV/IO + 採血にIV/IO刺入を要求する + Забор крови требует IO/IV + Blutentnahme benötigt IV/IO + La Extracción de Sangre Requiere la IV/IO + La prise de sang nécessite une IV/IO + Extração de sangue necessita de IV/IO + Bloedoptrekken vereist IV/IO + Prelievo di sangue richiede IV/IO + + + Default false. If true, you will need to insert IV/IO first before being able to draw blood from someone. \nIf false, you can draw without it. + デフォルトではfalseです。trueの場合、人から採血する前にIV/IOの刺入が必要になります。 \nfalseの場合は刺入無しで採血できます。 + По умолчанию false. Если true, вам нужно будет сначала ввести IO/IV, прежде чем вы сможете взять кровь у кого-либо. \nесли false, вы можете забрать кровь без них + Steuert, ob eine IV/IO vorhanden sein muss, um Blut abnehmen zu könnnen./nStandard: falsch + Falso por defecto. Si se habilita, necesitarás insertar primero la IV/IO para poder extraer sangre de alguien. \nSi falso, puedes extraer sangre sin ello. + Désactivé par défaut. Si activé, vous devrez d’abord insérer une IV/IO avant de pouvoir prélever du sang sur quelqu’un. \nSi désactivé, vous pouvez effectuer une prise de sang sans IV/IO. + Desativado, por padrão. Quando ativado, você precisará inserir IV/IO primeiro antes de poder retirar sangue de alguém. \nSe desativado, você pode retirar sem ele. + Standaard vals. Wanneer waar moet er eerst een IV/IO toegediend worden voordat je bloed kan optrekken. \nWanneer vals is dit niet vereist. + Impostazione predefinita falsa. Se vera, dovrai inserire prima IV/IO prima di poter prelevare sangue da qualcuno. \nSe falsa, puoi prelevare senza di esso. + + + Enable IV/IO Flow Control + IV/IO流量操作を有効化 + Abilita il controllo del flusso IV/IO + Activer les opérations de flux IV/IO + + + Enables the IV/IO flow control menu which gives the medic fine control over the volume running through the active line + IV/IO流量操作メニューを有効にし、輸液がラインを流れる液量を衛生兵が細かく制御できるようにします。 + Abilita il menu di controllo del flusso IV/IO che consente al medico di controllare con precisione il volume che scorre attraverso la linea attiva. + Active le menu de contrôle du débit IV/IO qui permet à l'infirmier de contrôler finement le volume circulant dans la ligne active. + + + Reorientation slap sound + Dźwięk przy cuceniu + Slap-Sound für Umorientieren + Sonido de bofetada para recuperar la consciencia + 调整方向的拍击声 + 刺激患者的拍击声 + Zvuk facky reorientace + 뺨 때리기 사운드 + Son claque stimulation + Yönlendirme tokat sesi + Suono schiaffo stimolazione + 患者を刺激するアクションで音を鳴らす + Звук пощечины при переориентации + Som de tapa durante reorientação + Lyöksytysääni potilaan suunnan muuttamiseen + Heroriëntatie klapgeluid + + + Enables slap sound for reorientation + Włącza dźwięk uderzenia przy cuceniu + Aktiviert Slap-Sound für Umorientieren + Habilia el sonido de bofetada para recuperar la consciencia + 启用调整方向时的拍打声 + 启用刺激患者时的拍打声 + Povolit zvuk facky pro reorientaci + 환자를 깨우기 위해 뺨을 때리는 사운드를 활성화 + Activer son de la claque + Yeniden yönlendirme için tokat sesini etkinleştirir + Abilita il suono dello schiaffo per la stimolazione + 患者を刺激した際に平手打ちするような音を鳴らします + Включает звук пощечины для переориентации + Ativa o som de tapa durante reorientação + Sallii iskuäänen uudelleensuuntaamista varten + Schakelt het klapgeluid in voor heroriëntatie + + + Reorientation enabled? + Cucenie dostępne? + Umorientieren aktiviert? + ¿Habilitar bofetada? + 启用调整方向功能? + 启用刺激患者功能? + Reorientace povolena? + 뺨 때리기를 활성화합니까? + Stimulation activé? + Yeniden yönlendirme etkin mi? + Stimolazione abilitata? + "患者を刺激する"アクションを有効化 + Переориентация включена? + Reorientação habilitada? + Uudelleensuuntaus käytössä? + Heroriëntatie ingeschakeld? + + + Enables reorientation + Pozwala na cucenie + Aktiviert das Umorientieren + Habilita la bofetada para recuperar la consciencia + 启用调整方向的功能 + 启用刺激患者的功能 + Povolí reorientaci + 뺨 때리기 활성화 여부 + Activer stimulation + Yeniden yönlendirmeyi etkinleştirir + Stimolazione abilitata + 安定化している患者を刺激(平手打ち)することで、目覚めさせる機能とアクションを有効化します + Включает переориентация + Habilita a reorientação + Mahdollistaa suunnanmuutoksen + Schakelt heroriëntatie in + + + Allow reorientation + Pozwól na cucenie + Umorientieren zulassen + Habilitar la bofetada para recuperar la consciencia + 允许调整方向 + 允许刺激患者 + Povolit reorientaci + 뺨 때리기 허용 + Autoriser stimulation + Yeniden yönlendirmeye izin ver + Autorizza stimolazione + 患者を刺激するアクションの許可 + Разрешить переориентацию + Permitir reorientação + Salli suunnanmuutos + Trainingsniveau voor heroriëntatie + + + Medical level required for reorientation + Poziom wyszkolenia wymagany do cucenia + Benötigter medizinischer Grad, zum Umorientieren + Nivel médico requerido para la bofetada + 调整方向所需的医疗水平 + 刺激患者所需的医疗水平 + Vyžadovaná Zdravotnická úroveň pro reorientaci + 뺨을 때리는 데 필요한 의료 레벨 수준 + Niveau médical requis pour stimulation + Yeniden oryantasyon için gerekli tıbbi seviye + Livello medico richiesto per stimolazione + 患者を刺激するアクションの使用に必要な医療スキルのレベルを設定します。 + Медицинский уровень, необходимый для переориентации + Nível médico necessário para reorientação + Uudelleensuuntautumiseen vaadittava lääketieteellinen koulutustaso + Benodigd trainingsniveau voor heroriëntatie + + + Enable Weapon Sway + Aktiviere Waffen Schwanken + Activer l'oscillation de l'arme + 武器の揺れを有効化 + 무기 흔들림 사용(페르피틴) + Abilita l'oscillazione dell'arma + Ativar balanço da arma + Włącz kołysanie broni + Habilita el balanceo del arma + Povolit Houpání Zbraně + Ota aseen heiluminen käyttöön + Включить раскачивание оружия + Schakel wapenbeweging in + + + Enables if pervitin should influance your weapon sway + Aktiviert, ob Pervitin das Schwanken deiner Waffen beeinflussen soll + Définie si la pervitine influance l'oscillation de l'arme + ペルビチンが武器の揺れに影響を与える機能を有効にします + 페르피틴이 무기의 흔들림에 영향을 미치는지의 여부를 활성화합니다. + Attiva se il pervitin debba influenzare l'oscillazione dell'arma + Ativa se o Pervitin influenciar o balanço da sua arma + Włącza efekt zmiany kołysania broni po spożyciu pervitinu + Habilita si la pervitina afecta al balanceo del arma + Povoluje, zda pervitin ovlivní Vaše houpání zbraně + Mahdollistaa pervitiinin vaikutuksen aseen heilumiseen. + Включается, если Первитин должен повлиять на раскачивание вашего оружия + Bepaald of pervitin invloed heeft op wapenbewegingen + + + Pervitin Speed Boost + Pervitin Geschwindigkeit Boost + 페르피틴 속도 부스트 + ペルビチン速度上昇 + Aumento de velocidade do Pervitin + Boost de vitesse de la pervitine + Zwiększenie prędkości ruchu + Aumento de velocidad de la pervitina + Pervitin Speed Boost + Boost velocità Pervitin + Pervitiini nopeuden lisääminen + Повышение скорости Первитином + Pervitin snelheidsboost + + + The animation speed that gets set in Stage 1 of Pervitin. (1 = normal, 2 = twice) + Geschwindigkeit, die in Phase 1 von Pervitin gesetzt wird. (1 = normal, 2 = doppelt) + 페르피틴 효과 1단계에서 설정되는 애니메이션 속도. (1 = 정상, 2 = 두 배) + ペルビチン効果の第一段階でのアニメーションの再生速度を設定します (1 = 通常、2 = 2倍速) + A velocidade da animação definida no Estágio 1 do Pervitin. (1 = normal, 2 = duas vezes) + La vitesse de déplacement étant redéfinie durant le stage 1 de la pervitine. (1 = normal, 2 = doublée)1 + Prędkość animacji po zażyciu pervitinu (1 = normalnie, 2 = podwójnie) + La velocidad de animacion que se fija en la fase 1 de la pervitina. (1 = Normal. 2 = Doble) + Rychlost animace efektu pervitinu v jeho první fázi. (1 = normální, 2 = dvojnásobná) + La velocità di animazione impostata nella Fase 1 di Pervitin. (1 = normale, 2 = due volte) + Animaationopeus, joka asetetaan pervitiinin vaiheessa 1. (1 = normaali, 2 = kahdesti) + Скорость анимации, которая устанавливается на этапе 1 Первитина. (1 = обычная, 2 = двойная) + Animatiesnelheid van fase 1 van pervitin. (1 = normaal, 2 = dubbel) + + + Treatment time for reorientation + Czas cucenia + 恢复体态的治疗时间 + Tempo di trattamento per riorientamento + Doba léčby pro reorientaci + Temps de traitement pour réorienter + 뺨을 때리는 데 걸리는 시간 + Behandlungszeit für die Umorientierung + 患者を刺激する所要時間 + Tiempo para bofetada + Tempo de tratamento para reorientação + Hoitoaika uudelleensuuntautumiseen + Время обработки для переориентации + Behandelingstijd voor heroriëntatie + + + Vial: Etomidate + 依托咪酯 + Etomidato + Etomidát + Étomidate + Etomidat + 에토미데이트 + Etomidat + エトミデート + Etomidato + Etomidato + Etomidaatti + Этомидат + Etomidaat + + + General Anesthetic + 全身麻醉 + Anestesia generale + Obecná anestetika + Anesthésie générale + Anestetyk + 일반적인 마취제 + Allgemeines Anästhetikum + 全身麻酔 + Anestesia general + Anestésico Geral + Yleinen anestesia + Общий анестетик + Algemeen anestheticum + + + Used as a general anesthetic for surgical procedures + 用作外科手术的全身麻醉剂 + Usato come anestetico generale per procedure chirurgiche + Používá se jako obecné anestetikum pro chirurgické zákroky + Utilisé comme un anesthésique général pour les procédures chirurgicales + 수술 시 전신 마취제로 사용됩니다. + Wird als allgemeines Anästhetikum bei chirurgischen Eingriffen verwendet + 外科的処置のための全身麻酔薬として使用される + Usado como anestesia general para procedimientos quirúrgicos + Stosowany jako znieczulenie ogólne do zabiegów chirurgicznych + Usado como um anestésico geral para procedimentos cirúrgicos + Käytetään yleisanestesiana kirurgisissa toimenpiteissä + Используется в качестве общего анестетика при хирургических процедурах + Wordt gebruikt als algemeen anestheticum voor chirurgische procedures + + + Push Etomidate + 推注依托咪酯 + Iniettare Etomidato + Vstříknout etomidát + Administrer de l'étomidate + Wstrzyknij Etomidat + 에토미데이트 투여 + Verabreiche Etomidat + エトミデートを注入 + Administrar Etomidato + Injetar Etomidato + Työnnä etomidaattia + Ввести Этомидат + Injecteer Etomidaat + + + Vial: Lorazepam + 劳拉西泮 + Lorazepam + Lorazepam + Lorazépam + Lorazepam + 로라제팜 + Lorazepam + ロラゼパム + Lorazepam + Lorazepam + Loratsepaami + Лоразепам + Lorazepam + + + Sedtation medication + 镇静药物 + Farmaco sedativo + Sedativa + Médicament de sédation + Środek usypiający + 진정성 약물 + Sedierungsmittel + 鎮静薬 + Fármaco sedante + Medicamento sedativo + Rauhoittava lääkitys + Седативное средство + Sedatiemiddel + + + Used to sedate patients and prepare them for surgery + 用于镇静患者并为手术做好准备 + Usato per sedare i pazienti e prepararli per un intervento chirurgico + Používá se k uklidnění pacientů a přípravě na operaci + Utiliser pour sédater les patients et les préparer pour une opération + 환자를 진정시키고 수술 준비를 하는 데 사용됩니다. + Zur Sedierung von Patienten und zur Vorbereitung auf eine Operation + 患者を鎮静させ、手術の準備をするために使用される + Usado para sedar pacientes y preparalos para cirugía + Służy do uspokajania pacjentów i przygotowywania ich do operacji - usypia + Usado para sedar pacientes e prepará-los para a cirurgia + Käytetään potilaiden rauhoittamiseen ja valmistelemiseen leikkausta varten + Используется для успокоения пациентов и подготовки их к операции + Wordt gebruikt om patiënten te sederen en ze voor te bereiden voor een operatie + + + Push Lorazepam + 推注劳拉西泮 + Iniettare Lorazepam + Vstříknout Lorazepam + Administrer du lorazépam + Wstrzyknij Lorazepam + 로라제팜 투여 + Verabreiche Lorazepam + ロラゼパムを注入 + Administrar Lorazepam + Injetar Lorazepam + Paina loratsepaamia + Ввести Лоразепам + Injecteer Lorazepam + + + Flumazenil + 氟马西尼 + Flumazenil + Flumazenil + Flumazénil + Flumazenil + 플루마제닐 + Flumazenil + フルマゼニル + Flumazenil + Flumazenil + Flumatseniili + Флумазенил + Flumazenil + + + Counter to Lorazepam + 用于对抗劳拉西泮 + Antagonista del Lorazepam + Proti Lorazepamu + Lutte contre le lorazépam + Środek wybudzający z Lorazepamu + 로라제팜의 반대 약물 + Antagonist zu Lorazepam + ロラゼパムへの拮抗薬 + Contrarresta el Lorazepam + Antídoto para Lorazepam + Loratsepaamin vastainen + Противодействие к Лоразепаму + Antagonist van Lorazepam + + + Used to bring patients out of sedation + 用于使患者脱离镇静状态 + Usato per portare i pazienti fuori dalla sedazione + Používá se k přivedení pacientů ze sedace + Utilisé pour sortir les patients de sédation + 환자를 진정 상태에서 벗어나게 하는 데 사용됩니다. + Wird verwendet, um Patienten aus der Sedierung zu holen + 患者を鎮静状態から解放するために使用 + Usado para sacar a los pacientes de la sedación + Służy do wyprowadzania pacjentów z sedacji + Usado para tirar os pacientes da sedação + Käytetään potilaiden poistamiseen sedaatiosta + Используется для выведения пациентов из состояния комы + Wordt gebruikt om patiënten uit sedatie te halen + + + Push Flumazenil + 推注氟马西尼 + Iniettare Flumazenil + Vstříknout Flumazenil + Administrer du flumazénil + Wstrzyknij Flumazenil + 플루마제닐 투여 + Verabreiche Flumazenil + フルマゼニルを注入 + Administrar Flumazenil + Injetar Flumazenil + Paina flumatseniiliä + Ввести Флумазенил + Injecteer Flumazenil + + + Push Ketamine + 推注氯胺酮 + Aplikovat Ketamin + Iniettare Ketamina + Administrer de la kétamine + Wstrzyknij Ketaminę + 케타민 투여 + Verabreiche Ketamin + ケタミンを注入 + Administrar Ketamina + Injetar Cetamina + Paina ketamiinia + Ввести Кетамин + Injecteer Ketamine + + + Vial: Ketamine + 氯胺酮 + Ketamina + Ketamin + Kétamine + Ketamina + 케타민 + Ketamin + ケタミン + Ketamina + Cetamina + Ketamiini + Кетамин + Ketamine + + + Dissociative anesthetics, used to suppress severe pain + 解離性麻酔薬、 重度の痛みを抑えるのに使用される + Anestésico disociativo, utilizado para suprimir el dolor severo + Dissociatieve anestheticum, wordt gebruikt om ernstige pijn te onderdrukken + Anesthésiques dissociatifs, utilisés pour supprimer les douleurs sévères + Anestetici dissociativi, usati per sopprimere il dolore severo + + + Push Fentanyl + 推注芬太尼 + Aplikovat Fentanyl + Iniettare Fentanil + Administrer du fentanyl + Wstrzyknij Fentanyl + 펜타닐 투여 + Verabreiche Fentanyl + フェンタニルを注入 + Administrar Fentanilo + Injetar Fentanil + Työnnä fentanyyliä + Ввести Фентанил + Injecteer Fentanyl + + + Vial: Fentanyl + 芬太尼 + Fentanil + Fentanyl + Fentanyl + Fentanyl + 펜타닐 + Fentanyl + フェンタニル + Fentanilo + Fentanil + fentanyyli + Фентанил + Fentanyl + + + Opioid analgesic, used to suppress severe pain + Opioidowy środek przeciwbólowy, stosowany do tłumienia silnego bólu + オピオイド鎮痛薬、 重度の痛みを抑えるのに使用される + Analgésico opioide, utilizado para suprimir el dolor severo + Opïode analgeticum, wordt gebruikt om ernstige pijn te onderdrukken + Analgésique opioïde, utilisé pour supprimer les douleurs sévères + Analgesico oppioide, usato per sopprimere il dolore severo + + + Push Nalbuphine + 推注纳布啡 + Aplikovat Nalbufin + Iniettare Nalbufina (Nubain) + Administrer de la nalbuphine + Wstrzyknij Nalbufinę + 날부핀 투여 + Verabreiche Nalbuphin + ナルブフィンを注入 + Administrar Nalbufina + Injetar Nalbufina + Paina nalbufiinia + Ввести Налбуфин + Injecteer Nalbufine + + + Vial: Nalbuphine + 纳布啡 + Nalbufina (Nubain) + Nalbufin + Nalbuphine + Nalbufina + 날부핀 + Nalbuphin + ナルブフィン + Nalbufina + Nalbufina + Nalbufiini + Налбуфин + Nalbufine + + + Opioid analgesic, used to suppress moderate pain + Opioidowy środek przeciwbólowy, stosowany do tłumienia umiarkowanego bólu + オピオイド鎮痛薬、 中程度の痛みを抑えるのに使用される + Analgésico opioide, utilizado para suprimir el dolor moderador + Opïode analgeticum, wordt gebruikt om matige pijn te onderdrukken + Analgésique opioïde, utilisé pour supprimer les douleurs modérées + Analgesico oppioide, usato per sopprimere il dolore moderato + + + Maximum Reorientation Success Chance + Szansa na pomyślne ocucenie + 成功进行恢复体态的几率 + Possibilità di un riorientamento riuscito + Šance na úspěšnou reorientaci + Chance de succès de la réorientation + 뺨 때리기가 성공할 확률 + Chance für eine erfolgreiche Umorientierung + 患者を刺激した際の覚醒成功率 + Probabilidad para una reorientación exitosa + Chance de reorientação bem-sucedida + Suurin mahdollisuus uudelleenorientoitumiseen + Максимальный шанс на успех переориентации + Maximale heroriëntatie succeskans + + + Maximum Carbonate Success Chance + Szansa na pomyślne użycie soli trzeźwiących + 成功使用碳酸盐的几率 + Possibilità di utilizzare con successo il carbonato + Šance na úspěšné použití Uhličitanu + Chance de succès des Sels d'Ammoniac + 탄산암모늄 사용으로 성공할 확률 + Chance für den erfolgreichen Einsatz von Carbonat + 炭酸アンモニウムを使用した際の覚醒成功率 + Probabilidad para un uso exitoso del Carbonato + Possibilidade de uso bem-sucedido de Carbonato + Suurin karbonaatin onnistumismahdollisuus + Максимальный шанс успеха Карбоната + Maximale succeskans van carbonaat + + + Allow using Carbonate + Poziom wyszkolenia medycznego dla soli trzeźwiących + 允许使用碳酸盐 + Povolení použití Uhličitanu + Consenti di usare il Carbonato + Autoriser l'usage des Sels d'Ammoniac + 탄산암모늄 사용 허가 + Erlaube die Verwendung von Carbonat + 炭酸アンモニウムの使用を許可 + Habilitar el uso del Carbonato + Permitir o uso de Carbonato + Salli karbonaatin käyttö + Разрешить использование Карбоната + Sta gebruik van carbonaat toe + + + Treatment time for Carbonate + Czas na użycie soli trzeźwiących + 碳酸盐的治疗时间 + Doba ošetření Uhličitanem + Tempo di trattamento per il Carbonato + Temps de traitement des Sels d'Ammoniac + 탄산암모늄으로 치료하는 시간 + Anwendungszeit für Carbonat + 炭酸アンモニウムの所要時間 + Tiempo para uso del Carbonato + Tempo de uso de Carbonato + Karbonaatin käsittelyaika + Время обработки Карбонатом + Behandeltijd van carbonaat + + + Medical level required for Naloxone + Poziom wyszkolenia medycznego dla Naloksonu + 纳洛酮所需的医疗水平 + Livello medico richiesto per Naloxone + Zdravotnická úroveň potřebná pro Naloxon + Niveau médical requis pour la Naloxone + 날록손을 사용할 수 있는 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Naloxon + ナロキソンの許可 + Nivel médico requerido para la Naloxona + Nível médico exigido para administrar Naloxona + Naloksonille vaaditaan lääketieteen koulutustaso + Медицинский уровень, необходимый для использования Налоксона + Medisch niveau benodigd voor gebruik van Naloxone + + + Treatment time for Naloxone + Czas na wstrzyknięcie Naloksonu + 纳洛酮的治疗时间 + Doba léčby pro Naloxon + Tempo di trattamento per il Naloxone + Temps de traitement de la Naloxone + 날록손으로 치료하는 시간 + Anwendungszeit für Naloxon + ナロキソンの所要時間 + Tiempo para uso de la Naloxona + Tempo de uso de Naloxona + Naloksonin hoitoaika + Время обработки Налоксоном + Behandeltijd van Naloxone + + + Treatment time for Pervitin + Anwendungszeit für Pervitin + Temps de traitement de la Pervitine + ペルビチンの所要時間 + 페르피틴으로 치료하는 시간 + Tempo di trattamento per il Pervitin + Tempo de uso de Pervitin + Czas na użycie Pervitinu + Tiempo de uso de la pervitina + Doba podání Pervitinu + Pervitiinin hoitoaika + Время лечения Первитином + Behandeltijd van Pervitin + + + Medical level required for Pervitin + Erforderliches medizinischer Grad für die Gabe von Pervitin + Niveau médical requis pour la Pervitine + ペルビチンの許可 + 페르피틴을 사용하는데 필요한 의료 레벨 수준 변경 + Livello medico richiesto per il Pervitin + Nível médico exigido para administrar Pervitin + Poziom wyszkolenia medycznego dla Pervitinu + Nivel médico requerido para la Pervitina + Zdravotnická úroveň potřebná k použití Pervitinu + Pervitiini vaatii lääketieteellisen koulutustason + Медицинский уровень, необходимый для использования Первитина + Medisch niveau benodigd voor het gebruik van Pervitin + + + Medical level required for TXA + Poziom wyszkolenia medycznego dla TXA + TXA所需的医疗水平 + Livello medico richiesto per TXA + Zdravotnická úroveň potřebná pro TXA + Niveau médical requis pour l'Acide Tranexamique + TXA를 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von TXA + TXAの許可 + Nivel médico requerido para el ATX + Nível médico exigido para administrar TXA + Lääketieteellinen koulutustaso vaaditaan TXA:n käyttöön + Медицинский уровень, необходимый для TXA + Medisch niveau benodigd voor het gebruik van TXA + + + Treatment time for TXA + Czas na wstrzyknięcie TXA + TXA的治疗时间 + Tempo di trattamento per TXA + Doba léčby pro TXA + Temps de traitement de l'Acide Tranexamique + TXA로 치료하는 시간 + Anwendungszeit für TXA + TXAの所要時間 + Tiempo para uso del ATX + Tempo de uso de TXA + TXA:n hoitoaika + Время обработки для TXA + Behandeltijd van TXA + + + Medical level required for IM TXA + + + Treatment time for IM TXA + + + Medical level required for Norepinephrine + Poziom wyszkolenia medycznego dla Noradrenaliny + 去甲肾上腺素所需的医疗水平 + Zdravotnická úroveň potřebná pro Norepinefrin + Livello medico richiesto per la Norepinefrina + Niveau médical requis pour la Noradrénaline + 노르에피네프린을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Norepinephrin + ノルアドレナリンの許可 + Nivel médico requerido para la Norepinefrina + Nível médico exigido para uso de Norepinefrina + Norepinefriinin käytön edellyttämä lääketieteellinen taso + Медицинский уровень, необходимый для использования Норадреналина + Medisch niveau benodigd voor het gebruik van Noradrenaline + + + Treatment time for Norepinephrine + Czas na wstrzyknięcie Noradrenaliny + 去甲肾上腺素的治疗时间 + Doba léčby na Norepinefrin + Tempo di trattamento per la Norepinefrina + Temps de traitement de la Noradrénaline + 노르에피네프린으로 치료하는 시간 + Anwendungszeit für Norepinephrin + ノルアドレナリンの所要時間 + Tiempo para uso de la Norepinefrina + Tempo de uso de Norepinefrina + Hoitoaika norepinefriinille + Время обработки Норадреналином + Behandeltijd van Noradrenaline + + + Medical level required for Phenylephrine + Poziom wyszkolenia medycznego dla Fenylefryny + 苯肾上腺素所需的医疗水平 + Zdravotnická úroveň potřebná pro Fenylefrin + Livello medico richiesto per la Fenilefrina + Niveau médical requis pour la Phényléphrine + 페닐에프린을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Phenylephrin + フェニレフリンの許可 + Nivel médico requerido para la Fenilefrina + Nível médico exigido para uso de Fenilefrina + Lääketieteellinen taso vaaditaan fenyyliefriinille + Медицинский уровень, необходимый для использования Фенилэфрина + Medisch niveau benodigd voor het gebruik van Fenylefrine + + + Treatment time for Phenylephrine + Czas na wstrzyknięcie Fenylefryny + 苯肾上腺素的治疗时间 + Doba léčby pro Fenylefrin + Tempo di trattamento per la Fenilefrina + Temps de traitement de la Phényléphrine + 페닐에프린으로 치료하는 시간 + Anwendungszeit für Phenylephrin + フェニレフリンの所要時間 + Tiempo para uso de la Fenilefrina + Tempo de uso de Fenilefrina + Käsittelyaika fenyylille + Время обработки Фенилэфрином + Behandeltijd van Fenylefrine + + + Medical level required for Nitroglycerin + Poziom wyszkolenia medycznego dla Nitrogliceryny + 硝酸甘油所需的医疗水平 + Zdravotnická úroveň potřebná pro Nitroglycerin + Livello medico richiesto per la Nitroglicerina + Niveau médical requis pour la Nitroglycérine + 니트로글리세린을 사용하는 데 필요한 의료 레벨 수준 변경 + Anwendungszeit für Nitroglycerin + ニトログリセリンの許可 + Nivel médico requerido para la Nitroglicerina + Nível médico exigido para uso de Nitroglicerina + Nitroglyseriinille vaadittu lääketieteellinen koulutustaso + Медицинский уровень, необходимый для использования Нитроглицерина + Medisch niveau benodigd voor het gebruik van Nitroglycerine + + + Treatment time for Nitroglycerin + Czas na wstrzyknięcie Nitrogliceryny + 硝酸甘油的治疗时间 + Doba léčby Nitroglycerinu + Tempo di trattamento per la Nitroglicerina + Temps de traitement de la Nitroglycérine + 니트로글리세린으로 치료하는 시간 + Benötigter medizinischer Grad, für die Gabe von Nitroglycerin + ニトログリセリンの所要時間 + Tiempo para uso de la Nitroglicerina + Tempo de uso de Nitroglicerina + Nitroglyseriinin hoitoaika + Время обработки Нитроглицерином + Behandeltijd van Nitroglycerine + + + Medical level required for Amiodarone + Poziom wyszkolenia medycznego dla Amiodaronu + 胺碘酮所需的医疗水平 + Livello medico richiesto per Amiodarone + Zdravotnická úroveň potřebná pro Amiodaron + Niveau médical requis pour l'Amiodarone + 아미오다론을 사용하는 데 필요한 의료 레벨 수준 변경 + Anwendungszeit für Amiodaron + アミオダロンの許可 + Nivel médico requerido para la Amiodarona + Nível médico exigido para uso de Amiodarona + Amiodaronille vaadittu lääketieteellinen koulutustaso + Медицинский уровень, необходимый для использования Амиодарона + Medisch niveau benodigd voor het gebruik van Amiodaron + + + Treatment time for Amiodarone + Czas na wstrzyknięcie Amiodaronu + 胺碘酮的治疗时间 + Tempo di trattamento per Amiodarone + Doba léčby pro Amiodaron + Temps de traitement de l'Amiodarone + 아미오다론으로 치료하는 시간 + Benötigter medizinischer Grad, für die Gabe von Amiodaron + アミオダロンの所要時間 + Tiempo para uso de la Amiodarona + Tempo de uso de Amiodarona + Amiodaronin hoitoaika + Время обработки Амиодароном + Behandeltijd van Amiodaron + + + Medical level required for Alteplase + + + Treatment time for Alteplase + + + Medical level required for Lidocaine + Poziom wyszkolenia medycznego dla Lidokainy + 利多卡因所需的医疗水平 + Zdravotnická úroveň potřebná pro Lidokain + Livello medico richiesto per la Lidocaina + Niveau médical requis pour la Lidocaïne + 리도카인을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Lidocain + リドカインの許可 + Nivel médico requerido para la Lidocaína + Nível médico exigido para uso de Lidocaína + Lääketieteellinen koulutustaso vaaditaan lidokaiinin käyttöön + Медицинский уровень, необходимый для применения Лидокаина + Medisch niveau benodigd voor het gebruik van Lidocaïne + + + Treatment time for Lidocaine + Czas na wstrzyknięcie Lidokainy + 利多卡因的治疗时间 + Doba léčby na Lidokain + Tempo di trattamento per la Lidocaina + Temps de traitement de la Lidocaïne + 리도카인으로 치료하는 시간 + Anwendungszeit für Lidocain + リドカインの所要時間 + Tiempo para uso de la Lidocaína + Tempo de uso de Lidocaína + Lidokaiinin hoitoaika + Время обработки Лидокаином + Behandeltijd van Lidocaïne + + + Medical level required for IM Lidocaine + + + Treatment time for IM Lidocaine + + + Medical level required for Atropine + Poziom wyszkolenia medycznego dla Atropiny + 阿托品所需的医疗水平 + Zdravotnická úroveň potřebná pro Atropin + Livello medico richiesto per l'Atropina + Niveau médical requis pour l'Atropine + 아트로핀을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Atropin + アトロピンの許可 + Nivel médico requerido para la Atropina + Nível médico exigido para uso de Atropina + Atropiinia varten vaadittava lääketieteellinen koulutustaso + Медицинский уровень, необходимый для использования Атропина + Medisch niveau benodigd voor het gebruik van Atropine + + + Treatment time for Atropine + Czas na wstrzyknięcie Atropiny + 阿托品的治疗时间 + Doba léčby na Atropin + Tempo di trattamento per l'Atropina + Temps de traitement de l'Atropine + 아트로핀으로 치료하는 시간 + Anwendungszeit für Atropin + アトロピンの所要時間 + Tiempo para uso de la Atropina + Tempo de uso de Atropina + Atropiinin hoitoaika + Время обратки Атропином + Behandeltijd van Atropine + + + Medical level required for Atropine IV + + + Treatment time for Atropine IV + + + Medical level required for EACA + Poziom wyszkolenia medycznego dla EACA + EACA所需的医疗水平 + Livello medico richiesto per EACA + Zdravotnická úroveň potřebná pro EACA + Niveau médical requis pour l'Acide Aminocaproïque + 아미노카프로산을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Aminocapronsäure + EACAの許可 + Nivel médico requerido para el EACA + Nível médico exigido para uso de EACA + Lääketieteellinen koulutustaso vaaditaan EACA:lle + Медицинский уровень, необходимый для EACA + Medisch niveau benodigd voor het gebruik van EACA + + + Treatment time for EACA + Czas na wstrzyknięcie EACA + EACA的治疗时间 + Tempo di trattamento per EACA + Doba léčby pro EACA + Temps de traitement de l'Acide Aminocaproïque + 아미노카프로산으로 치료하는 시간 + Anwendungszeit für Aminocapronsäure + EACAの所要時間 + Tiempo para uso del EACA + Tempo de uso de EACA + Hoitoaika EACA:lle + Время обработки для EACA + Behandeltijd van EACA + + + Medical level required for Flumazenil + 氟马西尼所需的医疗水平 + Livello medico richiesto per Flumazenil + Zdravotnická úroveň potřebná pro Flumazenil + Niveau médical requis pour le Flumazénil + 플루마제닐을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Flumazenil + Poziom wyszkolenia medycznego dla Flumazenilu + フルマゼニルの許可 + Nivel médico requerido para el Flumazenil + Nível médico exigido para uso de Flumazenil + Flumatseniilin edellyttämä lääketieteellinen koulutustaso + Медицинский уровень, необходимый для использования Флумазенила + Medisch niveau benodigd voor het gebruik van Flumazenil + + + Treatment time for Flumazenil + Czas na wstrzyknięcie Flumazenilu + 氟马西尼的治疗时间 + Tempo di trattamento per Flumazenil + Doba léčby pro Flumazenil + Temps de traitement du Flumazénil + 플루마제닐로 치료하는 시간 + Anwendungszeit für Flumazenil + フルマゼニルの所要時間 + Tiempo para uso del Flumazenil + Tempo de uso de Flumazenil + Flumatseniilin hoitoaika + Время обработки Флумазенилом + Behandeltijd van Flumazenil + + + Medical level required for Lorazepam + 劳拉西泮所需的医疗水平 + Livello medico richiesto per Lorazepam + Zdravotnická úroveň potřebná pro Lorazepam + Niveau médical requis pour le Lorazépam + 로라제팜을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Lorazepam + Poziom wyszkolenia medycznego dla Lorazepamu + ロラゼパムの許可 + Nivel médico requerido para el Lorazepam + Nível médico exigido para uso de Lorazepam + Lääketieteellinen koulutustaso vaaditaan loratsepaamia varten + Медицинский уровень, необходимый для применения Лоразепама + Medisch niveau benodigd voor het gebruik van Lorazepam + + + Treatment time for Lorazepam + Czas na wstrzyknięcie Lorazepamu + 劳拉西泮的治疗时间 + Tempo di trattamento per Lorazepam + Doba léčby pro Lorazepam + Temps de traitement du Lorazépam + 로라제팜으로 치료하는 시간 + Anwendungszeit für Lorazepam + ロラゼパムの所要時間 + Tiempo para uso del Lorazepam + Tempo de uso de Lorazepam + Loratsepaamin hoitoaika + Время обработки Лоразепамом + Behandeltijd van Lorazepam + + + Medical level required for Etomidate + 依托咪酯所需的医疗水平 + Livello medico richiesto per Etomidato + Zdravotnická úroveň potřebná pro Etomidát + Niveau médical requis pour l'Étomidate + 에토미데이트를 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Etomidat + Poziom wyszkolenia medycznego dla Etomidatu + エトミデートの許可 + Nivel médico requerido para el Etomidato + Nível médico exigido para uso de Etomidato + Etomidaatille vaadittava lääketieteellisen hoidon taso + Медицинский уровень, необходимый для применения Этомидата + Medisch niveau benodigd voor het gebruik van Etomidaat + + + Treatment time for Etomidate + Czas na wstrzyknięcie Etomidatu + 依托咪酯的治疗时间 + Tempo di trattamento per Etomidato + Doba léčby pro Etomidát + Temps de traitement de l'Étomidate + 에토미데이트로 치료하는 시간 + Anwendungszeit für Etomidat + エトミデートの所要時間 + Tiempo para uso del Etomidato + Tempo de uso de Etomidato + Etomidatin hoitoaika + Время обработки Этомидатом + Behandeltijd van Etomidaat + + + Medical level required for Ketamine + Poziom wyszkolenia medycznego dla Ketaminy + 氯胺酮所需的医疗水平 + Lékařská úroveň potřebná pro Ketamin + Livello medico richiesto per la Ketamina + Niveau médical requis pour la Kétamine + 케타민을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Ketamin + ケタミンの許可 + Nivel médico requerido para la Ketamina + Nível médico exigido para uso de Cetamina + Lääketieteellinen koulutustaso vaaditaan ketamiinille + Медицинский уровень, необходимый для использования Кетамина + Medisch niveau benodigd voor het gebruik van Ketamine + + + Treatment time for Ketamine + Czas na wstrzyknięcie Ketaminy + 氯胺酮的治疗时间 + Doba léčby pro Ketamin + Tempo di trattamento per la Ketamina + Temps de traitement de la Kétamine + 케타민으로 치료하는 시간 + Anwendungszeit für Ketamin + ケタミンの所要時間 + Tiempo para uso de la Ketamina + Tempo de uso de Cetamina + Ketamiinin hoitoaika + Время обработки Кетамином + Behandeltijd van Ketamine + + + Medical level required for IM Ketamine + + + Treatment time for IM Ketamine + + + Medical level required for Fentanyl + Poziom wyszkolenia medycznego dla Fentanylu + 芬太尼所需的医疗水平 + Livello medico richiesto per Fentanil + Zdravotnická úroveň potřebná pro Fentanyl + Niveau médical requis pour le Fentanyl + 펜타닐을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Fentanyl + フェンタニルの許可 + Nivel médico requerido para el Fentalino + Nível médico exigido para uso de Fentanil + Fentanyylille vaadittu lääketieteellinen koulutustaso + Медицинский уровень, необходимый для использования Фентанила + Medisch niveau benodigd voor het gebruik van Fentanyl + + + Treatment time for Fentanyl + Czas na wstrzyknięcie Fentanylu + 芬太尼的治疗时间 + Tempo di trattamento per Fentanil + Doba léčby pro Fentanyl + Temps de traitement du Fentanyl + 펜타닐로 치료하는 시간 + Anwendungszeit für Fentanyl + フェンタニルの所要時間 + Tiempo para uso del Fentalino + Tempo de uso de Fentanil + Fentanyylin hoitoaika + Время обработки Фентанилом + Behandeltijd van Fentanyl + + + Medical level required for IM Fentanyl + + + Treatment time for IM Fentanyl + + + Medical level required for Nalbuphine + Poziom wyszkolenia medycznego dla Nalbuphinu + 纳布啡所需的医疗水平 + Zdravotnická úroveň potřebná pro Nalbufin + Livello medico richiesto per Nalbufina (nubain) + Niveau médical requis pour la Nalbuphine + 날부핀을 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Gabe von Nalbuphin + ナルブフィンの許可 + Nivel médico requerido para la Nalbufina + Nível médico exigido para uso de Nalbufina + Lääketieteellinen koulutustaso vaaditaan nalbufiinille + Медицинский уровень, необходимый для использования Налбуфина + Medisch niveau benodigd voor het gebruik van Nalbufine + + + Treatment time for Nalbuphine + Czas na wstrzyknięcie Nalbuphinu + 纳布啡的治疗时间 + Doba léčby pro Nalbufin + Tempo di trattamento per Nalbufina (nubain) + Temps de traitement de la Nalbuphine + 날부핀으로 치료하는 시간 + Anwendungszeit für Nalbuphin + ナルブフィンの所要時間 + Tiempo para uso de la Nalbufina + Tempo de uso de Nalbufina + Nalbufiinin hoitoaika + Время обработки Налбуфином + Behandeltijd van Nalbufine + + + Medical level required for IM Nalbuphine + + + Treatment time for IM Nalbuphine + + + Medical level required for Penthrox Inhaler + ペンスロックス吸入器の許可 + Niveau médical requis pour l'inhalateur de Penthrox + 펜트록스를 사용하는 데 필요한 의료 레벨 수준 변경 + Benötigter medizinischer Grad, für die Verwendung des Penthrox-Inhalators + Nível médico exigido para uso do Inalador de Penthrox + Nivel médico requerido para el Penthrox + Lääketieteellinen koulutustaso vaatii penthrox-inhalaattorin + Медицинский уровень, необходимый для использования ингалятора Пентрокс + Medisch niveau benodigd voor het gebruik van Penthrox inhalators + Livello medico richiesto per l'inalatore Penthrox + + + Treatment time for Penthrox Inhaler + ペンスロックス吸入器の所要時間 + Durée d'utilisation de l'inhalateur de Penthrox + 펜트록스로 치료하는 시간 + Behandlungszeit für den Penthrox-Inhalators + Tempo de uso do Inalador de Penthrox + Tiempo de tratamiento para el Penthrox + Penthrox-inhalaattorin hoitoaika + Время обработки ингалятором Пентрокс + Behandeltijd van Penthrox inhalators + Tempo di trattamento per l'inalatore Penthrox + + + Basic Settings + Podstawowe Ustawienia + 基础设置 + Impostazioni di base + Základní nastavení + Paramètres basiques + 일반 설정 + Grundeinstellungen + 基本設定 + Parámetros básicos + Configurações básicas + Perus asetukset + Основные настройки + Basis instellingen + + + IV Settings + Ustawienia IV + IV设置 + Impostazioni IV + IV Nastavení + Paramètres des IV + IV 설정 + IV Einstellungen + IV 設定 + Parámetros de la IV + Configurações de IV + IV asetukset + Настройки IV + IV instellingen + + + CWMP Settings + Paramètres CWMP + Impostazioni CWMP + CWMP Einstellungen + 戦闘傷病治療薬(CWMP)設定 + + + IO Settings + Ustawienia IO + IO设置 + Impostazioni IO + Nastavení IO + Paramètres des IO + IO 설정 + IO Einstellungen + IO 設定 + Parámetros de la IO + Configurações de IO + IO-asetukset + Настройки IO + IO instellingen + + + Reorientation Settings + Ustawienia Cucenia + 刺激患者设置 + Impostazioni di riorientamento + Nastavení reorientace + Paramètres de la réorientation + 뺨 때리기 설정 + Umorientierungs-Einstellungen + 患者を刺激する機能設定 + Parámetros de la reorientación + Configurações de reorientação + Uudelleensuuntausasetukset + Настройки переориентации + Heroriëntatie instellingen + + + Carbonate Settings + Ustawienia Soli Trzeźwiących + 碳酸盐设置 + Nastavení Uhličitanu + Impostazioni del Carbonato d'ammonio + Paramètres des Sels d'Ammoniac + 탄산암모늄 설정 + Carbonat Einstellungen + 炭酸アンモニウム設定 + Parámetros del Carbonato + Configurações de Carbonato + Karbonaattiasetukset + Настройки Карбоната + Carbonaat instellingen + + + Naloxone Settings + Ustawienia Naloksonu + 纳洛酮设置 + Nastavení Naloxonu + Impostazioni del Naloxone + Paramètres de la Naloxone + 날록손 설정 + Naloxon Einstellungen + ナロキソン設定 + Parámetros de la Naloxona + Configurações de Naloxona + Naloksonin asetukset + Настройки Налоксона + Naloxone instellingen + + + Pervitin Settings + Pervitin Einstellungen + Paramètres de la Pervitine + ペルビチンの設定 + 페르피틴 설정 + Impostazioni del Pervitin + Configurações do Pervitin + Ustawienia Pervitinu + Parámetros de la Pervitina + Nastavení Pervitinu + Pervitiinin asetukset + Настройки Перфитина + Pervitin instellingen + + + Caffeine Settings + Koffein Einstellungen + Paramètres de la Caféine + カフェイン設定 + 카페인 설정 + Impostazioni della Caffeina + Configurações de Cafeína + Ustawienia Kofeiny + Parámetros de la Cafeina + Nastavení Kofeinu + Kofeiiniasetukset + Настройки Кофеина + Caffeïne instellingen + + + TXA Settings + Ustawienia TXA + 血栓素设置 + Impostazioni del TXA + Nastavení TXA + Paramètres de l'Acide Tranexamique + TXA 설정 + TXA Einstellungen + TXA設定 + Parámetros del ATX + Configurações de TXA + TXA-asetukset + Настройки TXA + TXA instellingen + + + Norepinephrine Settings + Ustawienia Noradrenaliny + 去甲肾上腺素设置 + Nastavení Norepinefrinu + Impostazioni della Norepinefrina + Paramètres de la Noradrénaline + 노르에피네프린 설정 + Norepinephrin Einstellungen + ノルアドレナリン設定 + Parámetros de la Norepinefrina + Configurações de Norepinefrina + Norepinefriinin asetukset + Настройки Нореадреналин + Noradrenaline instellingen + + + Phenylephrine Settings + Ustawienia Fenylefryny + 苯肾上腺素设置 + Nastavení Fenylefrinu + Impostazioni della Fenilefrina + Paramètres de la Phényléphrine + 페닐에프린 설정 + Phenylephrin Einstellungen + フェニレフリン設定 + Parámetros de la Fenilefrina + Configurações de Fenilefrina + Fenyyliefriinin asetukset + Настройки Фенилэфрина + Fenylefrine instellingen + + + Nitroglycerin Settings + Ustawienia Nitrogliceryny + 硝酸甘油设置 + Nastavení Nitroglycerinu + Impostazioni della Nitroglicerina + Paramètres de la Nitroglynérine + 니트로글리세린 설정 + Nitroglycerin Einstellungen + ニトログリセリン設定 + Parámetros de la Nitroglicerina + Configurações de Nitroglicerina + Nitroglyseriiniasetukset + Настройки Нитроглицерина + Nitroglycerine instellingen + + + Amiodarone Settings + Ustawienia Amiodarone + 胺碘酮设置 + Nastavení Amiodaronu + Impostazion dell'Amiodarone + Paramètres de l'Amiodarone + 아미오다론 설정 + Amiodaron Einstellungen + アミオダロン設定 + Parámetros de la Amiodarona + Configurações de Amiodarona + Amiodaronin asetukset + Настройки Амиодарона + Amiodaron instellingen + + + Alteplase Settings + + + Lidocaine Settings + Ustawienia Lidokainy + 利多卡因设置 + Nastavení Lidokainu + Impostazioni della Lidocaina + Paramètres de la Lidocaine + 리도카인 설정 + Lidocain Einstellungen + リドカイン設定 + Parámetros de la Lidocaína + Configurações de Lidocaína + Lidokaiiniasetukset + Настройки Лидокаина + Lidocaïne instellingen + + + Atropine Settings + Ustawienia Atropiny + 阿托品设置 + Nastavení Atropinu + Impostazioni dell'Atropina + Paramètres de l'Atropine + 아트로핀 설정 + Atropin Einstellungen + アトロピン設定 + Parámetros de la Atropina + Configurações de Atropina + Atropiiniasetukset + Настройки Атропина + Atropine instellingen + + + EACA Settings + Ustawienia EACA + EACA设置 + Impostazioni EACA + Nastavení EACA + Paramètres de l'Acide Aminocaproïque + 아미노카프로산 설정 + Aminocapronsäure Einstellungen + EACA設定 + Parámetros del EACA + Configurações de EACA + EACA-asetukset + Настройки EACA + EACA instellingen + + + Ketamine Settings + Ustawienia Ketaminy + 氯胺酮设置 + Nastavení Ketaminu + Impostazioni della Ketamina + Paramètres de la Kétamine + 케타민 설정 + Ketamin Einstellungen + ケタミン設定 + Parámetros de la Ketamina + Configurações de Cetamina + Ketamiinin asetukset + Настройки Кетамина + Ketamine instellingen + + + Fentanyl Settings + Ustawienia Fentanylu + 芬太尼设置 + Impostazioni del fentanil + Nastavení Fentanylu + Paramètres du Fentanyl + 펜타닐 설정 + Fentanyl Einstellungen + フェンタニル設定 + Parámetros del Fentalino + Configurações de Fentanil + Fentanyyliasetukset + Настройки Фентанила + Fentanyl instellingen + + + Nalbuphine Settings + Ustawienia Nalbuphinu + 纳布啡设置 + Nastavení Nalbufinu + Impostazione della Nalbufina (Nubain) + Paramètres de la Nalbuphine + 날부핀 설정 + Nalbuphin Einstellungen + ナルブフィン設定 + Parámetros de la Nalbufina + Configurações de Nalbufina + Nalbuphine-asetukset + Настройки Налбуфина + Nalbufine instellingen + + + Flumazenil Settings + Ustawienia Flumazenilu + 氟马西尼设置 + Nastavení Flumazenilu + Impostazioni del Flumazenil + Paramètres du Flumazénil + 플루마제닐 설정 + Flumazenil Einstellungen + フルマゼニル設定 + Parámetros del Flumazenil + Configurações de Flumazenil + Flumazenilin asetukset + Настройки Флумазенила + Flumazenil instellingen + + + Lorazepam Settings + Ustawienia Lorazepamu + 劳拉西泮设置 + Nastavení Lorazepamu + Impostazioni del Lorazepam + Paramètres du Lorazépam + 로라제팜 설정 + Lorazepam Einstellungen + ロラゼパム設定 + Parámetros del Lorazepam + Configurações de Lorazepam + Loratsepamin asetukset + Настройки Лоразепама + Lorazepam instellingen + + + Etomidate Settings + Ustawienia Etomidatu + 依托咪酯设置 + Nastavení Etomidátu + Impostazioni del Etomidato + Paramètres de l'Étomidate + 에토미데이트 설정 + Etomidat Einstellungen + エトミデート設定 + Parámetros del Etomidato + Configurações de Etomidato + Etomidatin asetukset + Настройки Этомидата + Etomidaat instellingen + + + Penthrox Inhaler Settings + ペンスロックス吸入器設定 + Paramètres de l'inhalateur de Penthrox + 펜트록스 흡입기 설정 + Penthrox Einstellungen + Configurações do Inalador de Penthrox + Configuracion del inhalador Penthrox + Penthrox-inhalaattorin asetukset + Настройки ингалятора Пентрокс + Penthrox inhalator instellingen + Impostazioni dell'inalatore Penthrox + + + %1 performed a saline flush + %1 provedl výplach fyziologickým roztokem + %1 a effectué le rinçage salin + %1 realizó un enjuague con salino + %1 ha eseguito un lavaggio salino + %1 realizou uma lavagem salina + %1 провел промывание физиологическим раствором + %1 hat eine Kochsalzlösungsspülung durchgeführt + %1이(가) 식염수 주입을 수행했다 + %1 が生理食塩液フラッシュを実施 + %1 進行了鹽水沖洗 + %1 进行了盐水冲洗 + %1 suoritti suolaliuoksen huuhtelun + %1 voerde een salinespoeling uit + + + Patient's IV is blocked + La IV del paziente è ostruita/bloccata + IV pacienta je blokována + L'IV du patient est bloquée + IV jest zablokowane + 환자의 IV가 막힘 + Die IV des Patienten ist blockiert + 患者的IV受到阻塞 + 患者のIVは閉塞している + La IV del paciente esta bloqueada + IV do paciente está bloqueado + Potilaan IV on tukossa + Капельница пациента заблокирована + Patiënt's IV is geblokkeerd + + + Patient's IV is clear + La IV del paziente è pulita + IV pacienta je čistá + L'IV du patient est dégagée + IV jest drożne + 환자의 IV가 정상 + Die IV des Patienten ist durchgängig + 患者的IV是干净的 + 患者のIVはクリアです + La IV del paciente esta funcionando correctamente + IV do paciente está funcionando corretamente + Potilaan IV on selvä + Капельница пациента чиста + Patiënt's IV is niet geblokkeerd + + + Enable Ph/ Calcium effects + + + Enables Ph and Calcium loops, requiring management of saline and blood products + + + IV Block Chance + Possibilità di ostruzione della IV + IV blok šance + Chance de blocage des IV + IV 막힘 확률 + Chance des IVs zu blockieren + IV 阻塞几率 + IV閉塞の確率 + Probabilidad del bloquéo de IV + Szansa na zablokowanie IV + Chance de Bloqueio IV + Mahdollisuus estää IV:t + Шанс закупорить капельницу + IV blokkade kans + + + Chance of IV blockage due to medication pushes without saline flush + Šance na blokaci IV v důsledku aplikování léčiv bez proplachování fyziologickým roztokem. + Possibilità di ostruzione della IV senza prima aver svolto uno sciacquo salino + Chance de blocage des IV dû à une administration intra-veineuse de médicaments sans rinçage à la solution saline + 식염수 주입 없이 약물 투여로 인한 IV 막힘 확률 + Möglichkeit einer Blockade der IV durch Medikamentengabe ohne Kochsalzspülung + 由于没有盐水协助的药物注射导致 IV 阻塞的机会 + 生理食塩水を流さずに薬を注入することによるIV閉塞の可能性 + Probabilidad de que una IV se bloquée por administrar fármacos sin enjuagar con salino + Szansa na zablokowanie IV z powodu podawania leków bez przepłukiwania roztworem soli fizjologicznej + Probabilidade de bloqueio intravenoso devido a injeções de medicamentos sem solução salina + IV-tukoksen mahdollisuus lääkityksen painamisesta ilman suolaliuosta + Вероятность закупорки капельницы из-за введения лекарств без промывания физиологическим раствором + Kans voor blokkade van IV's door medicaties zonder salinespoeling + + + Maximum Fluid Bag Stack + Maximální počet vaků s tekutinou + Stack massimo della sacca per fluidi + Empilement maximal de poches de fluide + 최대 액체 가방 양 + Maximaler Flüssigkeitsbeutelstapel + 注射液堆叠上限 + 輸液袋の最大スタック数 + Máxima cantidad de bolsas de fluidos simultaneas + Maksymalna ilość worków z płynami dla jednego pajenta + Pilha Máxima de Sacos de Fluidos + Suurin nestepussipino + Максимальный объем пакета с жидкостью + Maximale vloeistofzak stapel + + + The maximum amount of fluid bags that can be stacked to increase IV flow rate + La quantità massima di sacche per fluidi che possono essere accorpate per aumentare la portata (flow rate) della IV + Maximální množství vaků s tekutinou, které lze zavést pacientovi za účelem zrychlení průtoku skrze IV. + Le nombre maximal de poches de fluide pouvant être empilées pour augmenter le débit IV + IV 주입량을 증가시키기 위해 쌓을 수 있는 최대 액체 가방의 양 + Die maximale Anzahl von Flüssigkeitsbeuteln, die gestapelt werden können, um die Durchflussrate der Infusion zu erhöhen + 可堆叠的最大液体袋量以增加 IV 流速 + IV流量を増やすために積み重ねることができる輸液袋の最大数 + La cantidad máxima de bolsas de fluido que se pueden apilar para aumentar el flujo de IV + Maksymalna ilość worków z płynem, które można przypiąć w tym samym momencie, aby zwiększyć szybkość przepływu IV + A quantidade máxima de bolsas de fluido que podem ser empilhadas para aumentar a taxa de fluxo IV + Suurin määrä nestepusseja, jotka voidaan pinota IV-virtausnopeuden lisäämiseksi + Максимальное количество пакетов с жидкостью, которое можно сложить в стопку для увеличения скорости внутривенного вливания + De maximale hoeveelheid vloeistofzakken die gestapeld kunnen worden om de IV vloeisnelheid te verhogen + + + Enable Coagulation + 血液凝固を有効化 + Abilita sistema di coagulazione + Włącz krzepnięcie + Povolit Koagulaci + Gerinnung + Activer la coagulation + 혈응고 활성화 + Ativar Coagulação + Habilitar coagulación + Ota koagulaatio käyttöön + Включить Коагуляцию + Schakel coagulatie in + + + Enables advanced coagulation features and modifies TXA and EACA behaviour accordingly. + 高度な血液凝固機能を有効にし、それに応じて TXA と EACA の動作を変更します。 + Abilita la coagulazione avanzata e modifica di conseguenza il comportamento di TXA e EACA. + Włącza zaawansowane funkcje krzepnięcia oraz odpowiednie modyfikacje zachowania TXA i EACA. + Povolí funkci pokročilé koagulace (srážlivost) krve a modifikuje chování TXA a EACA. + Aktiviert erweiterte Gerinnung und modifiziert das verhalten von TXA & EACA (E-Aminocapronsäure) entsprechend. + Active la coagulation avancée et modifie l'effet de l'Acide Tranexamique et de l'Acide Aminocaproïque en conséquence + 고급 혈응고 기능을 활성화하고 그에 따라 TXA 및 아미노카프로산의 동작을 수정합니다. + Habilita recursos avançados de coagulação e modifica o comportamento de TXA e EACA de acordo. + Habilita la coagulación avanzada, modificando los efectos del ATX y del EACA. + Ottaa käyttöön edistyneet koagulaatioominaisuudet ja muuttaa TXA- ja EACA-käyttäytymistä vastaavasti + Включает расширенные функции коагуляции и соответствующим образом изменяет поведение TXA и EACA. + Schakelt geadvanceerde coagulatie functies in, en veranderd het gedrag van TXA en EACA naar behoren + + + Vial: EACA + EACA (Acido aminocaproico Epsilon) + EACA + Acide aminocaproïque + 아미노카프로산 + E-Aminocapronsäure + EACA + EACA + E-アミノカプロン酸 (EACA) + EACA + EACA + EACA + EACA + EACA + + + Push EACA + Aplikovat EACA + Iniettare EACA + Administrer de l'Acide aminocaproïque + 아미노카프로산 투여 + Verabreiche Aminocapronsäure + 推注EACA + Wstrzyknij EACA + E-アミノカプロン酸 (EACA)を注入 + Administrar EACA + Injetar EACA + Paina EACA + Ввести EACA + Injecteer EACA + + + Pervitin capsule + Pervitin Kapsel + Capsule de pervitine + ペルビチンカプセル + 페르피틴 알약 + Capsula di Pervitin + Cápsula de Pervitin + Pervitin + Capsula de pervitina + Pervitinová kapsle + Pervitiini kapseli + Капсула Первитина + Pervitin capsule + + + Performance enhancing drug, used to suppress moderate pain + 疲労の防止と回復に! 疲労をポンと取ってくれます。 中程度の鎮痛作用がある。 + Środek zwiększający wydolność, stosowany do tłumienia umiarkowanego bólu + Fármaco para mejorar el rendimiento, utilizado para suprimir el dolor moderado + Prestatieverhogend medicijn, wordt gebruikt om matige pijn te onderdrukken + Drogue améliorant les performances, utilisée pour supprimer les douleurs modérées + Farmaco migliorante le prestazioni, utilizzato per sopprimere il dolore moderato + + + Take Pervitin + 使用 柏飞丁 + Pervitin einnehmen + Prendre la pervitine + ペルビチンを服用する + 페르피틴 복용 + Assumi Pervitin + Administrar Pervitin + Użyj Pervitin + Tomar Pervitina + Vzít si Pervitin + Ota pervitiini + Принять Первитин + Neem Pervitin + + + The pervitin makes you feel awake and full of endless POWER + Das Pervitin macht dich wach und du fühlst dich durchflutet mit unendlich POWER + La pervitine vous fait vous sentir éveillé et plein d'une puissance INFINIE + 페르피틴이 당신을 깨어있게 하고 끝없는 빠와로 가득 차게 합니다 + ペルビチンはあなたを覚醒させ、無限のチカラに満ち満ちた気分にしている! + Il Pervitin ti fa sembrare più attento e dotato di una forza senza uguali + O Pervitin faz você se sentir acordado e cheio de poder INFINITO + Pervitin sprawia, że czujesz się pobudzony i pełny ENERGII + La pervitina hace que te sientas despierto y con una capacidad infinita de ENERGIA + Díky pervitinu se cítíš bdělý a plný nekonečné SÍLY + Pervitiini saa sinut tuntemaan olosi hereille ja täynnä loputonta VOIMAA + Первитин заставляет вас чувствовать себя бодрым и полным бесконечной СИЛЫ + De Pervitin geeft je een wakker gevoel vol met oneinde ENERGIE + + + You begin to lose your breath... + Deine Kraft lässt langsam nach... + Vous commencez à perdre votre souffle... + 숨을 쉬기 힘들어진다... + あなたは急に息苦しさを感じはじめた... + Stai iniziando a perdere fiato... + Você começa a perder o fôlego... + Zaczynasz czuć zadyszkę... + Empiezas a perder el aliento + Ztrácíš dech... + Alkaa menettää hengitystä... + У тебя начинает перехватывать дыхание... + Je begint je adem te verliezen... + + + You gain a sudden rush! + Du bekommst einen spontanen Rush... + Vous sentez un élan soudain ! + 갑자기 심하게 두근거린다! + あなたを突如激しい動悸が襲う! + Ottieni una corsa improvvisa! + Você sente uma ânimo repentino! + Zyskujesz nagły skok energii! + ¡Te entra un subidon repentino! + Dostal jsi se do rauše! + Saat äkillisen kiireen! + Ты получаешь внезапный прилив сил! + Je krijgt een spontane boost! + + + You gain another rush! + Du bekommst einen weiteren Rush... + Vous sentez un autre élan ! + 두근거림이 더 격렬해진다! + 動悸は激しさを増してゆく! + Ottieni un'altra corsa improvvisa! + Você sente um ânimo novamente! + Zyskujesz nagły skok energii! + ¡Te entra otro subidon! + Dostal jsi se do dalšího rauše! + Saat uuden kiireen! + Ты получаешь еще один прилив сил! + Je krijgt nog een boost! + + + The exhaustion starts to settle in... + Die Erschöpfung macht sich breit ... + L'épuisement commence à se faire sentir... + 두근거림이 가라앉으려 한다... + 動悸が落ち着き始めた... + La stanchezza inizia a farsi sentire... + Você começa a sentir a exaustão... + Zmęczenie zaczyna narastać... + El agotamiento comienza a sentirse... + Začíná se projevovat vyčerpání... + Väsymys alkaa laskeutua... + Усталость начинает наваливаться на меня... + Je begint in te zakken + + + You start to feel normal again + Du beginnst dich wieder normal zu fühlen. + Vous commencez à vous sentir à nouveau normal + 몸이 다시 원상태로 돌아오기 시작한다 + 身体は元の落ち着きを取り戻した + Inizi a sentirti di nuovo normale + Você começa a se sentir normal novamente + Zaczynasz czuć się normalnie + Comienzas a sentirte bien de nuevo + Opět se začínáš cítit normálně + Alkaa taas tuntua normaalilta + Ты снова начинаешь чувствовать себя нормально + Je begint je weer normaal te voelen + + + You start to see everything twice. + Du siehst alles doppelt. + Vous commencez à voir tout en double + 모든 게 두 개로 보이기 시작한다. + 全てが二重に見える。 + Inizi a vedere tutto due volte. + Você começa a ver em dobro. + Zaczynasz widzieć podwójnie + Empiezas a ver todo doble + Začínáš vše vidět dvojitě + Alat nähdä kaiken kahdesti. + Ты начинаешь видеть все дважды. + Je begint met alles dubbelzien + + + You start to twitch... + Du fängst an zu zucken... + Vous commencez à trembler... + 경련이 멈추지 않는다... + 身体の震えが止まらなくなった... + Inizi a tremare... + Você começa a tremer na base... + Zaczynasz drżeć + Comienzas a temblar + Začínáš sebou škubat... + Alkaa nykimään + Ты начинаешь дергаться... + Je begint te trillen + + + KAT - ADV Medical: Pharmacy + KAM - 薬学 (Pharmacy) + KAT - ADV Medical : Pharmacie + KAT - ADV Medical: Medikamente + KAT - ADV Medica: Farmaceutica + + + Your head starts to clear up and you stop twitching... + Dein Kopf wird klarer und du hörst auf zu zucken... + Vos idées commencent à s'éclaircir et vous arrêtez de trembler... + 정신이 맑아지기 시작하고 경련이 멈추었다... + 震えがおさまり、頭がすっきりしてきた + La tua testa inizia a schiarirsi e smetti di tremare... + Sua cabeça começa a clarear e você pára de tremer... + Twoja głowa zaczyna się oczyszczać i przestajesz drżeć... + Empiezas a tener la cabeza despejada y dejas de temblar + Začíná se ti vyjasňovat a přestáváš sebou škubat... + Pääsi alkaa selkiytyä ja lopetat nykimisen + Твоя голова начинает проясняться, и ты перестаешь дергаться... + Je hoofd begint zich op te helderen, en je stopt met trillen + + + Caffeine bottle + Koffein Kapsel + Bouteille de caféine + カフェインボトル + 카페인 병 + Bottiglia di Caffeina + Garrafa de Cafeína + Kofeina + Bote de cafeina + Kofeinová lahev + Kofeiinipullo + Бутылка с Кофеином + Caffeïne doosje + + + Stimulates the central nervous system and energizes + 中枢神経を刺激し、活力を与える + Stymuluje centralny układ nerwowy i dodaje energii + Estimula el sistema nervioso central y aporta energía. + Stimuleert het centraal zenuwstelsel en geeft energie + Stimule le système nerveux central et revitalise + Stimola il sistema nervoso centrale e aumenta l'energia + + + Take Caffeine + 服用 咖啡因 + Koffein einnehmen + Prendre la caféine + カフェインを服用する + 카페인 복용 + Assumi Caffeina + Administrar Cafeína + Użyj kofeinę + Tomar cafeina + Dát si Kofein + Ota kofeiinia + Выпить Кофеин + Neem Caffeïne + + + Encourages clot formation + Podporuje tvorbu sraženin + Favorisce la formazione di coaguli + Favorise la formation de caillots + 혈전 형성을 촉진합니다. + Fördert die Gerinnungsbildung + 促进凝块形成 + Wspomaga powstawanie skrzepów + 血液凝固を促進し、出血を抑えます + Favorece la coagulación + Intensifica a coagulação + Edistää hyytymien muodostumista + Способствует образованию тромбов + Bevorderd bloedstolling + + + Inspect Catheter + Ispeziona il catetere + Zkontrolovat katetr + Inspecter le cathéter + Sprawdź IV + 카테터 검사 + Katheter untersuchen + 检查导管 + カテーテルを検査する + Inspeccionar Catéter + Inspecionar cateter + Tarkista katetri + Осмотрите катетер + Inspecteer canule + + + Saline Flush + Vypláchnutí fyziologickým roztokem + Risciaquo acqua salina + Rinçage à la solution saline + Płukanie solą fizjologiczną + 식염수 주입 + Kochsalzspülung + 用生理盐水冲洗 + 生理食塩水フラッシュ + Enjuague con salino + Lavagem salina + suolainen flunssa + Промывание физиологическим раствором + Salinespoeling + + + IV Check limb damage + IV Controllare il danno agli arti + IV Kontrola poškození končetin + Vérification des dégâts du membre pour l'IV + IV로 사지 손상 검사 + IV Gliedmaßenschäden prüfen + IV 检查肢体损伤 + IVの四肢損傷の確認 + Permitir inserción de IV en extremidad dañada + Sprawdzanie obrażeń kończyn do IV + Verificação dos danos ao membro para o IV + IV tarkista raajan vauriot + Проверьте повреждение IV + IV checkt voor ledemaatschade + + + Whether or not you can apply the IV to the too damaged limb. In default, this is disabled. + Puoi o no applicare la flebo all'arto troppo danneggiato. Nel default, questo è disabilitato. + Zda můžete aplikovat IV na příliš poškozenou končetinu. Ve výchozím nastavení je toto zakázáno. + Définie si vous pouvez ou non appliquer une IV sur un membre trop endommagé. Par défaut, ce réglage est désactivé. + 심하게 손상된 사지에 IV를 꽂을 수 있는지의 여부. 기본값은 비활성화입니다. + Ob die IV an der zu stark beschädigten Gliedmaße angewendet werden kann oder nicht. In der Standardeinstellung ist dies deaktiviert. + 是否可以将 IV 应用于受损的肢体。 默认情况下,这是禁用的。 + あまりにも損傷した手足に点滴を適用できるかどうか。 デフォルトでは無効。 + Si se puede o no aplicar una IV en extramidades demasiado dañadas. En predeterminado, esto esta desactivado. + Czy można zastosować IV na zbyt uszkodzoną kończynę. Domyślnie jest to wyłączone. + Se você pode ou não aplicar o IV ao membro muito danificado. Por padrão, isto é desativado. + Voitko laittaa IV vaurioituneeseen raajaan vai et. Tämä on oletuksena pois käytöstä. + Независимо от того, можете ли вы применить капельницу. По умолчанию это отключено. + Of je wel of niet een IV kan plaatsen op een te beschadigd ledemaat. standaard staat dit uit. + + + Perform Dialysis + Przeprowadź Dializę + 透析を行う + Esegui Dialisi + Provést dialýzu + Dialyse durchführen + Effectuer une dialyse + 투석 수행 + Realizar Diálise + Efectuar dialisis + Suorita dialyysi + Провести Диализ + Voer dialyse uit + + + Performing + Dializa w toku... + 実施中 + Eseguendo + Provádění dialýzy + Durchführung + Dialyse en cours + 수행 중 + Realizando + Efectuando + esiintymässä + Провожу + Wordt uitgevoerd + + + %1 performed dialysis + %1 进行了透析 + %1 ha eseguito la dialisi + %1 przeprowadził dializę + %1 provedl dialýzu + %1 a effectué une dialyse + %1 이(가) 투석을 수행했습니다 + %1 hat eine Dialyse durchgeführt + %1 が透析を行った + %1 realizó una dialisis + %1 realizou diálise + %1 suoritettu dialyysi + %1 провел диализ + %1 heeft een dialyse uitgevoerd + + + %1 Started dialysis + + + Finished dialysis + + + Dialysis Failed + + + [KAM] Medicines crate + [KAM] Skrzynia z lekami + [KAM] Bedna s medikamenty + [KAM] Medikamentenkiste + [KAT] Cassa medicinali + [KAM] 医薬品箱 + [KAM] Caisse de médicaments + [KAM] 의약품 상자 + [KAM] Caixa de medicamentos + [KAM] Caja de medicina + [KAM] Lääkelaatikko + [КАМ] Ящик с лекарствами + [KAM] Medijnenkrat + + + Medication Modifies Stamina + 약물이 스태미나를 조절합니다 + 薬品によるスタミナの変化 + Medikamente beeinflussen die Ausdauer + Les médicaments modifient l'endurance + Medicamentos afetam a Stamina + Medicación modifica la resistencia + Lääkitys muuttaa kestävyyttä + Лекарства изменяют выносливость + Medicatie heeft invloed op uithoudingsvermogen + Il farmaco modifica la resistenza + + + Allow certain medications to modify (vanilla/advanced fatigue) stamina as a side effect + 부작용으로 특정 약물이 (바닐라/고급 피로도) 스태미나를 조절할 수 있도록 허용 + 特定の薬の副作用としてスタミナ(バニラ/ACEアドバンスド疲労)を変更することを許可する + Erlaubt es, dass bestimmte Medikamente als Nebenwirkung die Ausdauer beeinflussen (Vanilla/fortgeschrittene Ausdauer). + Autorise certains médicaments à modifier (Vanilla/Fatigue avancée) l'endurance en effet secondaire + Permite que certos medicamentos modifiquem a Stamina (vanilla/fadiga avançada) como efeito colateral + Permitir que ciertos medicamentos modifiquen la resistencia (fatiga convencional/avanzada) como efecto secundario + Salli tiettyjen lääkkeiden muuttaa kestävyyttä (vanilja/edistynyt väsymys) sivuvaikutuksena + Позволяют определенным лекарствам изменять выносливость (ваниль/повышенная утомляемость) в качестве побочного эффекта + Bepaald of sommige medicijnen het uithoudingsvermogen (vanilla/geadvanceerde uitputting) beïnvloeden als een bijwerking + Consenti a determinati farmaci di modificare la resistenza (fatica normale/avanzata) come effetto collaterale + + + EACA Clears Trauma + EACA устраняет травму + EACA Elimina el Trauma + EACAによる外傷の除去 + L'EACA soigne les traumatismes + EACA Remove Traumas + EACA verwijderd trauma + EACA elimina il trauma + + + Allows Trauma to be cleared by EACA in addition to stitching + Позволяет устранить травму с помощью EACA в дополнение к наложению швов + Permite eliminar el Trauma mediante el EACA además de cosiendo + EACAによる効果として縫合に加え、外傷の除去を可能にします。 + Autorise le soin complet des traumatismes par l'EACA en plus de la suture + Permite que o EACA remova traumas além de suturar + Staat toe dat EACA trauma verwijderd, als additie van hechten + Consente al trauma di essere rimosso da EACA oltre alla sutura. + + + Allow Stacking + 重複の許可 + Permitir acumulación + Sta stapelen toe + Autoriser l'empilage + Permetti l'impilamento + + + If enabled TXA will be stackable and double it's efficiency + 有効にすると、TXAの重複が可能になり、効率が2倍になります。 + Si el ATX esta permitido, se podrá acumular y duplicará su eficiencia + Wanneer ingeschakeld: sta het stapelen van TXA toe, wat de effectiviteit verdubbeld) + Si activé, le TXA sera empilable et doublera son efficacité + Se abilitato, il TXA sarà impilabile e raddoppierà la sua efficienza + + + Keep Bandaging Until Out Of System + 体内に効果が無くなるまで"包帯"を適用する + Mantiene el Vendaje hasta que desaparezca del organismo + Blijf verbinden tot uit het systeem + Continuer à bander jusqu'à ce que le produit soit éliminé du système + Continua a fasciarti finché non esce dal sistema + + + If enabled TXA will keep bandaging until it's out of your system\nIf disabled TXA will stop working after bandaging the last wound it can find + 有効にすると、TXAが体内から無くなるまで傷口に"包帯"を巻きます。 \n無効にすると、TXAが判定済の最後の創傷に"包帯"を適用した後に、その作用を終了します。 + Si el ATX esta permitido, seguirá vendando hasta que desaparezca del organismo\nSi el ATX no esta permitido, dejará de funcionar después de vendar la última herida que pueda encontrar + Wanneer ingeschakeld: TXA blijft verbinden tot het uit jouw systeem is.\nWanneer uitgeschakeld: TXA Stopt met werken wanneer alle wonden gedicht zijn. + Si activé, le TXA continuera à bander jusqu'à ce qu'il soit éliminé du système.\nSi désactivé, le TXA cessera de fonctionner après avoir bandé la dernière plaie qu'il peut trouver. + Se abilitato, TXA continuerà a fasciarsi finché non sarà eliminato dal sistema.\nSe disabilitato, TXA smetterà di funzionare dopo aver fasciato l'ultima ferita che trova. + + + TXA Cycle Time + TXAサイクル時間 + Ciclo de tiempo del ATX + TXA cyclustijd + Temps de cycle du TXA + Tempo del ciclo TXA + + + The time it takes for TXA to close a wound + TXAが創傷を塞ぐのに掛かる時間 + El tiempo que tarda el ATX en cerrar una herida + Hoe lang het duurt voordat TXA een wond dicht + Temps requis pour permettre au TXA de refermer une blessure + Il tempo necessario affinché TXA chiuda una ferita + + + Coagulation Settings + 凝固設定 + Configuración de la coagulación + Configurações de coagulação + Coagulatie instellingen + Paramètres de coagulation + Impostazioni di coagulazione + + + Require Heart Rate + 心拍を要求する + Requiere Ritmo Cardiaco + Vereist hartslag + Fréquence cardiaque requise + Richiede la Frequenza Cardiaca + + + Should coagulation require a heart rate above 20BPM? (Doing CPR will keep HR above 20BPM) + 凝固が作用するのに20BPM以上の心拍数を必要とさせます (CPRを行うことで心拍数は20BPM以上を保つことが出来ます) + La coagulación requerirá de un ritmo cardiaco superior a 20 PPM (Hacer RCP mantendrá el RC por encima de 20 PPM) + Is een hartslag van meer dan 20SPM benodigt voor coagulatie? (Het uitvoeren van CPR houdt de hartslag boven 20SPM) + La coagulation nécessite-elle un fréquence cardiaque supérieure à 20 BPM ? (Effectuer la RCP gardera le FC au dessus de 20 BPM) + La coagulazione dovrebbe richiedere una frequenza cardiaca superiore a 20 BPM? (Fare RCP manterrà la frequenza cardiaca sopra i 20 BPM) + + + Required Blood Volume + 血液量を要求する + Volumen de sangre requerido + Benodigd bloedvolume + Volume sanguin requis + Volume di sangue richiesto + + + Minimum volume of blood required for coagulation to work + 凝固の作用に最低限必要な血液の量 + Volumen de sangre necesario para que la coagulación funcione + Het minimale bloedvolume dat vereist is voor coagulatie om te werken + Volume de sang minimal requis pour permettre à la coagulation de fonctionner + Volume minimo di sangue richiesto affinché la coagulazione funzioni + + + Coagulation Factors + 凝固因子 + Factores de Coagulación + Stollingsfactoren + Facteurs de coagulation + Fattori di coagulazione + + + The amount of coagulation factors that get set on unit spawn & be kept as limit for factor regeneration + ユニットのスポーン時に定義される凝固因子の量と、因子の再生限界値 + La cantidad de factores de coagulación que se establecen al spawnear y se mantienen como límite para la regeneración de factores + De hoeveelheid stollingsfactoren dat een eenheid krijgt op spawn en als limiet wordt gebruik voor hergeneratie + La quantité de facteurs de coagulation définie lors de l’apparition de l'unité et conservée comme limite pour la régénération des facteurs. + La quantità di fattori di coagulazione che vengono impostati al momento della creazione dell'unità e mantenuti come limite per la rigenerazione dei fattori. + + + Clotting Cycle Time + 凝血サイクル時間 + Duración del ciclo de coagulación + Stollingscyclustijd + Temps de cycle de coagulation + Tempo del ciclo di coagulazione + + + The time between each wound clotting cycle that start wound clotting. (low number may cause lag) + 創傷の凝血を開始する各凝血サイクル間の時間の長さ。(低い数値はラグを招く恐れがあります) + El tiempo entre cada ciclo de coagulación de la herida que inicia la coagulación. (Un número bajo puede causar lag) + De hoeveelheid tijd tussen elke wondstollingscyclus. (een laag nummer kan leiden tot lag) + Le temps entre chaque cycle de coagulation des plaies qui déclenche la coagulation. (Un nombre bas peut entraîner du lag) + Il tempo tra ogni ciclo di coagulazione delle ferite che avvia la coagulazione. (un valore basso potrebbe causare lag + + + Minor Wounds Clotting Time + 小さな創傷の凝血時間 + Tiempo de coagulación de Heridas Leves + Kleine wonden stollingstijd + Temps de coagulation des blessures mineures + Tempo di coagulazione per ferite minori + + + Medium Wounds Clotting Time + 中くらいの創傷の凝血時間 + Tiempo de coagulación de Heridas Medias + Middelgrote wonden stollingstijd + Temps de coagulation des blessures moyennes + Tempo di coagulazione per ferite medie + + + Large Wounds Clotting Time + 大きな創傷の凝血時間 + Tiempo de coagulación de Heridas Severas + Grote wonden stollingstijd + Temps de coagulation des blessures larges + Tempo di coagulazione per ferite gravi + + + This time gets divided by 2, randomized & added with the same value devided by 2.\nFor example, if the value was set to 10s this would be one possible varriation: (random (10 / 2)) + (10 / 2) = 8s + この時間を2で割って、同じ値を2で割った値をランダムに加算する。\n例えば、値を10秒に設定した場合、次のようなバリエーションが考えられる: (ランダム値 (10秒 / 2)) + (10秒 / 2) = 8秒 + Este tiempo se divide entre 2, se aleatoriza y se suma con el mismo valor dividido por 2.\n Por ejemplo, si el valor se establece en 10 esto sería un posible resultado: ("al azar del 0 al" (10/2)) + (10/2) = 8s + Deze tijd wordt door 2 gedeeld, gerandomiseerd en dan met dezelfde waarde gedeeld door 2 opgeteld. \nBijvoorbeeld: als deze waarde op 10 seconden ingesteld staat dan is één mogelijke variatie:(random(10/2))+(10/2) = 8s + Ce temps est divisé par 2, randomisé et additionné à la même valeur divisée par 2. \nPar exemple, si une valeur est fixée à 10 secondes, une variation possible serait : (aléatoire (10 / 2)) + (10 / 2) = 8s + Questo tempo viene diviso per 2, randomizzato e aggiunto al stesso valore diviso per 2.\nAd esempio, se il valore fosse impostato su 10 secondi, una possibile variazione sarebbe: (random (10 / 2)) + (10 / 2) = 8 secondi. + + + Coagulation Factor Regeneration Cycle + 凝固因子再生サイクル + Ciclo de Regeneración del Factor de Coagulación + Stollingsfactor hergeneratiecyclus + Cycle de régénération des facteurs de coagulation + Ciclo di rigenerazione dei fattori di coagulazione + + + The time between coagulation factor regeneration checks. Will add +1 factor on successful check. Uses Setting: "Coagulation Factors" as limit.\n Note: If the limit is exceeded, this time will be used and then remove -1 factor until Setting: "Coagulation Factors" is reached. Tipp: TXA or EACA stop losing factors\nRequirements for regeneration to work:\n- No wound being clotted in the last cycle check from this setting\n- Setting: "Require Heart Rate"\n- Setting: "Required Blood Volume" + 凝固因子再生チェックの間隔。チェックに成功すると因子が+1されます。設定 "凝固因子の限界値" を限界値として使用します。 \n注:制限を超えた場合、この時間が経過した後、設定"凝固因子の限界値"に達するまで因子を1つ取り除きます。 \nヒント: TXAまたはEACAは因子の消失を止めます。\n因子再生が機能するための条件: \n-ここで設定されたサイクル時間の最後のチェックで傷口が凝血していないこと \n-設定: "心拍を要求する" \n-設定: "血液量を要求する" + Tiempo que transcurre entre cada revisión de la regeneración del factor de coagulación. Añade +1 factor si la revisión ha tenido éxito. Utiliza el ajuste "Factores de Coagulación" como límite.\n Nota: Si el limite es excedido, el tiempo será usado para retirar -1 factor hasta que el ajuste "Factor de Coagulación" se alcance. Consejo: ATX o EACA dejan de perder factores.\n Requisitos para que la regeneración funcione:\n- Ninguna herida coagulada en la última revisión del ciclo de este ajuste.\n- Ajuste: "Requiere Ritmo Cardíaco"\n- Ajuste: "Volumen de Sangre requerido" + De tijd tussen stollingsfactor hergeneratie checks. Geeft +1 factor op een succesvolle check. Gebruikt instelling: "Stollingsfactoren" als limiet. \n Wees alert: als het limiet overschreden is, dan zal na deze check 1 factor verwijderd worden (-1 factoren) tot het limiet weer bereikt is. Tip: TXA en EACA stoppen het verlies van factoren.\nVereisten voor hergeneratie:\n- Geen wond gestold in de laaste cyclus van deze instelling,\n- Instelling: "Vereist hartslag"\n- "Benodigd bloedvolume" + Le temps entre les vériofications de régénération des facteurs de coagulation. Ajoute +1 facteur en cas de vérification réussie. Utilise le paramètres : "Facteurs de coagulation" comme limite. \nRemarque : si la limite est dépassée, ce temps sera utilisé, puis -1 facteur sera retiré jusqu'à ce que le paramètre : "Facteurs de coagulation" soit atteint. Conseil :TXA ou EACA arrêtent la perte de facteurs.\nConditions nécessaires pour que la régénération fonctionne :\n- Aucune plaie en cours de coagulation au cours du dernier cycle de vérification de ce paramètres.\n- Paramètre : "Fréquence cardiaque requise"\n- Paramètre : "Volume sanguin requis" + Il tempo tra i controlli di rigenerazione dei fattori di coagulazione. Aggiunge +1 fattore in caso di controllo riuscito. Utilizza l'impostazione: "Fattori di coagulazione" come limite.\nNota: se il limite viene superato, questo tempo verrà utilizzato e poi verrà rimosso -1 fattore fino a quando non si raggiunge l'impostazione: "Fattori di coagulazione". Suggerimento: TXA o EACA fermano la perdita di fattori.\nRequisiti affinché la rigenerazione funzioni:\n- Nessuna ferita in corso di coagulazione nell'ultimo ciclo di verifica di questa impostazione.\n- Impostazione: "Frequenza cardiaca richiesta"\n- Impostazione: "Volume sanguigno richiesto" + + + Affect AI + AIへの影響 + Afecta a la IA + Beïnvloed AI/KI + Affecte l'IA + Influenza IA + + + Allow coagulation to affect AI units.\nEvery other value will still be required if turned on. (May cause lag if many AI is present) + 凝固がAIに影響するようにします。\nONにしても他の値は必要です。(多くのAIが存在する場合、ラグが発生する可能性があります。) + Permitir que la coaguación afecte a las unidades de IA. Todos los demás valores seguirán siendo necesarios si se activan. (Puede causar lag si hay muchas IA presentes) + Laat coagulatie AI/KI beïnvloeden.\nElke andere waarde wordt ook voor AI/KI gecheckt wanneer dit aanstaat. (Kan prestatieproblemen opleveren als er veel AI's/KI's aanwezig zijn.) + Autoriser la coagulation à affecter les unités IA.\nTous les autres paramètres seront toujours nécessaires si cette option est activée. (Peut entraîner un lag si de nombreuses IA sont présentes.) + Permettere alla coagulazione di influenzare le unità IA.\nOgni altro valore sarà comunque richiesto se attivato. (Può causare lag se sono presenti molte IA) + + + Tournique Blocks Blood Clotting + 止血帯による血液凝固の妨げ + Torniquete Bloquea la Coagulación de la Sangre + Tourniquets blokkeren wondstolling + Le garrot bloque la coagulation + Il tourniquet blocca la coagulazione del sangue + + + If enabled a applied tourniquet will stop wounds from being closed from coagulation on that bodypart + 有効にすると、止血帯を適用中の部位で凝固によって傷口が塞がらないようになります。 + Si se activa, el torniquete aplicado impedirá que las heridas se cierren por coagulación en esa parte del cuerpo + Tourniquets voorkomen dat wonden op hetzelfde ledemaat dichtgemaakt worden door coagulatie wanneer deze instelling actief is + Si activé, un garrot appliqué empêchera les plaies de se fermer par coagulation sur cette partie du corps. + Se abilitato, un tourniquet applicato impedirà la chiusura delle ferite tramite coagulazione su quella parte del corpo. + + + Affect Minor Wounds + 小さな創傷への影響 + Afecta a Heridas Menores + Beïnvloed kleine wonden + Affecter les blessures mineures + Influenza le ferite minori + + + Allow coagulation to affect minor wounds when clotting + 小さな創傷に対して凝固が影響することを許可する + Permitir que la coagulación afecte a heridas leves al coagularse + Staat toe dat coagulatie kleine wonden beïnvloed tijdens het stollen + Permettre à la coagulation d'affecter les blessures mineures lors de la coagulation + Consenti alla coagulazione di influenzare le ferite minori durante la coagulazione + + + Affect Medium Wounds + 中くらいの創傷への影響 + Afecta a Heridas Medias + Beïnvloed middelgrote wonden + Affecter les blessures moyennes + Consenti alla coagulazione di influenzare le ferite medie + + + Allow coagulation to affect medium wounds when clotting + 中くらいの創傷に対して凝固が影響することを許可する + Permitir que la coagulación afecte a heridas medias al coagularse + Staat toe dat coagulatie middelgrote wonden beïnvloed tijdens het stollen + Permettre à la coagulation d'affecter les blessures moyennes lors de la coagulation + Consenti alla coagulazione di influenzare le ferite medie durante la coagulazione + + + Affect Large Wounds + 大きな創傷への影響 + Afecta a Heridas Severas + Beïnvloed grote wonden + Affecter les blessures larges + Influenzare le ferite gravi + + + Allow coagulation to affect large wounds when clotting + 大きな創傷に対して凝固が影響することを許可する + Permite que la coagulación afecte a heridas severas al coagularse + Staat toe dat coagulatie grote wonden beïnvloed tijdens het stollen + Permettre à la coagulation d'affecter les blessures larges lors de la coagulation + Permettere alla coagulazione di influenzare le ferite gravi durante la coagulazione + + + Allow Additional TXA Bandaging + TXAによる追加の"包帯"を許可する + Permitir el Vendaje ATX Adicional + Sta additionele TXA dichtingen toe + Permettre l'apport de bandages par le TXA + Consenti la medicazione aggiuntiva con TXA + + + If enabled TXA will keep all functionality and start bandaging wounds itself + 有効にすると、TXAがすべての機能を保持し、自身に"包帯"を適用するようになります。 + Si el ATX esta permitido, mantendrá toda la funcionalidad y empezará a vendar las heridas por si mismo + TXA houdt zijn functionaliteit en zal wonden dichten wanneer deze instelling actief is. + Si activé, le TXA gardera toutes ses fonctionnalités et bandera les plaies par lui-même + Se abilitato, TXA manterrà tutte le funzionalità e inizierà a medicare le ferite da solo + + + Allow Additional EACA Stiching + EACAによる追加の"縫合"を許可する + Permitir la Sutura EACA Adicional + Sta additionele EACA hechtingen toe + Permettre la suture par l'EACA + Consenti la sutura aggiuntiva con EACA + + + If enabled EACA will keep all functionality and start stitching bandaged wounds + 有効にすると、EACAがすべての機能を保持し、自身に"縫合"を適用するようになります。 + Si el EACA esta permitido, mantendrá la funcionalidad y empezará a suturar las heridas vendadas + EACA houdt zijn functionaliteit en zal wonden hechten wanneer deze instelling actief is. + Si activé, l'EACA gardera toutes ses fonctionnalités et suturera les plaies par lui-même + Se abilitato, EACA manterrà tutte le funzionalità e inizierà a suturare le ferite già medicati. + + + Simultaneous Bodypart Coagulation + 身体部位の同時凝固 + Coagulación Simultanea de las Partes del Cuerpo + Gelijktijdige coagulatie + Coagulation simultanée de plusieurs membres + Coagulazione simultanea delle parti del corpo + + + If enabled each bodypart will be treated simultaneously by coagulation.\nMeaning if you have a wound on the head and body they will both be treated in the same coagulation cycle. + 有効にすると、各部位が同時に凝固処理されます。\nつまり、頭部と胴体に傷がある場合、同じ凝固サイクルで両方が治癒されます。 + Si se permite, cada parte del cuerpo se tratará simultáneamente mediante coagulación. \nEs decir, si tiene una herida en la cabeza y otra en el torso, ambas se tratarán en el mismo ciclo de coagulación. + Als dit ingeschakeld is, zal elk lichaamsdeel tegelijkertijd behandeld worden door coagulatie. \nWat betekent dat als je een wond aan je arm en been hebt, dat deze in dezelfde coagulatiecyclus behandeld worden + Si activé, chaque membre sera affecté simultanément par la coagulation.\nCela signifie que si une plaie est présente sur la tête et le torse, elles seront toutes deux traitées lors du même cycle de coagulation. + Se abilitato, ogni parte del corpo sarà trattata simultaneamente dalla coagulazione.\nCiò significa che se hai una ferita sulla testa e sul corpo, entrambe verranno trattate nello stesso ciclo di coagulazione. + + + Coagulation Factor Limit + 凝固因子の限界値 + Limite del Factor de Coagulación + Stollingsfactor limiet + Limite de facteurs de coagulation + Limite dei fattori di coagulazione + + + The limit for how many coagulation factors can be present inside a units body at once. Meaning if you administer plasma this is the maximum attainable value. + 血液凝固因子が一度にどれだけ体内に存在できるかの限界値。つまり、血漿を投与した場合における保持可能な因子の最大値。 + Limite del número de factores de coagulación que pueden estar presentes a la vez en el organismo de una unidad. Es decir, si administras plasma, éste es el valor máximo alcanzable. + Het limiet voor hoeveel stollingsfactoren er in een eenheids lichaam tegelijkertijd aanwezig kan zijn. Wat betekent dat dit de waarde is waar zelfs plasma geen extra factoren meer toevoegd + La limite du nombre de facteurs de coagulation pouvant être présents dans le corps d'une unité. Cela signifie que si du plasma est administré, il s'agira de la valeur maximale atteignable. + Il limite di quanti fattori di coagulazione possono essere presenti nel corpo di un'unità contemporaneamente. Ciò significa che se somministri plasma, questo è il valore massimo raggiungibile. + + + Allow Clots To Be Shown in Menu + メニューに血栓を表示する + Permitir que los Coágulos se muestren en el Menú + Sta toe dat stollingen worden weergeven in het menu + Autoriser l'affichage des caillots dans le menu + Consenti la visualizzazione dei coaguli nel menu + + + If enabled, when coagulation is bandaging a wound it will add a interaction log to the medical menu. + 有効にすると、凝固が傷に包帯を適用しているときに、医療メニューのログに追加されます。 + Si se activa, cuando la coagulación esté vendando una herida añadirá un registro de interacción al menú médico. + Wanneer dit is ingeschakeld is worden gestolde wonden toegevoegd aan de interactie log van het medisch menu. + Si activé, lorsque la coagulation bandera une plaie, une ligne sera ajoutée dans le journal des interactions du menu médical. + Se abilitato, quando la coagulazione sta medicando una ferita, aggiungerà un registro di interazione nel menu medico. + + + Blood clotting temporarily closed a wound on %1 + 血液凝固が一時的に %1 の創傷を塞いだ + La coagulación sanguínea cerró temporalmente una herida en %1 + Coagulação estancou temporariamente um ferimento em %1 + Wondstolling heeft een wond op %1 tijdelijk gedicht + La coagulation a temporairement fermé une plaie sur %1 + Il coagulo di sangue ha temporaneamente chiuso una ferita su %1 + + + Blood clotting permanently closed a wound on %1 + 血液凝固が完全に %1 の創傷を塞いだ + La coagulación sanguínea cerro permanentemente una herida en %1 + Coagulação estancou permanentemente um ferimento em %1 + Wondstolling heeft een wond op %1 permanent gedicht + La coagulation a définitivement fermé une plaie sur %1 + Il coagulo di sangue ha chiuso permanentemente una ferita su %1 + + + Head + Kopf + Голова + Cabeza + Tête + Głowa + Cabeça + Hlava + Testa + 頭部 + 머리 + 头部 + 頭部 + Kafa + Hoofd + + + Torso + Torso + Торс + Torse + Tors + Torso + Trup + Torso + Torso + 胴体 + 몸통 + 躯干 + 身體 + Gövde + Torso + + + Left Arm + Linker Arm + Левая рука + Brazo Izquierdo + Bras gauche + Lewa ręka + Braço Esquerdo + Levá Ruka + Braccio Sinistro + 左腕 + 왼팔 + 左臂 + 左手 + Sol Kol + Linkerarm + + + Right Arm + Rechter Arm + Правая рука + Brazo Derecho + Bras droit + Prawa ręka + Braço Direito + Pravá Ruka + Braccio Destro + 右腕 + 오른팔 + 右臂 + 右手 + Sağ Kol + Rechterarm + + + Left Leg + Linkes Bein + Левая нога + Pierna Izquierda + Jambe gauche + Lewa noga + Perna Esquerda + Levá Noha + Gamba Sinistra + 左足 + 왼다리 + 左腿 + 左腳 + Sol Bacak + Linkerbeen + + + Right Leg + Rechtes Bein + Правая нога + Pierna Derecha + Jambe droite + Prawa noga + Perna Direita + Pravá Noha + Gamba Destra + 右足 + 오른다리 + 右腿 + 右腳 + Sağ Bacak + Rechterbeen + + + Chest + + + Neck + + + Upper Left Arm + + + Upper Right Arm + + + Upper Left Leg + + + Upper Right Leg + + + Portable Blood Tester + + + The Portable Blood Tester is a blood monitoring system that can both measure the efficiency of your blood clotting and your ABG + + + Blood Tester concludes: Patient has an INR of %1 + + + Take Blood Sample + PT/INRを測定する + Medir PT/INR + Medir PT/INR + Meet PT-INR + Mesurer le PT/INR + Misura PT/INR + + + Taking Blood Sample, + 血液サンプルを取得、 + Tomar muestra de sangre, + Coletando amostra sanguínea, + Bloedstaal wordt genomen + Prélè¨vement de sang, + Prelievo campione di sangue, + + + Slightly Below Normal INR + 正常INRより少し低い + ligeramente por debajo del INR normal + INR ligeiramente abaixo do normal + Lichtelijk onder normaal INR + légèrement inférieur à l'INR normal + INR leggermente sotto la norma + + + Treatment time for CWMP + Temps de traitement pour le CWMP + Tempo di trattamento per il CWMP + Anwendungszeit für CWMP + 戦闘傷病治療薬(CWMP)の所要時間 + + + Treatment time for Caffeine + Temps de traitement pour la caféine + Tempo di trattamento per la Caffeina + Anwendungszeit für Koffein + カフェインの所要時間 + + + Allow using CWMP + Autoriser l'utilisation du CWMP + Consenti l'uso dei CWMP + Erlaube die Verwendung von CWMP + 戦闘傷病治療薬(CWMP)の許可 + + + Allow using Caffeine + Autoriser l'utilisation de la caféine + Consenti l'uso della caffeina + Erlaube die Verwendung von Koffein + カフェインの許可 + + + Sligtly Above normal INR + 正常INRより少し高い + ligeramente por encima de INR normal + INR ligeiramente acima do normal + Lichtelijk boven normaal INR + légèrement supérieur à l'INR normal + INR leggermente sopra la norma + + + Very Low INR + 正常INRよりかなり低い + INR muy bajo + INR bem abaixo do normal + Zeer laag INR + INR très bas + INR molto basso + + + Very high INR + 正常INRよりかなり高い + INR muy alto + INR bem acima do normal + Zeer hoog INR + INR très élevé + INR molto alto + + + Normal INR + 正常INR + INR normal + INR normal + Normaal INR + INR normal + INR normale + + + Blood Tester Settings + + + Medical level required for Blood Tester + + + Locations Blood Tester + + + Treatment time for taking a blood sample + + + Allow Stacking + 重複の許可 + Permitir acumulación + Permitir somatória de efeito + Sta stapelen toe + Autoriser l'empilage + Consenti la sovrapposizione + + + If enabled EACA will be stackable and double its efficiency + 有効にすると、EACAの重複と効率の倍化が可能になります。 + Si el EACA esta permitido, se podrá acumular y duplicará su eficiencia + Se habilitado, o efeito do EACA será somável e sua eficiência será dobrada + Staat het stapelen van EACA toe wanneer ingeschakeld, wat leidt tot een verdubbeling van de effectiviteit + Si activé, l'EACA sera empilable et doublera son efficacité + Se abilitato, EACA sarà sovrapponibile e raddoppierà la sua efficienza. + + + Keep Stiching Until Out Of System + 体内に効果が無くなるまで"縫合"を適用する + Mantiene la Sutura hasta que desaparezca del Organismo + Sutura contínua enquanto presente no sistema + Blijf hechten tot uit systeem + Continuer de suturer jusqu'à ce que le produit soit éliminé du système + Continua a suturare fino all'eliminazione dal sistema + + + If enabled EACA will keep stichinng until it's out of your system\nIf disabled EACA will stop working after stiching the last bandaged wound it can find + 有効にすると、EACAが体内から無くなるまで"縫合"をします。 \n無効にすると、EACAが判定済の最後の包帯創傷に"縫合"を適用した後に、その作用を終了します。 + Si el EACA esta permitido, seguirá suturando hasta que desaparezca del organismo.\n Si el EACA no está permitido, dejará de funcionar después de suturar la última herida que pueda encontrar + Se habilitado, o EACA continuará suturando até que esteja fora do seu sistema\nSe desabilitado, o funcionamento do EACA será interrompido assim que suturar o último ferimento + Als dit ingeschakeld is, EACA blijft hechten tot het uit je systeem is.\nEACA zal stoppen na de laatste hechtbare wond die hij kan vinden wanneer uitgeschakeld + Si activé, l'EACA continuera de suturer jusqu'à ce qu'il soit éliminé du système.\nSi désactivé, l'EACA cessera de fonctionner après avoir suturé le dernier bandage qu'il peut trouver. + Se abilitato, EACA continuerà a suturare finché non verrà eliminato dal sistema.\nSe disabilitato, EACA smetterà di funzionare dopo aver suturato l'ultima ferita medicata che può trovare. + + + EACA Cycle Time + EACAサイクル時間 + Duración del Ciclo del EACA + Tempo de Ciclo do EACA + EACA cyclustimer + Temps de cycle de l'EACA + Tempo di ciclo EACA + + + The time it takes for EACA to close a stich a wound + EACAが創傷を縫合するのに掛かる時間 + El tiempo que tarda EACA en suturar una herida + O intervalo entre suturas do EACA + Hoe lang het duurt voor EACA om een wond te hechten + Temps requis à l'EACA pour suturer une plaie + Il tempo che impiega EACA per suturare una ferita. + + + IV Epinephrine Settings + EACAが創傷を縫合するのに掛かる時間 + Ajustes de Epinefrina IV + IV Adrenaline Instellingen + Paramètres de l'épinéphrine IV + Impostazioni Epinefrina IV + + + Medical level required for IV Epinephrine + アドレナリン静脈注射 (IV)の許可 + Nivel médico requerido para Epinefrina IV + Vereist medisch niveau voor gebruik van IV Adrenaline + Niveau médical requis pour l'épinéphrine IV + Livello medico richiesto per Epinefrina IV + + + Treatment time for IV Epinephrine + アドレナリン静脈注射 (IV)の所要時間 + Tiempo de tratamiento para Epinefrina IV + Toedieningstijd voor IV Adrenaline + Temps de traitement pour l'épinéphrine IV + Tempo di trattamento per Epinefrina IV + + + IV Epinephrine + アドレナリン静脈注射 (IV) + Epinefrina IV + IV Adrenaline + Epinéphrine IV + Epinefrina IV + + + Vial: Epinephrine + アドレナリン静脈注射 (IV) + Epinefrina IV + IV Adrenaline + Epinéphrine IV + Epinefrina IV + + + Push Epinephrine + アドレナリンを注入 + Administrar Epinefrina + Injecteer IV Adrenaline + Administrer l'épinéphrine + Somministra Epinefrina + + + 5ml Syringe + + + For IV medications + + + 10ml Syringe + + + For IM medications + + + Establish 14g IV + + + Establish 20g IV + + + Syringe Prep level + + + Medical level required to prep syringes + + + Syringe Prep Time + + + Time required to prep syringes + + + Enable Advanced Medication System + + + Enables Advanced Medication System and disables Basic System + REQUIRED: Medications Require IV/IO, Fluid Require inserted IV/IO + + + KAT Morphine Settings + + + Morphine IV + + + Vial: Morphine + + + Medical level required for Morphine IV + + + Treatment time for Morphine IV + + + Medical level required for IM Morphine + + + Treatment time for IM Morphine + + + Push Morphine IV + + + Adenosine IV + + + Medical level required for Adenosine IV + + + Treatment time for Adenosine IV + + + Adenosine IV + + + Vial: Adenosine + + + Push Adenosine IV + + + Check Veins + + + Checking Veins + + + Medical level required to Check Veins + + + Treatment time to Check Veins + + + The Veins are Blown + + + The Veins are Normal + + + Infusion Prep Time + + + Time required to prep Infusions + + + 5ml Saline Flush + + + Uses to flush and clear IVs and IOs + + + Saline Flush Med Level + + + Changes what medical level is required to do a Saline Flush + + + IV Complications + + + Enables whole body negative effects when overpushing fluids + + + Limb IV Complications + + + Enables IV complications from overpushing fluids including blown veins and cannulas + + + IV Failure Rate + + + Chance for a failed IV placement without taking damage or fractures into account + + + 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 + + + Doxapram + + + Medical level required for Doxapram + + + Treatment time for Doxapram + + + Doxapram Is a Respiratory Stimulant that increases Breathing Rate and Depth + + + Vial: Doxapram + + + Push Doxapram + + + Push 0.5mg Doxapram + + + Push 1mg Doxapram + + + 0.5mg + + + 1mg + + + Pushing 0.5mg Doxapram + + + Pushing 1mg Doxapram + + + 5ml Syringe/0.5mg Doxapram + + + 5ml Syringe loaded with 0.5 mg of Doxapram + + + 5ml Syringe/1mg Doxapram + + + 5ml Syringe loaded with 1mg of Doxapram + + + Used to treat chemical exposure and bradycardia + Zur Behandlung von Bradykardie + Używany do zwalczania bradykardii + Utiliser pour traiter une bradycardie + 用于治疗心动过缓 + 用于治疗心动过缓 + Usato per trattare la bradicardia + Se utiliza para tratar la bradicardia + 서맥 치료에 사용 + Bradikardi tedavisinde kullanılır + Používá se k léčbě bradykardie + 徐脈の治療に使用される + Используется для лечения брадикардии + Usado para tratar bradicardia + Käytetään bradykardian hoitoon + Wordt gebruikt om chemische blootstelling en bradycardie te behandelen + + + TXA Autoinjector + + + Inject TXA + + + Saline Flush + + + Medical level required for TXA Autoinjector + + + Treatment time for TXA Autoinjector + + + Receiving Doxapram Infusion [%1ml] + + + Receiving Epinephrine Infusion [%1ml] + + + Receiving Etomidate Infusion [%1ml] + + + Receiving Morphine Infusion [%1ml] + + + Receiving Nitroglycerin Infusion [%1ml] + + + Receiving Norepinephrine Infusion [%1ml] + + + Receiving Platelets [%1ml] + + + Drawing Blood [%1ml] + + + Removing Saline IV bags + + + Removing Plasma IV bags + + + Removing Blood IV bags - - Establish FAST IO - Zavést FAST IO - Insertion FAST IO - Insertar FAST IO - Inserisci FAST IO - Załóż FAST IO - Inserir FAST IO - Установить FAST IO - FAST IO einrichten - FAST IO 주사 - FAST IOを刺入 - 建立FAST IO - 建立FAST IO - HIZLI IO kurun - Perusta FAST IO - Leg FAST IO aan + + Removing Packed RBC IV bags + + + Removing Ringers Lactate IV bags + + + Removing Hypertonic Saline IV bags + + + Removing Hextend IV bags + + + Removing FBTK + + + Remove Saline IV bags + + + Remove Plasma IV bags + + + Remove Blood IV bags + + + Remove Packed RBC IV bags + + + Remove Ringers Lactate IV bags + + + Remove Hypertonic Saline IV bags + + + Remove Hextend IV bags + + + Remove Filled FBTK + + + Establish EZ IO + + + EZ IO + + + Allow applying EZ IO + + + Changes what medical level is required to set EZ IOs + + + Time to establish EZ IOs + + + Establish EJV + + + Establishing External Jugular Vein Access + + + Central Line Kit + + + Allows for External Jugular Vein Access + + + EJV + + + Allow External Jugular Vein Access + + + Changes what medical level is required to set External Jugular Vein Access + + + Time to establish External Jugular Vein Access + + + Push 1g TXA + + + Pushing 1g TXA + + + 10ml Syringe / 1g TXA + + + Push 2g TXA + + + Pushing 2g TXA + + + 10ml Syringe / 2g TXA + + + Push 1g TXA + + + Pushing 1g TXA + + + 5ml Syringe / 1g TXA + + + Push 2g TXA + + + Pushing 2g TXA + + + 5ml Syringe / 2g TXA + + + Push 3mg Morphine + + + Pushing 3mg Morphine + + + 5ml Syringe / 3mg(60kg) Morphine + + + Push 3.5mg Morphine + + + Pushing 3.5mg Morphine + + + 5ml Syringe / 3.5mg(70kg) Morphine + + + Push 4mg Morphine + + + Pushing 4mg Morphine + + + 5ml Syringe / 4mg(80kg) Morphine + + + Push 4.5mg Morphine + + + Pushing 4.5mg Morphine + + + 5ml Syringe / 4.5mg(90kg) Morphine + + + Push 5mg Morphine + + + Pushing 5mg Morphine + + + 5ml Syringe / 5mg(100kg) Morphine + + + Push 3mg Ondansetron + + + Pushing 3mg Ondansetron + + + 5ml Syringe / 3mg(60kg) Ondansetron + + + Push 3.5mg Ondansetron + + + Pushing 3.5mg Ondansetron + + + 5ml Syringe / 3.5mg(70kg) Ondansetron + + + Push 4mg Ondansetron + + + Pushing 4mg Ondansetron + + + 5ml Syringe / 4mg(80kg) Ondansetron + + + Push 4.5mg Ondansetron + + + Pushing 4.5mg Ondansetron + + + 5ml Syringe / 4.5mg(90kg) Ondansetron + + + Push 5mg Ondansetron + + + Pushing 5mg Ondansetron + + + 5ml Syringe / 5mg(100kg) Ondansetron + + + Inject 3mg Morphine + + + Injecting 3mg Morphine + + + 10ml Syringe / 3mg(60kg) Morphine + + + Inject 3.5mg Morphine + + + Injecting 3.5mg Morphine + + + 10ml Syringe / 3.5mg(70kg) Morphine + + + Inject 4mg Morphine + + + Injecting 4mg Morphine + + + 10ml Syringe / 4mg(80kg) Morphine + + + Inject 4.5mg Morphine + + + Injecting 4.5mg Morphine + + + 10ml Syringe / 4.5mg(90kg) Morphine + + + Inject 5mg Morphine + + + Injecting 5mg Morphine + + + 10ml Syringe / 5mg(100kg) Morphine + + + Inject 30mg Ketamine + + + Injecting 30mg Ketamine + + + 10ml Syringe / 30mg(60kg) Ketamine + + + Inject 32mg Ketamine + + + Injecting 32mg Ketamine + + + 10ml Syringe / 32mg(64kg) Ketamine + + + Inject 34mg Ketamine + + + Injecting 34mg Ketamine + + + 10ml Syringe / 34mg(68kg) Ketamine + + + Inject 36mg Ketamine + + + Injecting 36mg Ketamine + + + 10ml Syringe / 36mg(72kg) Ketamine + + + Inject 38mg Ketamine + + + Injecting 38mg Ketamine + + + 10ml Syringe / 38mg(76kg) Ketamine + + + Inject 40mg Ketamine + + + Injecting 40mg Ketamine + + + 10ml Syringe / 40mg(80kg) Ketamine + + + Inject 42mg Ketamine + + + Injecting 42mg Ketamine + + + 10ml Syringe / 42mg(84kg) Ketamine + + + Inject 44mg Ketamine + + + Injecting 44mg Ketamine + + + 10ml Syringe / 44mg(88kg) Ketamine + + + Inject 46mg Ketamine + + + Injecting 46mg Ketamine + + + 10ml Syringe / 46mg(92kg) Ketamine + + + Inject 48mg Ketamine + + + Injecting 48mg Ketamine + + + 10ml Syringe / 48mg(96kg) Ketamine + + + Inject 50mg Ketamine + + + Injecting 50mg Ketamine + + + 10ml Syringe / 50mg(100kg) Ketamine + + + Inject 30mcg Fentanyl + + + Injecting 30mcg Fentanyl + + + 10ml Syringe / 30mcg(60kg) Fentanyl + + + Inject 32mcg Fentanyl + + + Injecting 32mcg Fentanyl + + + 10ml Syringe / 32mcg(64kg) Fentanyl + + + Inject 34mcg Fentanyl + + + Injecting 34mcg Fentanyl + + + 10ml Syringe / 34mcg(68kg) Fentanyl + + + Inject 36mcg Fentanyl + + + Injecting 36mcg Fentanyl + + + 10ml Syringe / 36mcg(72kg) Fentanyl + + + Inject 38mcg Fentanyl + + + Injecting 38mcg Fentanyl + + + 10ml Syringe / 38mcg(76kg) Fentanyl + + + Inject 40mcg Fentanyl + + + Injecting 40mcg Fentanyl + + + 10ml Syringe / 40mcg(80kg) Fentanyl + + + Inject 42mcg Fentanyl + + + Injecting 42mcg Fentanyl + + + 10ml Syringe / 42mcg(84kg) Fentanyl + + + Inject 44mcg Fentanyl + + + Injecting 44mcg Fentanyl + + + 10ml Syringe / 44mcg(88kg) Fentanyl + + + Inject 46mcg Fentanyl + + + Injecting 46mcg Fentanyl + + + 10ml Syringe / 46mcg(92kg) Fentanyl + + + Inject 48mcg Fentanyl + + + Injecting 48mcg Fentanyl + + + 10ml Syringe / 48mcg(96kg) Fentanyl + + + Inject 50mcg Fentanyl + + + Injecting 50mcg Fentanyl + + + 10ml Syringe / 50mcg(100kg) Fentanyl + + + Inject 10mg Nalbuphine + + + Injecting 10mg Nalbuphine + + + 10ml Syringe / 10mg(60kg) Nalbuphine + + + Inject 12mg Nalbuphine + + + Injecting 12mg Nalbuphine + + + 10ml Syringe / 12mg(64kg) Nalbuphine + + + Inject 14mg Nalbuphine + + + Injecting 14mg Nalbuphine + + + 10ml Syringe / 14mg(68kg) Nalbuphine + + + Inject 16mg Nalbuphine + + + Injecting 16mg Nalbuphine + + + 10ml Syringe / 16mg(72kg) Nalbuphine + + + Inject 18mg Nalbuphine + + + Injecting 18mg Nalbuphine + + + 10ml Syringe / 18mg(76kg) Nalbuphine + + + Inject 20mg Nalbuphine + + + Injecting 20mg Nalbuphine + + + 10ml Syringe / 20mg(80kg) Nalbuphine + + + Inject 22mg Nalbuphine + + + Injecting 22mg Nalbuphine + + + 10ml Syringe / 22mg(84kg) Nalbuphine + + + Inject 24mg Nalbuphine + + + Injecting 24mg Nalbuphine + + + 10ml Syringe / 24mg(88kg) Nalbuphine + + + Inject 26mg Nalbuphine + + + Injecting 26mg Nalbuphine + + + 10ml Syringe / 26mg(92kg) Nalbuphine + + + Inject 28mg Nalbuphine + + + Injecting 28mg Nalbuphine + + + 10ml Syringe / 28mg(96kg) Nalbuphine + + + Inject 30mg Nalbuphine + + + Injecting 30mg Nalbuphine + + + 10ml Syringe / 30mg(100kg) Nalbuphine + + + Push 30mcg Fentanyl + + + Pushing 30mcg Fentanyl + + + 5ml Syringe / 30mcg(60kg) Fentanyl + + + Push 32mcg Fentanyl + + + Pushing 32mcg Fentanyl + + + 5ml Syringe / 32mcg(64kg) Fentanyl + + + Push 34mcg Fentanyl + + + Pushing 34mcg Fentanyl + + + 5ml Syringe / 34mcg(68kg) Fentanyl + + + Push 36mcg Fentanyl + + + Pushing 36mcg Fentanyl + + + 5ml Syringe / 36mcg(72kg) Fentanyl + + + Push 38mcg Fentanyl + + + Pushing 38mcg Fentanyl + + + 5ml Syringe / 38mcg(76kg) Fentanyl + + + Push 40mcg Fentanyl + + + Pushing 40mcg Fentanyl + + + 5ml Syringe / 40mcg(80kg) Fentanyl + + + Push 42mcg Fentanyl + + + Pushing 42mcg Fentanyl + + + 5ml Syringe / 42mcg(84kg) Fentanyl + + + Push 44mcg Fentanyl + + + Pushing 44mcg Fentanyl + + + 5ml Syringe / 44mcg(88kg) Fentanyl + + + Push 46mcg Fentanyl + + + Pushing 46mcg Fentanyl + + + 5ml Syringe / 46mcg(92kg) Fentanyl + + + Push 48mcg Fentanyl + + + Pushing 48mcg Fentanyl + + + 5ml Syringe / 48mcg(96kg) Fentanyl + + + Push 50mcg Fentanyl + + + Pushing 50mcg Fentanyl + + + 5ml Syringe / 50mcg(100kg) Fentanyl + + + Push 10mg Nalbuphine + + + Pushing 10mg Nalbuphine + + + 5ml Syringe / 10mg(60kg) Nalbuphine + + + Push 12mg Nalbuphine + + + Pushing 12mg Nalbuphine + + + 5ml Syringe / 12mg(64kg) Nalbuphine + + + Push 14mg Nalbuphine + + + Pushing 14mg Nalbuphine + + + 5ml Syringe / 14mg(68kg) Nalbuphine - - Establish 16g IV - Zavádím IV - Insertion 16g IV - Insertar 16g IV - Posiziona 16g IV - Załóż 16G IV - Inserir 16g IV - Установить 16г IV - 16g IV einrichten - 16g IV 주사 - 16g IVを刺入 - 建立16g IV - 建立16g IV - 16g IV oluşturun - Aseta 16g IV - Leg 16g IV aan + + Push 16mg Nalbuphine - - Establishing IO - Zavádím IO - Insertion IO - Colocando IO - Inserendo IO - Zakładanie IO - Inserindo IO - Установить IO - IO legen - IO 주사 중 - IOの刺入中 - 建立IO中 - 建立IO中 - IO'nun kurulması - IO:n perustaminen - IO wordt aangelegd + + Pushing 16mg Nalbuphine - - Establishing IV/IO - Zavádím IV - Insertion IV - Colocando IV - Posizionando IV - Zakładanie IV - Inserindo IV - Установить IV - IV legen - IV/IO 주사 중 - IV/IOの刺入中 - 建立IV中 - 建立IV中 - IV/IO'nun kurulması - IV/IO:n perustaminen - IV/IO wordt aangelegd + + 5ml Syringe / 16mg(72kg) Nalbuphine - - Atropine Autoinjector - Atropin - Atropine - Atropina - Atropina - Atropina - Autoinjetor de Atropina - Атропин - Atropin - 아트로핀 - アトロピン - 阿托品自動注射器 (Atropine) - 阿托品 - Atropin - Atropiini - Atropine autoinjector + + Push 18mg Nalbuphine - - Used to treat chemical exposure - Používá se k léčbě bradykardie - Utiliser pour traiter une bradycardie - Se utiliza para tratar la bradicardia - Usato per trattare la bradicardia - Używany do zwalczania bradykardii - Usado para tratar bradicardia - Используется для лечения брадикардии - Zur Behandlung von Bradykardie - 서맥 치료에 사용 - 徐脈の治療に使用される - 用於治療心動過緩 - 用于治疗心动过缓 - Bradikardi tedavisinde kullanılır - Käytetään bradykardian hoitoon - Wordt gebruikt om chemische blootstelling en bradycardie te behandelen + + Pushing 18mg Nalbuphine - - Stimulates the central nervous system and energizes - Stimuluje centrální nervový systém a dodává energii - Stimule le système nerveux central et revitalise - Estimula el sistema nervioso central y aporta energía. - Stimola il sistema nervoso centrale e aumenta l'energia - Stymuluje centralny układ nerwowy i dodaje energii - Stimuliert das Zentralnervensystem und spendet Energie - 中枢神経を刺激し、活力を与える - 刺激中樞神經系統並使其充滿活力 - 刺激中枢神经系统并使其充满活力 - Stimuleert het centraal zenuwstelsel en geeft energie + + 5ml Syringe / 18mg(76kg) Nalbuphine - - Caffeine bottle - Kofeinová lahev - Bouteille de caféine - Bote de cafeina - Bottiglia di Caffeina - Kofeina - Garrafa de Cafeína - Бутылка с Кофеином - Koffein Kapsel - 카페인 병 - カフェインボトル - 咖啡因瓶 - 咖啡因瓶 - Kofeiinipullo - Caffeïne doosje + + Push 20mg Nalbuphine - - Ammonium Carbonate - Uhličitan amonný - Sels d'Ammoniac - Carbonato de amonio - Carbonato d'ammonio - Sole trzeźwiące - Carbonato de Amônio - Карбонат аммония - Ammoniumkarbonat - 탄산암모늄 - 炭酸アンモニウム - 碳酸銨 (Carbonate) - 碳酸铵 - Amonyum karbonat - Ammoniumkarbonaatti - Ammoniumcarbonaat + + Pushing 20mg Nalbuphine - - Used to restore consciousness - Používá se k obnovení vědomí - Utilisé pour stimuler le patient et l'aider à reprendre conscience. - Usado para ​​recuperar la consciencia - Usato per riprendere coscienza - Używane w celu przywrócenia przytomności - Usado para restaurar a consciência - Используется для восстановления сознания - Wird zur Wiederherstellung des Bewusstseins verwendet - 의식 회복에 사용 - 意識を回復するために使用される - 用於恢復知覺 - 用于恢复知觉 - Bilinci geri yüklemek için kullanılır - Käytetään tajunnan palauttamiseen - Wordt gebruikt om bewustzijn te herstellen + + 5ml Syringe / 20mg(80kg) Nalbuphine - - Measure PT/INR - Změřit PT/INR - Mesurer le PT/INR - Medir PT/INR - Misura PT/INR - Medir PT/INR - PT/INR Messen - PT/INRを測定する - 測量 PT/INR - 测量PT/INR - Meet PT-INR + + Push 22mg Nalbuphine - - Taking Blood Sample, - Odebírání vzorku krve - Prélè¨vement de sang, - Tomar muestra de sangre, - Prelievo campione di sangue, - Coletando amostra sanguínea, - Blutprobe entnehmen, - 血液サンプルを取得、 - 略低於正常INR - 采集血液样本, - Bloedstaal wordt genomen + + Pushing 22mg Nalbuphine - - Very high INR - INR velmi vysoké - INR très élevé - INR muy alto - INR molto alto - INR bem acima do normal - Sehr hoher INR - 正常INRよりかなり高い - INR 非常高 - INR非常高 - Zeer hoog INR + + 5ml Syringe / 22mg(84kg) Nalbuphine - - Very Low INR - INR velmi nízké - INR très bas - INR muy bajo - INR molto basso - INR bem abaixo do normal - Sehr niedriger INR - 正常INRよりかなり低い - INR 非常低 - INR非常低 - Zeer laag INR + + Push 24mg Nalbuphine - - Normal INR - INR normální - INR normal - INR normal - INR normale - INR normal - Normaler INR - 正常INR - 正常 INR - 正常INR - Normaal INR + + Pushing 24mg Nalbuphine - - Sligtly Above normal INR - INR mírně nad normálem - légèrement supérieur à l'INR normal - ligeramente por encima de INR normal - INR leggermente sopra la norma - INR ligeiramente acima do normal - Leicht über dem normalen INR - 正常INRより少し高い - 略高於正常 INR - 略高于正常INR - Lichtelijk boven normaal INR + + 5ml Syringe / 24mg(88kg) Nalbuphine - - Slightly Below Normal INR - INR mírně pod normálem - légèrement inférieur à l'INR normal - ligeramente por debajo del INR normal - INR leggermente sotto la norma - INR ligeiramente abaixo do normal - Etwas unter dem normalen INR - 正常INRより少し低い - 略低於正常 INR - 略低于正常INR - Lichtelijk onder normaal INR + + Push 26mg Nalbuphine - - Coag-Sense - Coag-Sense - Coag-Sense - Coag-Sense - Coag-Sense - Medidor de Coagulação - Coag-Sense - Coag-Sense - 凝血酶原監測系統(Coag-Sense) - 凝血酶原监测系统(Coag-Sense) - Coag-Sense + + Pushing 26mg Nalbuphine - - The Coag-Sense is a PT/INR monitoring system that can measure the efficiency of your blood clotting - Coag-Sense je monitorovací systém PT/INR, který dokáže sám měřit účinnost srážení krve - Le Coag-Sense est un système de surveillance PT/INR qui permet de mesurer l'efficacité de la coagulation sanguine - El Coag-Sense es un sistema de monitorización PT/INR que puede medir la eficiencia de su coagulación sanguínea - Il Coag-Sense è un sistema di monitoraggio PT/INR che può misurare l'efficienza della coagulazione del sangue. - O Medidor de Coagulação é um sistema de monitoramento PT/INR que pode mensurar a eficiência da sua coagulação sanguínea - Coag-Sense ist ein PT/INR-Überwachungssystem, das die Effizienz Ihrer Blutgerinnung messen kann - Coag-Senseは血液凝固の効率を測定できる PT/INR モニタリングシステムです。 - Coag-Sense 是一種 PT/INR 監測系統,可以測量您的凝血效率 - Coag-Sense是一种PT/INR监测系统,可以测量您的凝血效率 - De Coag-Sense is een PT-INR monitoringssysteem dat de effectiviteit van jouw wondstolling kan bepalen + + 5ml Syringe / 26mg(92kg) Nalbuphine - - Coag-Sense concludes: %1 - Ciag-Sense naměřil%1 - Le Coag-Sense a conclu : %1 - Coag-Sense concluye: %1 - Coag-Sense conclude: %1 - Medidor de Coagulação conlui: %1 - Coag-Sense kommt zu dem Ergebnis: %1 - Coag-Senseの結果: %1 - Coag-Sense 得出結論:%1 - Coag-Sense得出结论:%1 - Coag-Sense concludeerd: %1 + + Push 28mg Nalbuphine - - Perform Dialysis - Provést dialýzu - Effectuer une dialyse - Efectuar dialisis - Esegui Dialisi - Przeprowadź Dializę - Realizar Diálise - Провести Диализ - Dialyse durchführen - 투석 수행 - 透析を行う - 進行透析 - 进行透析 - Suorita dialyysi - Voer dialyse uit + + Pushing 28mg Nalbuphine - - Performing - Provádění dialýzy - Dialyse en cours - Efectuando - Eseguendo - Dializa w toku... - Realizando - Провожу - Durchführung - 수행 중 - 実施中 - 執行 - 表演 - esiintymässä - Wordt uitgevoerd + + 5ml Syringe / 28mg(96kg) Nalbuphine - - Encourages clot formation - Podporuje tvorbu sraženin - Favorise la formation de caillots - Favorece la coagulación - Favorisce la formazione di coaguli - Wspomaga powstawanie skrzepów - Intensifica a coagulação - Способствует образованию тромбов - Fördert die Gerinnungsbildung - 혈전 형성을 촉진합니다. - 血液凝固を促進し、出血を抑えます - 促進血液凝固 - 促进凝块形成 - Edistää hyytymien muodostumista - Bevorderd bloedstolling + + Push 30mg Nalbuphine - - EACA - EACA - Acide aminocaproïque - EACA - EACA (Acido aminocaproico Epsilon) - EACA - EACA - EACA - E-Aminocapronsäure - 아미노카프로산 - E-アミノカプロン酸 (EACA) - EACA - EACA - EACA - EACA + + Pushing 30mg Nalbuphine + + + 5ml Syringe / 30mg(100kg) Nalbuphine + + + Push 15mg(Analgesia) Ketamine + + + Pushing 15mg(Analgesia) Ketamine + + + 5ml Syringe / 15mg(60kg)(Analgesia) Ketamine + + + Push 20mg(Analgesia) Ketamine + + + Pushing 20mg(Analgesia) Ketamine + + + 5ml Syringe / 20mg(70kg)(Analgesia) Ketamine - - IV Epinephrine - IV Epinefrin - Epinéphrine IV - Epinefrina IV - Epinefrina IV - IV Epinephrine - アドレナリン静脈注射 (IV) - IV 腎上腺素 - IV肾上腺素 - IV Adrenaline + + Push 25mg(Analgesia) Ketamine - - IV Epinephrine - IV Epinefrin - Epinéphrine IV - Epinefrina IV - Epinefrina IV - IV Epinephrine - アドレナリン静脈注射 (IV) - IV 腎上腺素 - IV肾上腺素 - IV Adrenaline + + Pushing 25mg(Analgesia) Ketamine - - General Anesthetic - Obecná anestetika - Anesthésie générale - Anestesia general - Anestesia generale - Anestetyk - Anestésico Geral - Общий анестетик - Allgemeines Anästhetikum - 일반적인 마취제 - 全身麻酔 - 全身麻醉 - 全身麻醉 - Yleinen anestesia - Algemeen anestheticum + + 5ml Syringe / 25mg(80kg)(Analgesia) Ketamine - - Used as a general anesthetic for surgical procedures - Používá se jako obecné anestetikum pro chirurgické zákroky - Utilisé comme un anesthésique général pour les procédures chirurgicales - Usado como anestesia general para procedimientos quirúrgicos - Usato come anestetico generale per procedure chirurgiche - Stosowany jako znieczulenie ogólne do zabiegów chirurgicznych - Usado como um anestésico geral para procedimentos cirúrgicos - Используется в качестве общего анестетика при хирургических процедурах - Wird als allgemeines Anästhetikum bei chirurgischen Eingriffen verwendet - 수술 시 전신 마취제로 사용됩니다. - 外科的処置のための全身麻酔薬として使用される - 用作外科手術的全身麻醉劑 - 用作外科手术的全身麻醉剂 - Käytetään yleisanestesiana kirurgisissa toimenpiteissä - Wordt gebruikt als algemeen anestheticum voor chirurgische procedures + + Push 30mg(Analgesia) Ketamine - - Push Etomidate - Vstříknout etomidát - Administrer de l'étomidate - Administrar Etomidato - Iniettare Etomidato - Wstrzyknij Etomidat - Injetar Etomidato - Ввести Этомидат - Verabreiche Etomidat - 에토미데이트 투여 - エトミデートを注入 - 注射依托咪酯 - 推注依托咪酯 - Työnnä etomidaattia - Injecteer Etomidaat + + Pushing 30mg(Analgesia) Ketamine - - Etomidate - Etomidát - Étomidate - Etomidato - Etomidato - Etomidat - Etomidato - Этомидат - Etomidat - 에토미데이트 - エトミデート - 依托咪酯 - 依托咪酯 - Etomidaatti - Etomidaat + + 5ml Syringe / 30mg(90kg)(Analgesia) Ketamine - - Fentanyl - Fentanyl - Fentanyl - Fentanilo - Fentanil - Fentanyl - Fentanil - Фентанил - Fentanyl - 펜타닐 - フェンタニル - 芬太尼 (Fentanyl) - 芬太尼 - fentanyyli - Fentanyl + + Push 35mg(Analgesia) Ketamine - - Opioid analgesic, used to suppress severe pain - Opioidní analgetikum, používané k potlačení silné bolesti - Analgésique opioïde, utilisé pour supprimer les douleurs sévères - Analgésico opioide, utilizado para suprimir el dolor severo - Analgesico oppioide, usato per sopprimere il dolore severo - Opioidowy środek przeciwbólowy, stosowany do tłumienia silnego bólu - Opioid-Analgetikum zur Unterdrückung starker Schmerzen - オピオイド鎮痛薬、 重度の痛みを抑えるのに使用される - 阿片類鎮痛藥,用於抑制劇烈疼痛 - 阿片类镇痛药,用于抑制剧烈疼痛 - Opïode analgeticum, wordt gebruikt om ernstige pijn te onderdrukken + + Pushing 35mg(Analgesia) Ketamine - - Counter to Lorazepam - Proti Lorazepamu - Lutte contre le lorazépam - Contrarresta el Lorazepam - Antagonista del Lorazepam - Środek wybudzający z Lorazepamu - Antídoto para Lorazepam - Противодействие к Лоразепаму - Antagonist zu Lorazepam - 로라제팜의 반대 약물 - ロラゼパムへの拮抗薬 - 用於對抗勞拉西泮 - 用于对抗劳拉西泮 - Loratsepaamin vastainen - Antagonist van Lorazepam + + 5ml Syringe / 35mg(100kg)(Analgesia) Ketamine - - Used to bring patients out of sedation - Používá se k přivedení pacientů ze sedace - Utilisé pour sortir les patients de sédation - Usado para sacar a los pacientes de la sedación - Usato per portare i pazienti fuori dalla sedazione - Służy do wyprowadzania pacjentów z sedacji - Usado para tirar os pacientes da sedação - Используется для выведения пациентов из состояния комы - Wird verwendet, um Patienten aus der Sedierung zu holen - 환자를 진정 상태에서 벗어나게 하는 데 사용됩니다. - 患者を鎮静状態から解放するために使用 - 用於使患者脫離鎮靜狀態 - 用于使患者脱离镇静状态 - Käytetään potilaiden poistamiseen sedaatiosta - Wordt gebruikt om patiënten uit sedatie te halen + + Push 40mg(Analgesia) Ketamine - - Push Flumazenil - Vstříknout Flumazenil - Administrer du flumazénil - Administrar Flumazenil - Iniettare Flumazenil - Wstrzyknij Flumazenil - Injetar Flumazenil - Ввести Флумазенил - Verabreiche Flumazenil - 플루마제닐 투여 - フルマゼニルを注入 - 注射氟馬西尼 - 推注氟马西尼 - Paina flumatseniiliä - Injecteer Flumazenil + + Pushing 40mg(Analgesia) Ketamine - - Flumazenil - Flumazenil - Flumazénil - Flumazenil - Flumazenil - Flumazenil - Flumazenil - Флумазенил - Flumazenil - 플루마제닐 - フルマゼニル - 氟馬西尼 - 氟马西尼 - Flumatseniili - Flumazenil + + 5ml Syringe / 40mg(Analgesia) Ketamine - - Use CWMP - Použít BBL - Utiliser le PMBC - Usar Comprimidos de Combate - Usa il Pacchetto di Pillole da Combattimento (CWMP) - Utilizar Comprimidos de Combate - CWMP verwenden - 戦闘傷病治療薬(CWMP)を投与 - 使用 CWMP*(戰鬥藥物) - 使用 CWMP*(战斗药物) - Gebruik Gevechtspillendoosje + + Push 20mg(Sedation) Ketamine - - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO - FAST IO + + Pushing 20mg(Sedation) Ketamine - - Intraosseous Needle - Intraoseální jehla - Cathéther intra-osseux - Catéter Intraóseo - Sistema d'infusione intraossea - Igła doszpikowa - Infusão Intraóssea - Внутривенная игла - Intraossäre Kanüle - 골내 주사 바늘 - 経骨髄注射 (IO) 針 - 骨髓注射(IO)針頭 - 骨髓注射(IO)针头 - Ağrıyı bastırmak için kullanılır - Luonsisäinen neula - Intraossale canule + + 5ml Syringe / 20mg(Sedation) Ketamine - - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV - 16г IV - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV - 16g IV + + Push 40mg(Sedation) Ketamine - - IV/IO drop time - Čas vypadnutí IV/IO - Temps de chute de l'IV/IO - Tiempo de caida de IV/IO - Tempo di staccamento IV/IO - Czas do wypadnięcia IV/IO - Tempo de queda de IV/IO - Время выпадения IV/IO - IOs/IVs Herausfallzeit - IV/IO를 떼어내는 시간 - IV/IO脱落までの時間 - 靜脈/骨內注射脫落時間 - IV/IO 脱落时间 - IV/IO pudotusaika - IV/IO uitvaltijd + + Pushing 40mg(Sedation) Ketamine - - Enables IV/IO drop times - Povolit čas vypadnutí pro IV/IO - Activer les délais d'attente pour les IV/IO - Habilitar los tiempos de caída de IV/IO - Abilitare i tempi di staccamento IV/IO - Włącz wypadanie IV/IO - Habilita tempo de queda de IV/IO - Включает время сброса IV/IO - Aktiviert das herausfallen von IOs/IVs - IV/IO를 떼어내는 시간 활성화 - IV/IOの時間経過での脱落を有効化 - 啟用 IV/IO 的脫落時間 - 启用 IV/IO 的脱落时间 - IV/IO bırakma sürelerini etkinleştir - Mahdollistaa IV/IO-pudotusajat - Schakel IV/IO uitvaltijd in + + 5ml Syringe / 40mg(Sedation) Ketamine + + + Push 60mg(Anesthesia) Ketamine + + + Pushing 60mg(Anesthesia) Ketamine + + + 5ml Syringe / 60mg(Anesthesia) Ketamine + + + Push 80mg(Anesthesia) Ketamine + + + Pushing 80mg(Anesthesia) Ketamine + + + 5ml Syringe / 80mg(Anesthesia) Ketamine + + + Push 100mg(Anesthesia) Ketamine + + + Pushing 100mg(Anesthesia) Ketamine + + + 5ml Syringe / 100mg(Anesthesia) Ketamine + + + Push 7.5mg EACA + + + Pushing 7.5mg EACA + + + 5ml Syringe / 7.5mg EACA + + + Push 15mg EACA - - Changes the time at which IVs/IOs fall out of a patient - Změní čas po kterém samovolně vypadnou IV/IO z pacienta - Temps au bout du quel l'IV/IO tombe du patient - Cambia el tiempo en el que las IVs/IOs se caen de un paciente - Cambia il tempo in cui le IV/IO si staccano da un paziente - Czas samoistnego wypadnięcia IV/IO z pacjenta - Altera o tempo em que IVs/IOs caem de um paciente - Изменяет время выпадения IV/IO капельниц у пациента - Ändert den Zeitpunkt, nachdem IVs/IOs aus einem Patienten herausfallen - IV/IO가 환자에게서 떼지는 시간 변경 - 患者からIV/IOが抜け落ちるのにかかる時間を設定します - IVs/IOs 脫落的時間 - IVs/IOs 脱落的时间 - IV'lerin/IO'ların bir hastadan düştüğü zamanı değiştirir - Muuttaa aikaa, jolloin IVs/IO - Veranderd de benodigde uitvaltijd voor IV's/IO's + + Pushing 15mg EACA - - Intravenous Needle - Nitrožilní jehla - Cathéther intra-veineux - Catéter Intravenoso - Catetere intravenoso - Kaniula dożylna (wenflon) - Cateter Intravenoso - Внутривенная игла - Intravenöse Kanüle - 정맥 주사 바늘 - 経静脈注射 (IV) 針 - 靜脈注射(IV)針頭 - 静脉注射(IV)针头 - Ağrıyı bastırmak için kullanılır - Laskimonsisäinen neula - intraveneuze canule + + 5ml Syringe / 15mg EACA - - Sets if IV/IO needles are reusable - Nastaví, zda IV/IO jehly jsou znovu-použitelné - IV/IO réutilisables ? - Establece si las IV/IO son reutilizables - Imposta se gli aghi IV/IO sono riutilizzabili - Czy igły IV/IO są do ponownego użytku - Define se as agulhas IV/IO são reutilizáveis - Устанавливает, можно ли использовать иглы IV/IO повторно - Ändert ob IVs/IOs wiederverwendbar sind - IV/IO 바늘 재사용 가능 여부 - IV/IO針を再利用可能にする - 如果 IV/IO 注射針頭是可重複使用的, 則應啟用。 - 如果 IV/IO 注射针头是可重复使用的, 则应启用。 - IV/IO iğnelerinin yeniden kullanılabilir olup olmadığını ayarlar - Asettaa, jos IV/IO-neulat ovat uudelleenkäytettäviä - Bepaald of IV/IO naalden herbruikbaar zijn + + Push 25mcg Phenylephrine - - Patient's IV is clear - IV pacienta je čistá - L'IV du patient est dégagée - La IV del paciente esta funcionando correctamente - La IV del paziente è pulita - IV jest drożne - IV do paciente está funcionando corretamente - Капельница пациента чиста - Die IV des Patienten ist durchgängig - 환자의 IV가 정상 - 患者のIVはクリアです - 患者的IV是乾淨的 - 患者的IV是干净的 - Potilaan IV on selvä - Patiënt's IV is niet geblokkeerd + + Pushing 25mcg Phenylephrine - - Patient's IV is blocked - IV pacienta je blokována - L'IV du patient est bloquée - La IV del paciente esta bloqueada - La IV del paziente è ostruita/bloccata - IV jest zablokowane - IV do paciente está bloqueado - Капельница пациента заблокирована - Die IV des Patienten ist blockiert - 환자의 IV가 막힘 - 患者のIVは閉塞している - 患者的IV受到阻塞 - 患者的IV受到阻塞 - Potilaan IV on tukossa - Patiënt's IV is geblokkeerd + + 5ml Syringe / 25mcg Phenylephrine - - Inspect Catheter - Zkontrolovat katetr - Inspecter le cathéter - Inspeccionar Catéter - Ispeziona il catetere - Sprawdź IV - Inspecionar cateter - Осмотрите катетер - Katheter untersuchen - 카테터 검사 - カテーテルを検査する - 檢查導管 - 检查导管 - Tarkista katetri - Inspecteer canule + + Push 50mcg Phenylephrine - - Ketamine - Ketamin - Kétamine - Ketamina - Ketamina - Ketamina - Cetamina - Кетамин - Ketamin - 케타민 - ケタミン - 氯胺酮 (Ketamine) - 氯胺酮 - Ketamiini - Ketamine + + Pushing 50mcg Phenylephrine - - Dissociative anesthetics, used to suppress severe pain - Disociativní analgetikum, používané k potlačení silné bolesti - Anesthésiques dissociatifs, utilisés pour supprimer les douleurs sévères - Anestésico disociativo, utilizado para suprimir el dolor severo - Anestetici dissociativi, usati per sopprimere il dolore severo - Dissoziative Anästhetika zur Unterdrückung starker Schmerzen - 解離性麻酔薬、 重度の痛みを抑えるのに使用される - 解離性麻醉劑,用於抑制劇烈疼痛 - 解离性麻醉剂,用于抑制剧烈疼痛 - Dissociatieve anestheticum, wordt gebruikt om ernstige pijn te onderdrukken + + 5ml Syringe / 50mcg Phenylephrine - - Lidocaine - Lidokain - Lidocaïne - Lidocaína - Lidocaina - Lidokaina - Lidocaína - Лидокаин - Lidocain - 리도카인 - リドカイン - 利多卡因 (Lidocaine) - 利多卡因 - Lidokain - Lidokaiini - Lidocaïne + + Push 100mcg Phenylephrine - - Used to combat cardiac arrest - Používá se k léčení srdeční zástavy - Antiarythmique utilisé pour combattre les formes choquables arrêt cardiaque. - Se utiliza para combatir un paro cardiaco - Usato per combattere l'arresto cardiaco - Używany do zwalczania zatrzymania akcji serca - Usado para combater a parada cardíaca - Используется для борьбы с остановкой сердца - Einsatz zur Bekämpfung des Herzstillstands - 심장 마비 퇴치를 위해 사용 - 心停止に対応する為に使用される - 用於對抗心臟驟停 - 用于对抗心脏骤停 - Kalp durmasıyla mücadele için kullanılır - Käytetään sydämenpysähdyksen torjuntaan - Wordt gebruikt om hartstilstand te bestrijden + + Pushing 100mcg Phenylephrine - - Sedtation medication - Sedativa - Médicament de sédation - Fármaco sedante - Farmaco sedativo - Środek usypiający - Medicamento sedativo - Седативное средство - Sedierungsmittel - 진정성 약물 - 鎮静薬 - 鎮靜藥物 - 镇静药物 - Rauhoittava lääkitys - Sedatiemiddel + + 5ml Syringe / 100mcg Phenylephrine - - Used to sedate patients and prepare them for surgery - Používá se k uklidnění pacientů a přípravě na operaci - Utiliser pour sédater les patients et les préparer pour une opération - Usado para sedar pacientes y preparalos para cirugía - Usato per sedare i pazienti e prepararli per un intervento chirurgico - Służy do uspokajania pacjentów i przygotowywania ich do operacji - usypia - Usado para sedar pacientes e prepará-los para a cirurgia - Используется для успокоения пациентов и подготовки их к операции - Zur Sedierung von Patienten und zur Vorbereitung auf eine Operation - 환자를 진정시키고 수술 준비를 하는 데 사용됩니다. - 患者を鎮静させ、手術の準備をするために使用される - 用於鎮靜患者並為手術做好準備 - 用于镇静患者并为手术做好准备 - Käytetään potilaiden rauhoittamiseen ja valmistelemiseen leikkausta varten - Wordt gebruikt om patiënten te sederen en ze voor te bereiden voor een operatie + + Push 100mg Amiodarone - - Push Lorazepam - Vstříknout Lorazepam - Administrer du lorazépam - Administrar Lorazepam - Iniettare Lorazepam - Wstrzyknij Lorazepam - Injetar Lorazepam - Ввести Лоразепам - Verabreiche Lorazepam - 로라제팜 투여 - ロラゼパムを注入 - 注射勞拉西泮 - 推注劳拉西泮 - Paina loratsepaamia - Injecteer Lorazepam + + Pushing 100mg Amiodarone - - Lorazepam - Lorazepam - Lorazépam - Lorazepam - Lorazepam - Lorazepam - Lorazepam - Лоразепам - Lorazepam - 로라제팜 - ロラゼパム - 勞拉西泮 - 劳拉西泮 - Loratsepaami - Lorazepam + + 5ml Syringe / 100mg Amiodarone - - Nalbuphine - Nalbufin - Nalbuphine - Nalbufina - Nalbufina (Nubain) - Nalbufina - Nalbufina - Налбуфин - Nalbuphin - 날부핀 - ナルブフィン - 納布啡 (Nalbuphine) - 纳布啡 - Nalbufiini - Nalbufine + + Push 150mg Amiodarone - - Opioid analgesic, used to suppress moderate pain - Opioidní analgetikum, používané k potlačení střední bolesti - Analgésique opioïde, utilisé pour supprimer les douleurs modérées - Analgésico opioide, utilizado para suprimir el dolor moderador - Analgesico oppioide, usato per sopprimere il dolore moderato - Opioidowy środek przeciwbólowy, stosowany do tłumienia umiarkowanego bólu - Opioid-Analgetikum zur Unterdrückung mäßiger Schmerzen - オピオイド鎮痛薬、 中程度の痛みを抑えるのに使用される - 阿片類鎮痛藥,用於抑制中度疼痛 - 阿片类镇痛药,用于抑制中度疼痛 - Opïode analgeticum, wordt gebruikt om matige pijn te onderdrukken + + Pushing 150mg Amiodarone - - Naloxone - Naloxon - Naloxone - Naloxona - Naloxone - Nalokson - Naloxona - Налоксон - Naloxone - 날록손 - ナロキソン - 納洛酮 (Naloxone) - 纳洛酮 - Nalokson - naloksoni - Naloxone + + 5ml Syringe / 150mg Amiodarone + + + Push 300mg Amiodarone + + + Pushing 300mg Amiodarone + + + 5ml Syringe / 300mg Amiodarone + + + Push 40mg Lidocaine + + + Pushing 40mg Lidocaine + + + 5ml Syringe / 40mg Lidocaine + + + Push 60mg Lidocaine + + + Pushing 60mg Lidocaine + + + 5ml Syringe / 60mg Lidocaine + + + Push 80mg Lidocaine + + + Pushing 80mg Lidocaine + + + 5ml Syringe / 80mg Lidocaine + + + Push 100mg Lidocaine + + + Pushing 100mg Lidocaine - - Used to reverse opioid overdoses - Používá se ke zvrácení předávkování opioidy - Utilisé pour traiter les overdoses d'opiacés - Usado para tratar las sobredosis de opiáceos - Usato per trattare le overdose da oppiacei - Używany do zwalczania przedawkowania opioidów - Usado para reverter overdoses de opioides - Используется для устранения передозировок опиоидами. - Zur Umkehrung einer Opioid-Überdosis - 아편유사제 과다 복용을 역전시키는 데 사용 - オピオイド過剰摂取を元に戻すために使用される - 用於逆轉阿片類藥物的過量使用 - 用于逆转阿片类药物的过量使用 - Opioid aşırı dozlarını tersine çevirmek için kullanılır - Käytetään opioidien yliannostusten kumoamiseen - Wordt gebruikt om opïode overdossisen tegen te gaan + + 5ml Syringe / 100mg Lidocaine - - Nitroglycerin - Nitroglycerin - Nitroglycérine - Nitroglicerina - Nitroglicerina - Nitrogliceryna - Nitroglicerina - Нитроглицерин - Nitroglycerin - 니트로글리세린 - ニトログリセリン - 硝化甘油 (Nitroglycerin) - 硝化甘油 - Nitrogliserin - Nitroglyseriini - Nitroglycerine + + Inject 40mg Lidocaine (SubQ) - - Used to lower blood pressure - Používáno ke snížení krevního tlaku - Utilisé pour diminuer la pression artérielle - Se utiliza para bajar la presión arterial - Usato per abbassare la pressione sanguigna - Używana do obniżenia ciśnienia krwi - Usado para baixar a pressão arterial - Используется для снижения артериального давления - Zur Senkung des Blutdrucks - 혈압을 낮추는 데 사용 - 血圧を下げるために使用される - 用於降低血壓 - 用于降低血压 - Kan basıncını düşürmek için kullanılır - Käytetään alentamaan verenpainetta - Wordt gebruikt om de bloeddruk te laten dalen + + Injecting 40mg Lidocaine (SubQ) - - Norepinephrine - Norepinefrin - Noradrénaline - Norepinefrina - Norepinefrina - Noradrenalina - Norepinefrina - Норадреналин - Noradrenalin - 노르에피네프린 - ノルアドレナリン - 去甲腎上腺素 (Norepinephrine) - 去甲肾上腺素 - Norepinefrin - Norepinefriini - Noradrenaline + + 10ml Syringe / 40mg(SubQ) Lidocaine - - Used to raise blood pressure - Používáno ke zvýšení krevního tlaku - Utilisé pour remonter la pression artérielle - Se utiliza para subir la presión arterial - Usato per aumentare la pressione sanguigna - Używana do podniesienia ciśnienia krwi - Usado para aumentar a pressão arterial - Используется для повышения артериального давления - Wird zur Erhöhung des Blutdrucks verwendet - 혈압을 높이는 데 사용 - 血圧を上げるために使用される - 用於提高血壓 - 用于提高血压 - Kan basıncını yükseltmek için kullanılır - Käytetään verenpaineen nostamiseen - Wordt gebruikt om de bloeddruk te verhogen + + Push 1mg Lorazepam - - Combat Pill Pack - Bojový Balíček Léčiv - Pack de Pilules de combat - Paquete de Comprimidos de Combate - Pacchetto di Pillole da Combattimento - Comprimidos de Combate - Schmerzmittel - 戦闘治療薬パック(CWMP) - 戰鬥止痛藥 (PainKiller) - 战斗药丸包 - Gevechtspillendoosje + + Pushing 1mg Lorazepam - - Combat Wound Medication Pill Pack<br/>Used to suppress minor pain and relieve blood incompatibility symptoms - Boový Balíček Léčiv na zranění v boji<br/>Používá se k potlačení mírné bolesti a zmírnění příznaků inkompatibility krve - Pack de Pilules Médicales pour Blessures de Combat </br> Utilisé pour supprimer les douleurs mineures et soulager les symptômes d'incompatibilité sanguine. - Paquete de medicación para heridas de combate. Se utiliza para suprimir el dolor leve y aliviar los síntomas de incompatibilidad sanguínea - Pacchetto di Pillole per Medicazioni da Combattimento<br/>Usato per sopprimere il dolore lieve e alleviare i sintomi di incompatibilità del sangue - Schmerzmittel<br/>Wird zur Unterdrückung leichter Schmerzen und zur Linderung von Blutunverträglichkeitssymptomen verwendet - 戦闘傷病治療薬パック(CWMP)<br/>軽度の痛みを抑え、血液不適合による症状を緩和するために使用される - 戰鬥傷口藥物藥丸包<br/>用於抑制輕微疼痛和緩解血液不相容症狀 - 战斗伤口药物药丸包<br/>用于抑制轻微疼痛和缓解血液不相容症状 - Gevechts wond medicatie pil pak<br/>Wordt gebruikt om milde pijn en bloed incompatibiliteit op te lossen + + 5ml Syringe / 1mg(60kg) Lorazepam - - Volatile anesthetic, used to suppress moderate pain - Těkavé anestetikum používané k potlačení střední bolesti - Anesthésique volatil, utilisé pour supprimer les douleurs modérées - Anestésico inhalable, utilizado para suprimir el dolor moderado - Anestetico volatile, usato per sopprimere il dolore moderato - Flüchtiges Anästhetikum zur Unterdrückung mäßiger Schmerzen - 揮発性麻酔薬、 中程度の痛みを抑えるのに使用される - 揮發性麻醉劑,用於減輕中度疼痛 - 挥发性麻醉剂,用于抑制中度疼痛 - volatiel anestheticum, wordt gebruik om stevige pijn te onderdrukken + + Push 1.2mg Lorazepam - - Penthrox Inhaler - Penthrox Inhalátor - Inhalateur de Penthrox - Inhalador Penthrox - Inalatore Penthrox - Inalador de Penthrox - Ингалятор Пентрокс - Penthrox-Inhalator - 펜트록스 흡입기 - ペンスロックス吸入器 - Penthrox 吸入器 - Penthrox吸入器 - Penthrox inhalaattori - Penthrox inhalator + + Pushing 1.2mg Lorazepam - - Performance enhancing drug, used to suppress moderate pain - Droga zvyšující výkon, používaná k potlačení střední bolesti - Drogue améliorant les performances, utilisée pour supprimer les douleurs modérées - Fármaco para mejorar el rendimiento, utilizado para suprimir el dolor moderado - Farmaco migliorante le prestazioni, utilizzato per sopprimere il dolore moderato - Środek zwiększający wydolność, stosowany do tłumienia umiarkowanego bólu - Leistungssteigerndes Medikament zur Unterdrückung mäßiger Schmerzen - 疲労の防止と回復に! 疲労をポンと取ってくれます。 中程度の鎮痛作用がある。 - 性能增強藥物,用於抑制中度疼痛 - 性能增强药物,用于抑制中度疼痛 - Prestatieverhogend medicijn, wordt gebruikt om matige pijn te onderdrukken + + 5ml Syringe / 1.2mg(64kg) Lorazepam - - Pervitin capsule - Pervitinová kapsle - Capsule de pervitine - Capsula de pervitina - Capsula di Pervitin - Pervitin - Cápsula de Pervitin - Капсула Первитина - Pervitin Kapsel - 페르피틴 알약 - ペルビチンカプセル - 柏飛汀(Pervitin)膠囊 - 柏飞汀(Pervitin)胶囊 - Pervitiini kapseli - Pervitin capsule + + Push 1.4mg Lorazepam - - You start to see everything twice. - Začínáš vše vidět dvojitě - Vous commencez à voir tout en double - Empiezas a ver todo doble - Inizi a vedere tutto due volte. - Zaczynasz widzieć podwójnie - Você começa a ver em dobro. - Ты начинаешь видеть все дважды. - Du siehst alles doppelt. - 모든 게 두 개로 보이기 시작한다. - 全てが二重に見える。 - 你開始看到一切兩次。 - 你开始看到一切两次。 - Alat nähdä kaiken kahdesti. - Je begint met alles dubbelzien + + Pushing 1.4mg Lorazepam - - You start to twitch... - Začínáš sebou škubat... - Vous commencez à trembler... - Comienzas a temblar - Inizi a tremare... - Zaczynasz drżeć - Você começa a tremer na base... - Ты начинаешь дергаться... - Du fängst an zu zucken... - 경련이 멈추지 않는다... - 身体の震えが止まらなくなった... - 你開始抽搐。。。 - 你开始抽搐。。。 - Alkaa nykimään - Je begint te trillen + + 5ml Syringe / 1.4mg(68kg) Lorazepam - - Your head starts to clear up and you stop twitching... - Začíná se ti vyjasňovat a přestáváš sebou škubat... - Vos idées commencent à s'éclaircir et vous arrêtez de trembler... - Empiezas a tener la cabeza despejada y dejas de temblar - La tua testa inizia a schiarirsi e smetti di tremare... - Twoja głowa zaczyna się oczyszczać i przestajesz drżeć... - Sua cabeça começa a clarear e você pára de tremer... - Твоя голова начинает проясняться, и ты перестаешь дергаться... - Dein Kopf wird klarer und du hörst auf zu zucken... - 정신이 맑아지기 시작하고 경련이 멈추었다... - 震えがおさまり、頭がすっきりしてきた - 你的頭開始清醒,不再抽搐。。。 - 你的头开始清醒,不再抽搐。。。 - Pääsi alkaa selkiytyä ja lopetat nykimisen - Je hoofd begint zich op te helderen, en je stopt met trillen + + Push 1.6mg Lorazepam - - You start to feel normal again - Opět se začínáš cítit normálně - Vous commencez à vous sentir à nouveau normal - Comienzas a sentirte bien de nuevo - Inizi a sentirti di nuovo normale - Zaczynasz czuć się normalnie - Você começa a se sentir normal novamente - Ты снова начинаешь чувствовать себя нормально - Du beginnst dich wieder normal zu fühlen. - 몸이 다시 원상태로 돌아오기 시작한다 - 身体は元の落ち着きを取り戻した - 你又開始感覺正常了 - 你又开始感觉正常了 - Alkaa taas tuntua normaalilta - Je begint je weer normaal te voelen + + Pushing 1.6mg Lorazepam - - You begin to lose your breath... - Ztrácíš dech... - Vous commencez à perdre votre souffle... - Empiezas a perder el aliento - Stai iniziando a perdere fiato... - Zaczynasz czuć zadyszkę... - Você começa a perder o fôlego... - У тебя начинает перехватывать дыхание... - Deine Kraft lässt langsam nach... - 숨을 쉬기 힘들어진다... - あなたは急に息苦しさを感じはじめた... - 你開始喘不過氣來。。。 - 你开始喘不过气来。。。 - Alkaa menettää hengitystä... - Je begint je adem te verliezen... + + 5ml Syringe / 1.6mg(72kg) Lorazepam - - You gain a sudden rush! - Dostal jsi se do rauše! - Vous sentez un élan soudain ! - ¡Te entra un subidon repentino! - Ottieni una corsa improvvisa! - Zyskujesz nagły skok energii! - Você sente uma ânimo repentino! - Ты получаешь внезапный прилив сил! - Du bekommst einen spontanen Rush... - 갑자기 심하게 두근거린다! - あなたを突如激しい動悸が襲う! - 你突然衝動起來! - 你突然冲动起来! - Saat äkillisen kiireen! - Je krijgt een spontane boost! + + Push 1.8mg Lorazepam - - You gain another rush! - Dostal jsi se do dalšího rauše! - Vous sentez un autre élan ! - ¡Te entra otro subidon! - Ottieni un'altra corsa improvvisa! - Zyskujesz nagły skok energii! - Você sente um ânimo novamente! - Ты получаешь еще один прилив сил! - Du bekommst einen weiteren Rush... - 두근거림이 더 격렬해진다! - 動悸は激しさを増してゆく! - 你獲得了另一個衝刺! - 你获得了另一个冲刺! - Saat uuden kiireen! - Je krijgt nog een boost! + + Pushing 1.8mg Lorazepam - - The exhaustion starts to settle in... - Začíná se projevovat vyčerpání... - L'épuisement commence à se faire sentir... - El agotamiento comienza a sentirse... - La stanchezza inizia a farsi sentire... - Zmęczenie zaczyna narastać... - Você começa a sentir a exaustão... - Усталость начинает наваливаться на меня... - Die Erschöpfung macht sich breit ... - 두근거림이 가라앉으려 한다... - 動悸が落ち着き始めた... - 疲憊開始消退。。。 - 疲惫开始消退。。。 - Väsymys alkaa laskeutua... - Je begint in te zakken + + 5ml Syringe / 1.8mg(76kg) Lorazepam + + + Push 2mg Lorazepam + + + Pushing 2mg Lorazepam + + + 5ml Syringe / 2mg(80kg) Lorazepam + + + Push 2.2mg Lorazepam + + + Pushing 2.2mg Lorazepam + + + 5ml Syringe / 2.2mg(84kg) Lorazepam + + + Push 2.4mg Lorazepam + + + Pushing 2.4mg Lorazepam + + + 5ml Syringe / 2.4mg(88kg) Lorazepam + + + Push 2.6mg Lorazepam + + + Pushing 2.6mg Lorazepam + + + 5ml Syringe / 2.6mg(92kg) Lorazepam - - The pervitin makes you feel awake and full of endless POWER - Díky pervitinu se cítíš bdělý a plný nekonečné SÍLY - La pervitine vous fait vous sentir éveillé et plein d'une puissance INFINIE - La pervitina hace que te sientas despierto y con una capacidad infinita de ENERGIA - Il Pervitin ti fa sembrare più attento e dotato di una forza senza uguali - Pervitin sprawia, że czujesz się pobudzony i pełny ENERGII - O Pervitin faz você se sentir acordado e cheio de poder INFINITO - Первитин заставляет вас чувствовать себя бодрым и полным бесконечной СИЛЫ - Das Pervitin macht dich wach und du fühlst dich durchflutet mit unendlich POWER - 페르피틴이 당신을 깨어있게 하고 끝없는 빠와로 가득 차게 합니다 - ペルビチンはあなたを覚醒させ、無限のチカラに満ち満ちた気分にしている! - 柏飛汀(Pervitin)讓你感到清醒,充滿無盡的力量 - 柏飞汀(Pervitin)让你感到清醒,充满无尽的力量 - Pervitiini saa sinut tuntemaan olosi hereille ja täynnä loputonta VOIMAA - De Pervitin geeft je een wakker gevoel vol met oneinde ENERGIE + + Push 2.8mg Lorazepam - - Phenylephrine Autoinjector - Fenylefrinový Autoinjektor - Autoinjecteur de Phényléphrine - Autoinyector de Fenilefrina - Autoiniettore di Fenilefrina - Autoinjetor de Fenilefrina - Автоинъектор фенилэфрина - Phenylephrin-Autoinjektor - フェニレフリン自動注射器 - 去氧腎上腺素自動注射器 (Phenylephrine) - 苯肾上腺素自动注射器 - Fenylefrine autoinjector + + Pushing 2.8mg Lorazepam - - Used to raise blood pressure - Používá se ke zvýšení krevního tlaku - Utilisé pour augmenter la pression artérielle - Usato per aumentare la pressione sanguigna - Wird zur Erhöhung des Blutdrucks verwendet - 血圧を上げるために使用される - 用於升高血壓 - 用于提高血压 + + 5ml Syringe / 2.8mg(96kg) Lorazepam - - Phenylephrine - Fenylefrin - Phényléphrine - Fenilefrina - Fenilefrina - Fenylefryna - Fenilefrina - Фенилэфрин - Phenylephrin - 페닐에프린 - フェニレフリン - 去氧腎上腺素 (Phenylephrine) - 苯肾上腺素 - Fenilefrin - Fenyyliefriini - Fenylefrine + + Push 3mg Lorazepam - - Used to raise blood pressure - Používáno ke zvýšení krevního tlaku - Utilisé pour remonter la pression artérielle - Se utiliza para subir la presión arterial - Usato per aumentare la pressione sanguigna - Używana do podniesienia ciśnienia krwi - Usado para aumentar a pressão arterial - Используется для повышения артериального давления - Wird zur Erhöhung des Blutdrucks verwendet - 혈압을 높이는 데 사용 - 血圧を上げるために使用される - 用於提高血壓 - 用于提高血压 - Kan basıncını yükseltmek için kullanılır - Käytetään verenpaineen nostamiseen - Wordt gebruikt om de bloeddruk te verhogen + + Pushing 3mg Lorazepam - - Pushing - Aplikuji - Administration - Administrando - Iniettando - Wstrzykiwanie - Administrando - Ввести - Verabreichen - 투여 중 - 注入中 - 使用中 - 使用中 - Kullanılıyor - Työntää - Wordt geïnjecteerd + + 5ml Syringe / 3mg(100kg) Lorazepam - - Remove IV/IO - Odstraňuji IV - Retirer IV/IO - Retirar IV/IO - Rimuovi IV/IO - Zdejmij IV/IO - Remover IV/IO - Удалить IV/IO - IV/IO entfernen - IV/IO 제거 - IV/IOを抜去 - 移除 IV/IO - 移除 IV/IO - IV/IO'yu kaldır - Poista IV/IO - Verwijder IV/IO + + Push 0.1mg Flumazenil - - Removing IV/IO - Odstraňuji - Retrait - Retirando - Rimuovendo - Zdejmowanie - Removendo - Удаление IV/IO - Entferne - 제거 중 - IV/IOを抜去中 - 移除中 - 移除中 - Kaldırma - IV/IO poisto - IV/IO wordt verwijderd + + Pushing 0.1mg Flumazenil - - Reorienting - Reoritentuji - Stimulation - Abofeteando - Stimolando - Cucenie - Reorientando - Переориентация - Umorientieren - 깨우는 중 - 刺激しています - 刺激中... - 刺激中... - Yeniden yönlendirme - Suuntaa uudelleen - Aan het heroriënteren + + 5ml Syringe / 0.1mg Flumazenil - - Patient woke up with a hard hit! - Pacient se probudil po silném úderu! - Le patient s'est réveillé avec un coup dur ! - ¡El paciente se despertó con tremendo bofetón! - Il paziente si è svegliato con un duro colpo! - Pacjent obudził się z mocnym uderzeniem! - O bofetão acorda o paciente! - Пациент проснулся от сильного удара! - Patient wachte mit einem harten Schlag auf! - 환자는 강한 타격으로 깨어났습니다! - 患者は強打で飛び起きた! - 患者甦醒了! - 患者苏醒了! - Hasta sert bir vuruşla uyandı! - Potilas heräsi kovalla iskulla! - Patiënt werd wakker na een harde klap! + + Push 0.2mg Flumazenil - - You hit the cheek, but patient still asleep! - Udeřil jsi do tváře, ale pacient stále spí! - Vous avez frappé la joue, mais le patient est encore endormi! - ¡Cacheteaste el paciente pero sigue dormido! - Hai colpito la guancia, ma il paziente dorme ancora! - Uderzyłeś w policzek, ale pacjent nadal śpi! - Após a bofetada, o paciente continua desacordado! - Вы уларили по щеке, но больной еще спит! - Du hast die Wange getroffen, aber Patient schläft noch! - 뺨을 때렸지만 여전히 의식 불명 상태입니다! - あなたは頬を叩いたが、 患者はまだ眠っている! - 患者仍未甦醒 - 患者仍未苏醒 - Yanağına vurdun ama hasta hala uyuyor! - Lyöt poskelle, mutta potilas nukkuu edelleen! - Je hebt de wang geraakt, maar de patiënt slaapt nog! + + Pushing 0.2mg Flumazenil - - Allow reorientation - Povolit reorientaci - Autoriser stimulation - Habilitar la bofetada para recuperar la consciencia - Autorizza stimolazione - Pozwól na cucenie - Permitir reorientação - Разрешить переориентацию - Umorientieren zulassen - 뺨 때리기 허용 - 患者を刺激するアクションの許可 - 允許刺激患者 - 允许刺激患者 - Yeniden yönlendirmeye izin ver - Salli suunnanmuutos - Trainingsniveau voor heroriëntatie + + 5ml Syringe / 0.2mg Flumazenil - - Medical level required for reorientation - Vyžadovaná Zdravotnická úroveň pro reorientaci - Niveau médical requis pour stimulation - Nivel médico requerido para la bofetada - Livello medico richiesto per stimolazione - Poziom wyszkolenia wymagany do cucenia - Nível médico necessário para reorientação - Медицинский уровень, необходимый для переориентации - Benötigter medizinischer Grad, zum Umorientieren - 뺨을 때리는 데 필요한 의료 레벨 수준 - 患者を刺激するアクションの使用に必要な医療スキルのレベルを設定します。 - 刺激患者需要的醫療等級 - 刺激患者所需的医疗水平 - Yeniden oryantasyon için gerekli tıbbi seviye - Uudelleensuuntautumiseen vaadittava lääketieteellinen koulutustaso - Benodigd trainingsniveau voor heroriëntatie + + Push 0.3mg Flumazenil - - IV Block Chance - IV blok šance - Chance de blocage des IV - Probabilidad del bloquéo de IV - Possibilità di ostruzione della IV - Szansa na zablokowanie IV - Chance de Bloqueio IV - Шанс закупорить капельницу - Chance des IVs zu blockieren - IV 막힘 확률 - IV閉塞の確率 - IV 阻塞機率 - IV 阻塞几率 - Mahdollisuus estää IV:t - IV blokkade kans + + Pushing 0.3mg Flumazenil - - Chance of IV blockage due to medication pushes without saline flush - Šance na blokaci IV v důsledku aplikování léčiv bez proplachování fyziologickým roztokem. - Chance de blocage des IV dû à une administration intra-veineuse de médicaments sans rinçage à la solution saline - Probabilidad de que una IV se bloquée por administrar fármacos sin enjuagar con salino - Possibilità di ostruzione della IV senza prima aver svolto uno sciacquo salino - Szansa na zablokowanie IV z powodu podawania leków bez przepłukiwania roztworem soli fizjologicznej - Probabilidade de bloqueio intravenoso devido a injeções de medicamentos sem solução salina - Вероятность закупорки капельницы из-за введения лекарств без промывания физиологическим раствором - Möglichkeit einer Blockade der IV durch Medikamentengabe ohne Kochsalzspülung - 식염수 주입 없이 약물 투여로 인한 IV 막힘 확률 - 生理食塩液を流さずに薬を注入することによるIV閉塞の可能性 - 由於沒有鹽水協助的藥物注射導致 IV 阻塞的機會 - 由于没有盐水协助的药物注射导致 IV 阻塞的机会 - IV-tukoksen mahdollisuus lääkityksen painamisesta ilman suolaliuosta - Kans voor blokkade van IV's door medicaties zonder salinespoeling + + 5ml Syringe / 0.3mg Flumazenil - - Locations Coag-Sense - Lokace použití Coag-Sense - Emplacements du Coag-Sense - Ubicaciones Coag-Sense - Posizioni Coag-Sense - Localizações de uso do Medidor de Coagulação - Standorte Coag-Sense - Coag-Senseが使用できる場所 - Coag-Sense 地點 - Coag-Sense地点 - Locaties voor gebruik Coag-Sense + + Push 10mg Etomidate - - Medical level required for Coag-Sense - Úroveň zdravotnického výcviku pro použití Coag-Sense - Niveau médical requis du Coag-Sense - Nivel médico requerido para Coag-Sense - Livello medico richiesto per Coag-Sense - Nível médico necessário para uso do Medidor de Coagulação - Erforderliches medizinisches Niveau für den Coag-Sense - Coag-Senseの許可 - Coag-Sense 需要的醫療等級 - Coag-Sense所需的医疗水平 - Vereist medisch niveau voor gebruik Coag-Sense + + Pushing 10mg Etomidate - - Treatment time for measuring PT/INR - Čas ošetření pro změření PT/INR - Temps pour mesurer le PT/INR - Tiempo de tratamiento para medir PT/INR - Tempo di trattamento per misurare PT/INR - Tempo para mensurar PT/INR - Behandlungszeit zur Messung von PT/INR - PT/INR測定の所要時間 - PT/INR 測量的治療時間 - PT/INR测量的治疗时间 - Onderzoekstijd voor bepalen PT-INR + + 5ml Syringe / 10mg(60kg) Etomidate - - Enable Coagulation - Povolit Koagulaci - Activer la coagulation - Habilitar coagulación - Abilita sistema di coagulazione - Włącz krzepnięcie - Ativar Coagulação - Включить Коагуляцию - Gerinnung - 혈응고 활성화 - 血液凝固を有効化 - 啟用凝血 - 启用凝血 - Ota koagulaatio käyttöön - Schakel coagulatie in + + Push 12mg Etomidate - - Enables advanced coagulation features and modifies TXA and EACA behaviour accordingly. - Povolí funkci pokročilé koagulace (srážlivost) krve a modifikuje chování TXA a EACA. - Active la coagulation avancée et modifie l'effet de l'Acide Tranexamique et de l'Acide Aminocaproïque en conséquence - Habilita la coagulación avanzada, modificando los efectos del ATX y del EACA. - Abilita la coagulazione avanzata e modifica di conseguenza il comportamento di TXA e EACA. - Włącza zaawansowane funkcje krzepnięcia oraz odpowiednie modyfikacje zachowania TXA i EACA. - Habilita recursos avançados de coagulação e modifica o comportamento de TXA e EACA de acordo. - Включает расширенные функции коагуляции и соответствующим образом изменяет поведение TXA и EACA. - Aktiviert erweiterte Gerinnung und modifiziert das verhalten von TXA & EACA (E-Aminocapronsäure) entsprechend. - 고급 혈응고 기능을 활성화하고 그에 따라 TXA 및 아미노카프로산의 동작을 수정합니다. - 高度な血液凝固機能を有効にし、それに応じて TXA と EACA の動作を変更します。 - 啟用高級凝血功能,並相應地修改血栓素(TXA)和EACA行為。 - 启用高级凝血功能,并相应地修改血栓素(TXA)和EACA行为。 - Ottaa käyttöön edistyneet koagulaatioominaisuudet ja muuttaa TXA- ja EACA-käyttäytymistä vastaavasti - Schakelt geadvanceerde coagulatie functies in, en veranderd het gedrag van TXA en EACA naar behoren + + Pushing 12mg Etomidate + + + 5ml Syringe / 12mg(64kg) Etomidate + + + Push 14mg Etomidate + + + Pushing 14mg Etomidate + + + 5ml Syringe / 14mg(68kg) Etomidate + + + Push 16mg Etomidate + + + Pushing 16mg Etomidate + + + 5ml Syringe / 16mg(72kg) Etomidate - - Coagulation Factors - Koagulační Faktory - Facteurs de coagulation - Factores de Coagulación - Fattori di coagulazione - Gerinnungsfaktoren - 凝固因子 - 凝血因子 - 凝血因子 - Stollingsfactoren + + Push 18mg Etomidate - - The amount of coagulation factors that get set on unit spawn & be kept as limit for factor regeneration - Množství koagulačních faktorů, které se nastaví na spawnutou jednotku a budou udržovány jako limit pro regeneraci faktoru - La quantité de facteurs de coagulation définie lors de l’apparition de l'unité et conservée comme limite pour la régénération des facteurs. - La cantidad de factores de coagulación que se establecen al spawnear y se mantienen como límite para la regeneración de factores - La quantità di fattori di coagulazione che vengono impostati al momento della creazione dell'unità e mantenuti come limite per la rigenerazione dei fattori. - Die Menge an Gerinnungsfaktoren, die beim Spawnen von Einheiten festgelegt werden und als Grenze für die Faktorregeneration beibehalten werden - ユニットのスポーン時に定義される凝固因子の量と、因子の再生限界値 - 單位菌種上設定的凝血因子數量應作為因子再生的限制 - 单位菌种上设定的凝血因子数量应作为因子再生的限制 - De hoeveelheid stollingsfactoren dat een eenheid krijgt op spawn en als limiet wordt gebruik voor hergeneratie + + Pushing 18mg Etomidate - - Coagulation Factor Regeneration Cycle - Cyklus Regenerace Koagulačního Faktoru - Cycle de régénération des facteurs de coagulation - Ciclo de Regeneración del Factor de Coagulación - Ciclo di rigenerazione dei fattori di coagulazione - Regenerationszyklus des Gerinnungsfaktors - 凝固因子再生サイクル - 凝血因子再生循環 - 凝血因子再生循环 - Stollingsfactor hergeneratiecyclus + + 5ml Syringe / 18mg(76kg) Etomidate - - The time between coagulation factor regeneration checks. Will add +1 factor on successful check. Uses Setting: "Coagulation Factors" as limit.\n Note: If the limit is exceeded, this time will be used and then remove -1 factor until Setting: "Coagulation Factors" is reached. Tipp: TXA or EACA stop losing factors\nRequirements for regeneration to work:\n- No wound being clotted in the last cycle check from this setting\n- Setting: "Require Heart Rate"\n- Setting: "Required Blood Volume" - Doba mezi kontrolami regenerace koagulačního faktoru. Při úspěšné kontrole přidá faktor +1. Používá nastavení: "Koagulační Faktory" jako limit.\n Poznámka:Pokud je limit překročen, použije se tato doba a poté se odstraní fakto -1, dokud nebude dosaženo Nastavení:"Koagulační Faktory". Tip: TXA nebo EACA zastavují ztrátu faktorů.\nPožadavky na fungování regenerace:\n-Žádná rána není sražena při kontrole posledního cyklu z tohoto nastavení\n- Nastavení: "Požadovat Srdeční Frekvenci"\n- Nastavení:"Požadovaný Objem Krve" - Le temps entre les vériofications de régénération des facteurs de coagulation. Ajoute +1 facteur en cas de vérification réussie. Utilise le paramètres : "Facteurs de coagulation" comme limite. \nRemarque : si la limite est dépassée, ce temps sera utilisé, puis -1 facteur sera retiré jusqu'à ce que le paramètre : "Facteurs de coagulation" soit atteint. Conseil :TXA ou EACA arrêtent la perte de facteurs.\nConditions nécessaires pour que la régénération fonctionne :\n- Aucune plaie en cours de coagulation au cours du dernier cycle de vérification de ce paramètres.\n- Paramètre : "Fréquence cardiaque requise"\n- Paramètre : "Volume sanguin requis" - Tiempo que transcurre entre cada revisión de la regeneración del factor de coagulación. Añade +1 factor si la revisión ha tenido éxito. Utiliza el ajuste "Factores de Coagulación" como límite.\n Nota: Si el limite es excedido, el tiempo será usado para retirar -1 factor hasta que el ajuste "Factor de Coagulación" se alcance. Consejo: ATX o EACA dejan de perder factores.\n Requisitos para que la regeneración funcione:\n- Ninguna herida coagulada en la última revisión del ciclo de este ajuste.\n- Ajuste: "Requiere Ritmo Cardíaco"\n- Ajuste: "Volumen de Sangre requerido" - Il tempo tra i controlli di rigenerazione dei fattori di coagulazione. Aggiunge +1 fattore in caso di controllo riuscito. Utilizza l'impostazione: "Fattori di coagulazione" come limite.\nNota: se il limite viene superato, questo tempo verrà utilizzato e poi verrà rimosso -1 fattore fino a quando non si raggiunge l'impostazione: "Fattori di coagulazione". Suggerimento: TXA o EACA fermano la perdita di fattori.\nRequisiti affinché la rigenerazione funzioni:\n- Nessuna ferita in corso di coagulazione nell'ultimo ciclo di verifica di questa impostazione.\n- Impostazione: "Frequenza cardiaca richiesta"\n- Impostazione: "Volume sanguigno richiesto" - Die Zeit zwischen den Überprüfungen der Gerinnungsfaktorregeneration. Fügt bei erfolgreicher Prüfung einen Faktor von +1 hinzu. Verwendet die Einstellung „Koagulationsfaktoren“ als Grenzwert.\n Hinweis: Wenn der Grenzwert überschritten wird, wird diese Zeit verwendet und dann -1 Faktor entfernt, bis die Einstellung „Koagulationsfaktoren“ erreicht ist. Tipp: TXA oder EACA verhindern den Verlust von Faktoren.\nVoraussetzungen für die Funktion der Regeneration:\n- Keine Wunde, die in der letzten Zyklusprüfung mit dieser Einstellung geronnen ist\n- Einstellung: „Herzfrequenz erforderlich“\n- Einstellung: „Erforderliches Blutvolumen“ - 凝固因子再生チェックの間隔。チェックに成功すると因子が+1されます。設定 "凝固因子の限界値" を限界値として使用します。 \n注:制限を超えた場合、この時間が経過した後、設定"凝固因子の限界値"に達するまで因子を1つ取り除きます。 \nヒント: TXAまたはEACAは因子の消失を止めます。\n因子再生が機能するための条件: \n-ここで設定されたサイクル時間の最後のチェックで傷口が凝血していないこと \n-設定: "心拍を要求する" \n-設定: "血液量を要求する" - 凝血因子再生檢查之間的時間。成功檢查後將新增 +1 個因素。使用設定:「凝血因子」為限值。\n注意:如果超過限制,將使用此時間,然後刪除 -1 因子,直到達到設定:「凝血因子」。提示:血栓素(TXA)或 EACA 停止丟失因子\n再生工作的要求:\n-在此設定下的最後一個週期檢查中沒有傷口凝結\n-設定:「要求心率」\n-設定:「所需血容量」 - 凝血因子再生检查之间的时间。成功检查后将添加+1个因素。使用设置:“凝血因子”为限值。\n注意:如果超过限制,将使用此时间,然后删除-1因子,直到达到设置:“凝血因子”。提示:血栓素(TXA)或EACA停止丢失因子\n再生工作的要求:\n-在此设置下的最后一个周期检查中没有伤口凝结\n-设置:“要求心率”\n-设定:“所需血容量” - De tijd tussen stollingsfactor hergeneratie checks. Geeft +1 factor op een succesvolle check. Gebruikt instelling: "Stollingsfactoren" als limiet. \n Wees alert: als het limiet overschreden is, dan zal na deze check 1 factor verwijderd worden (-1 factoren) tot het limiet weer bereikt is. Tip: TXA en EACA stoppen het verlies van factoren.\nVereisten voor hergeneratie:\n- Geen wond gestold in de laaste cyclus van deze instelling,\n- Instelling: "Vereist hartslag"\n- "Benodigd bloedvolume" + + Push 20mg Etomidate - - Clotting Cycle Time - Doba Cycklu Srážení - Temps de cycle de coagulation - Duración del ciclo de coagulación - Tempo del ciclo di coagulazione - Zeit des Gerinnungszyklus - 凝血サイクル時間 - 凝血週期時間 - 凝血周期时间 - Stollingscyclustijd + + Pushing 20mg Etomidate - - This time gets divided by 2, randomized & added with the same value devided by 2.\nFor example, if the value was set to 10s this would be one possible varriation: (random (10 / 2)) + (10 / 2) = 8s - Tento čas se vydělí 2, randomizuje a přičte se stejnou hodnotou dělenou 2.\nPro příklad, pokud je hodnota nastavena na 10s. pak bude jedna z možných variant následující: (random (10 / 2)) + (10 / 2) = 8s - Ce temps est divisé par 2, randomisé et additionné à la même valeur divisée par 2. \nPar exemple, si une valeur est fixée à 10 secondes, une variation possible serait : (aléatoire (10 / 2)) + (10 / 2) = 8s - Este tiempo se divide entre 2, se aleatoriza y se suma con el mismo valor dividido por 2.\n Por ejemplo, si el valor se establece en 10 esto sería un posible resultado: ("al azar del 0 al" (10/2)) + (10/2) = 8s - Questo tempo viene diviso per 2, randomizzato e aggiunto al stesso valore diviso per 2.\nAd esempio, se il valore fosse impostato su 10 secondi, una possibile variazione sarebbe: (random (10 / 2)) + (10 / 2) = 8 secondi. - Diese Zeit wird durch 2 geteilt, randomisiert und mit demselben Wert dividiert durch 2 addiert.\nWenn der Wert beispielsweise auf 10 Sekunden eingestellt wäre, wäre dies eine mögliche Variation: (zufällig (10/2)) + (10/2) = 8s - この時間を2で割って、同じ値を2で割った値をランダムに加算する。\n例えば、値を10秒に設定した場合、次のようなバリエーションが考えられる: (ランダム値 (10秒 / 2)) + (10秒 / 2) = 8秒 - 此時間除以 2,隨機化並加上除以 2 的相同值。\n例如,如果該值設定為 10 秒,則可能出現一種變化: (random (10 / 2)) + (10 / 2) = 8 秒 - 此时间除以2,随机化并加上除以2的相同值。\n例如,如果该值设置为10秒,则可能出现一种变化: (random (10 / 2)) + (10 / 2) = 8s - Deze tijd wordt door 2 gedeeld, gerandomiseerd en dan met dezelfde waarde gedeeld door 2 opgeteld. \nBijvoorbeeld: als deze waarde op 10 seconden ingesteld staat dan is één mogelijke variatie:(random(10/2))+(10/2) = 8s + + 5ml Syringe / 20mg(80kg) Etomidate - - The time between each wound clotting cycle that start wound clotting. (low number may cause lag) - Doba mezi každým cyklem srážení rány, který začíná srážení rány (nízké číslo může způsobovat lagy). - Le temps entre chaque cycle de coagulation des plaies qui déclenche la coagulation. (Un nombre bas peut entraîner du lag) - El tiempo entre cada ciclo de coagulación de la herida que inicia la coagulación. (Un número bajo puede causar lag) - Il tempo tra ogni ciclo di coagulazione delle ferite che avvia la coagulazione. (un valore basso potrebbe causare lag - Die Zeit zwischen jedem Wundgerinnungszyklus, der mit der Wundgerinnung beginnt. (Eine niedrige Zahl kann zu Verzögerungen führen.) - 創傷の凝血を開始する各凝血サイクル間の時間の長さ。(低い数値はラグを招く恐れがあります) - 開始傷口凝血的每個傷口凝血週期之間的時間。(數字低可能會導致延遲) - 开始伤口凝血的每个伤口凝血周期之间的时间。(数字低可能会导致滞后) - De hoeveelheid tijd tussen elke wondstollingscyclus. (een laag nummer kan leiden tot lag) + + Push 22mg Etomidate - - Large Wounds Clotting Time - Čas Srážení Velkých Ran - Temps de coagulation des blessures larges - Tiempo de coagulación de Heridas Severas - Tempo di coagulazione per ferite gravi - Gerinnungszeit für große Wunden - 大きな創傷の凝血時間 - 大傷口凝血時間 - 大伤口凝血时间 - Grote wonden stollingstijd + + Pushing 22mg Etomidate - - Medium Wounds Clotting Time - Čas Srážení Středních Ran - Temps de coagulation des blessures moyennes - Tiempo de coagulación de Heridas Medias - Tempo di coagulazione per ferite medie - Gerinnungszeit für mittlere Wunden - 中くらいの創傷の凝血時間 - 中等傷口凝血時間 - 中等伤口凝血时间 - Middelgrote wonden stollingstijd + + 5ml Syringe / 22mg(84kg) Etomidate - - Minor Wounds Clotting Time - Čas Srážení Malých Ran - Temps de coagulation des blessures mineures - Tiempo de coagulación de Heridas Leves - Tempo di coagulazione per ferite minori - Gerinnungszeit für kleinere Wunden - 小さな創傷の凝血時間 - 輕傷凝血時間 - 轻伤凝血时间 - Kleine wonden stollingstijd + + Push 24mg Etomidate - - Affect AI - Ovlivnit AI - Affecte l'IA - Afecta a la IA - Influenza IA - Beeinflusst KI - AIへの影響 - 影響 AI - 影响AI - Beïnvloed AI/KI + + Pushing 24mg Etomidate - - Allow coagulation to affect AI units.\nEvery other value will still be required if turned on. (May cause lag if many AI is present) - Umožněte koagulaci ovlivňovat AI jednotky.\n Každá další hodnota bude stále vyžadována, pokud je zapnuta. (Může způsobit lagy při větším počtu AI jednotek) - Autoriser la coagulation à affecter les unités IA.\nTous les autres paramètres seront toujours nécessaires si cette option est activée. (Peut entraîner un lag si de nombreuses IA sont présentes.) - Permitir que la coaguación afecte a las unidades de IA. Todos los demás valores seguirán siendo necesarios si se activan. (Puede causar lag si hay muchas IA presentes) - Permettere alla coagulazione di influenzare le unità IA.\nOgni altro valore sarà comunque richiesto se attivato. (Può causare lag se sono presenti molte IA) - Koagulation bei KI-Einheiten simulieren.\nAlle anderen Werte sind weiterhin erforderlich, wenn sie aktiviert sind.\nErhöter Leistungsaufwand bei vielen KI Einheiten. - 凝固がAIに影響するようにします。\nONにしても他の値は必要です。(多くのAIが存在する場合、ラグが発生する可能性があります。) - 允許凝固影響 AI 單位。\n如果開啟,仍需要其他值。(如果存在許多 AI,可能會導致延遲) - 允许凝固影响AI单位。\n如果打开,仍需要其他值。(如果存在许多AI,可能会导致延迟) - Laat coagulatie AI/KI beïnvloeden.\nElke andere waarde wordt ook voor AI/KI gecheckt wanneer dit aanstaat. (Kan prestatieproblemen opleveren als er veel AI's/KI's aanwezig zijn.) + + 5ml Syringe / 24mg(88kg) Etomidate - - Allow Additional EACA Stiching - Povolit dodatečné EACA šití - Permettre la suture par l'EACA - Permitir la Sutura EACA Adicional - Consenti la sutura aggiuntiva con EACA - Zusätzliches EACA-Stiching zulassen - EACAによる追加の"縫合"を許可する - 允許進行額外的 EACA 縫合 - 允许进行额外的EACA缝合 - Sta additionele EACA hechtingen toe + + Push 26mg Etomidate - - If enabled EACA will keep all functionality and start stitching bandaged wounds - Pokud je povoleno, EACA si zachová veškerou funkčnost a začne navíc zašívat zabandážované rány samo - Si activé, l'EACA gardera toutes ses fonctionnalités et suturera les plaies par lui-même - Si el EACA esta permitido, mantendrá la funcionalidad y empezará a suturar las heridas vendadas - Se abilitato, EACA manterrà tutte le funzionalità e inizierà a suturare le ferite già medicati. - Wenn aktiviert, behält EACA alle Funktionen bei und beginnt mit dem Nähen verbundener Wunden - 有効にすると、EACAがすべての機能を保持し、自身に"縫合"を適用するようになります。 - 如果啟用,EACA 將保留所有功能並開始縫合繃帶傷口 - 如果启用,EACA将保留所有功能并开始缝合绷带伤口 - EACA houdt zijn functionaliteit en zal wonden hechten wanneer deze instelling actief is. + + Pushing 26mg Etomidate - - Affect Large Wounds - Ovlivnit Velké Rány - Affecter les blessures larges - Afecta a Heridas Severas - Influenzare le ferite gravi - Beeinflusst große Wunden - 大きな創傷への影響 - 影響大傷口 - 影响大伤口 - Beïnvloed grote wonden + + 5ml Syringe / 26mg(92kg) Etomidate - - Allow coagulation to affect large wounds when clotting - Umožní koagulaci ovlivnit srážením velké rány - Permettre à la coagulation d'affecter les blessures larges lors de la coagulation - Permite que la coagulación afecte a heridas severas al coagularse - Permettere alla coagulazione di influenzare le ferite gravi durante la coagulazione - Lassen Sie bei der Gerinnung die Koagulation auf große Wunden zu - 大きな創傷に対して凝固が影響することを許可する - 凝血時允許凝血影響大傷口 - 凝血时允许凝血影响大伤口 - Staat toe dat coagulatie grote wonden beïnvloed tijdens het stollen + + Push 28mg Etomidate - - Affect Medium Wounds - Ovlivnit Střední Rány - Affecter les blessures moyennes - Afecta a Heridas Medias - Consenti alla coagulazione di influenzare le ferite medie - Beeinflusst mittlere Wunden - 中くらいの創傷への影響 - 影響中度傷口 - 影响中度伤口 - Beïnvloed middelgrote wonden + + Pushing 28mg Etomidate - - Allow coagulation to affect medium wounds when clotting - Umožní koagulaci ovlivnit srážením střední rány - Permettre à la coagulation d'affecter les blessures moyennes lors de la coagulation - Permitir que la coagulación afecte a heridas medias al coagularse - Consenti alla coagulazione di influenzare le ferite medie durante la coagulazione - Lassen Sie bei der Gerinnung die Koagulation auf mittelgroße Wunden zu - 中くらいの創傷に対して凝固が影響することを許可する - 凝血時允許凝血影響中度傷口 - 凝血时允许凝血影响中度伤口 - Staat toe dat coagulatie middelgrote wonden beïnvloed tijdens het stollen + + 5ml Syringe / 28mg(96kg) Etomidate - - Affect Minor Wounds - Ovlivnit Malé Rány - Affecter les blessures mineures - Afecta a Heridas Menores - Influenza le ferite minori - Beeinflusst kleinere Wunden - 小さな創傷への影響 - 影響輕微傷口 - 影响轻微伤口 - Beïnvloed kleine wonden + + Push 30mg Etomidate - - Allow coagulation to affect minor wounds when clotting - Umožní koagulaci ovlivnit srážením malé rány - Permettre à la coagulation d'affecter les blessures mineures lors de la coagulation - Permitir que la coagulación afecte a heridas leves al coagularse - Consenti alla coagulazione di influenzare le ferite minori durante la coagulazione - Lässt bei Gerinnung zu, dass Koagulation kleinere Wunden beeinflusst - 小さな創傷に対して凝固が影響することを許可する - 凝血時允許凝血影響輕微傷口 - 凝血时允许凝血影响轻微伤口 - Staat toe dat coagulatie kleine wonden beïnvloed tijdens het stollen + + Pushing 30mg Etomidate - - Allow Additional TXA Bandaging - Povolit dodatečné TXA bandážování - Permettre l'apport de bandages par le TXA - Permitir el Vendaje ATX Adicional - Consenti la medicazione aggiuntiva con TXA - Erlauben Sie zusätzliche TXA-Verbände - TXAによる追加の"包帯"を許可する - 允許額外的血栓素(TXA)包紮 - 允许额外的血栓素(TXA)包扎 - Sta additionele TXA dichtingen toe + + 5ml Syringe / 30mg(100kg) Etomidate - - If enabled TXA will keep all functionality and start bandaging wounds itself - Pokud je povoleno, TXA si zachová veškerou funkčnost a začne bandážovat rány samo - Si activé, le TXA gardera toutes ses fonctionnalités et bandera les plaies par lui-même - Si el ATX esta permitido, mantendrá toda la funcionalidad y empezará a vendar las heridas por si mismo - Se abilitato, TXA manterrà tutte le funzionalità e inizierà a medicare le ferite da solo - Wenn aktiviert, behält TXA alle Funktionen bei und beginnt, Wunden selbst zu verbinden - 有効にすると、TXAがすべての機能を保持し、自身に"包帯"を適用するようになります。 - 如果啟用,血栓素(TXA)將保持所有功能並開始自行包紮傷口 - 如果启用,血栓素(TXA)将保持所有功能并开始自行包扎伤口 - TXA houdt zijn functionaliteit en zal wonden dichten wanneer deze instelling actief is. + + Push 10mcg Epinephrine - - Allow Clots To Be Shown in Menu - Povolit zobrazení sraženin v nabídce - Autoriser l'affichage des caillots dans le menu - Permitir que los Coágulos se muestren en el Menú - Consenti la visualizzazione dei coaguli nel menu - Ermöglichen Sie die Anzeige von Blutgerinnseln im Menü - メニューに血栓を表示する - 允許在選單中顯示凝塊 - 允许在菜单中显示凝块 - Sta toe dat stollingen worden weergeven in het menu + + Pushing 10mcg Epinephrine - - If enabled, when coagulation is bandaging a wound it will add a interaction log to the medical menu. - Pokud je povoleno, když koagulace bandážuje ránu, tak zaznamená danou skutečnost do protokolu interakcí ve zdravotnické tabulce - Si activé, lorsque la coagulation bandera une plaie, une ligne sera ajoutée dans le journal des interactions du menu médical. - Si se activa, cuando la coagulación esté vendando una herida añadirá un registro de interacción al menú médico. - Se abilitato, quando la coagulazione sta medicando una ferita, aggiungerà un registro di interazione nel menu medico. - Wenn diese Option aktiviert ist, wird beim Verbinden einer Wunde durch die Koagulation ein Interaktionsprotokoll zum medizinischen Menü hinzugefügt. - 有効にすると、凝固が傷に包帯を適用しているときに、医療メニューのログに追加されます。 - 如果啟用,當凝固包紮傷口時,它將在醫療選單中新增一個互動日誌。 - 如果启用,当凝固包扎伤口时,它将在医疗菜单中添加一个交互日志。 - Wanneer dit is ingeschakeld is worden gestolde wonden toegevoegd aan de interactie log van het medisch menu. + + 5ml Syringe / 10mcg Epinephrine - - Simultaneous Bodypart Coagulation - Simultánní Koagulace Části Těla - Coagulation simultanée de plusieurs membres - Coagulación Simultanea de las Partes del Cuerpo - Coagulazione simultanea delle parti del corpo - Gleichzeitige Koagulation von Körperteilen - 身体部位の同時凝固 - 同時進行身體部位凝血 - 同时进行身体部位凝血 - Gelijktijdige coagulatie + + Push 1mg Epinephrine - - If enabled each bodypart will be treated simultaneously by coagulation.\nMeaning if you have a wound on the head and body they will both be treated in the same coagulation cycle. - Pokud je povoleno, každá část těla bude ošetřena koagulací simultánně.\n To znamená, že pokud bude rána na hlavě a na hrudníku, budou obě rány ošetřeny ve stejném koagulačním cyklu. - Si activé, chaque membre sera affecté simultanément par la coagulation.\nCela signifie que si une plaie est présente sur la tête et le torse, elles seront toutes deux traitées lors du même cycle de coagulation. - Si se permite, cada parte del cuerpo se tratará simultáneamente mediante coagulación. \nEs decir, si tiene una herida en la cabeza y otra en el torso, ambas se tratarán en el mismo ciclo de coagulación. - Se abilitato, ogni parte del corpo sarà trattata simultaneamente dalla coagulazione.\nCiò significa che se hai una ferita sulla testa e sul corpo, entrambe verranno trattate nello stesso ciclo di coagulazione. - Wenn diese Option aktiviert ist, werden alle Körperteile gleichzeitig durch Koagulation behandelt.\nDas heißt, wenn Sie eine Wunde am Kopf und am Körper haben, werden beide im selben Koagulationszyklus behandelt. - 有効にすると、各部位が同時に凝固処理されます。\nつまり、頭部と胴体に傷がある場合、同じ凝固サイクルで両方が治癒されます。 - 如果啟用,每個身體部位將同時接受凝血治療。\n也就是說,如果你的頭部和身體都有傷口,它們都會在相同的凝血週期中接受治療。 - 如果启用,每个身体部位将同时接受凝血治疗。\n也就是说,如果你的头部和身体都有伤口,它们都会在相同的凝血周期中接受治疗。 - Als dit ingeschakeld is, zal elk lichaamsdeel tegelijkertijd behandeld worden door coagulatie. \nWat betekent dat als je een wond aan je arm en been hebt, dat deze in dezelfde coagulatiecyclus behandeld worden + + Pushing 1mg Epinephrine - - Required Blood Volume - Požadovaný objem krve - Volume sanguin requis - Volumen de sangre requerido - Volume di sangue richiesto - Erforderliches Blutvolumen - 血液量を要求する - 所需血容量 - 所需血容量 - Benodigd bloedvolume + + 5ml Syringe / 1mg Epinephrine - - Minimum volume of blood required for coagulation to work - Minimální objem krve potřebný k tomu, aby koagulace fungovala - Volume de sang minimal requis pour permettre à la coagulation de fonctionner - Volumen de sangre necesario para que la coagulación funcione - Volume minimo di sangue richiesto affinché la coagulazione funzioni - Mindestblutmenge, die erforderlich ist, damit die Gerinnung funktioniert - 凝固の作用に最低限必要な血液の量 - 凝血所需的最小血容量 - 凝血所需的最小血容量 - Het minimale bloedvolume dat vereist is voor coagulatie om te werken + + Push 3mg Adenosine - - Require Heart Rate - Požadovat Srdeční Frekvenci - Fréquence cardiaque requise - Requiere Ritmo Cardiaco - Richiede la Frequenza Cardiaca - Herzfrequenz erforderlich - 心拍を要求する - 要求心率 - 要求心率 - Vereist hartslag + + Pushing 3mg Adenosine - - Should coagulation require a heart rate above 20BPM? (Doing CPR will keep HR above 20BPM) - Má koagulace vyžadovat Srdeční Frekvenci nad 20 BPM? (Provádění KPR udrží SF nad 20 BPM) - La coagulation nécessite-elle un fréquence cardiaque supérieure à 20 BPM ? (Effectuer la RCP gardera le FC au dessus de 20 BPM) - La coagulación requerirá de un ritmo cardiaco superior a 20 PPM (Hacer RCP mantendrá el RC por encima de 20 PPM) - La coagulazione dovrebbe richiedere una frequenza cardiaca superiore a 20 BPM? (Fare RCP manterrà la frequenza cardiaca sopra i 20 BPM) - Sollte die Gerinnung eine Herzfrequenz über 20 BPM erfordern? (Eine Herz-Lungen-Wiederbelebung hält die Herzfrequenz über 20 Schläge pro Minute.) - 凝固が作用するのに20BPM以上の心拍数を必要とさせます (CPRを行うことで心拍数は20BPM以上を保つことが出来ます) - 凝血需要心率超過 20 BPM 嗎?(做心肺復甦術將使心率保持在 20 BPM 以上) - 凝血需要心率超过20BPM吗?(做心肺复苏术将使心率保持在20BPM以上) - Is een hartslag van meer dan 20SPM benodigt voor coagulatie? (Het uitvoeren van CPR houdt de hartslag boven 20SPM) + + 5ml Syringe / 3mg Adenosine - - Tournique Blocks Blood Clotting - Turniket blokuje srážení krve - Le garrot bloque la coagulation - Torniquete Bloquea la Coagulación de la Sangre - Il tourniquet blocca la coagulazione del sangue - Tournique blockiert die Blutgerinnung - 止血帯による血液凝固の妨げ - 止血帶阻斷凝血 - 止血带阻断凝血 - Tourniquets blokkeren wondstolling + + Push 6mg Adenosine - - If enabled a applied tourniquet will stop wounds from being closed from coagulation on that bodypart - Pokud je povoleno, aplikovaný turniket zabrání uzavírání ran koagulací na dané části těla - Si activé, un garrot appliqué empêchera les plaies de se fermer par coagulation sur cette partie du corps. - Si se activa, el torniquete aplicado impedirá que las heridas se cierren por coagulación en esa parte del cuerpo - Se abilitato, un tourniquet applicato impedirà la chiusura delle ferite tramite coagulazione su quella parte del corpo. - Wenn diese Option aktiviert ist, verhindert ein angelegtes Tourniquet, dass Wunden an diesem Körperteil durch Koagulation verschlossen werden - 有効にすると、止血帯を適用中の部位で凝固によって傷口が塞がらないようになります。 - 如果啟用止血帶,可以防止傷口因身體部位的凝血而閉合 - 如果启用止血带,可以防止伤口因身体部位的凝血而闭合 - Tourniquets voorkomen dat wonden op hetzelfde ledemaat dichtgemaakt worden door coagulatie wanneer deze instelling actief is + + Pushing 6mg Adenosine - - EACA Clears Trauma - EACA Odstraňuje Traumata - L'EACA soigne les traumatismes - EACA Elimina el Trauma - EACA elimina il trauma - EACA Remove Traumas - EACA устраняет травму - EACA behandelt Traumata - EACAによる外傷の除去 - EACA 清除創傷 - EACA清除创伤 - EACA verwijderd trauma + + 5ml Syringe / 6mg Adenosine - - Allows Trauma to be cleared by EACA in addition to stitching - Umožňuje kromě šití také odstranění traumat - Autorise le soin complet des traumatismes par l'EACA en plus de la suture - Permite eliminar el Trauma mediante el EACA además de cosiendo - Consente al trauma di essere rimosso da EACA oltre alla sutura. - Permite que o EACA remova traumas além de suturar - Позволяет устранить травму с помощью EACA в дополнение к наложению швов - Ermöglicht die Beseitigung von Traumata durch EACA zusätzlich zum Nähen - EACAによる効果として縫合に加え、外傷の除去を可能にします。 - 除了縫合外,EACA 還可以清除創傷 - 除了缝合外,EACA还可以清除创伤 - Staat toe dat EACA trauma verwijderd, als additie van hechten + + Push 12mg Adenosine - - Enable IV/IO Flow Control - Povolit řízení průtoku IV/IO - Activer les opérations de flux IV/IO - Abilita il controllo del flusso IV/IO - IV/IO-Flusskontrolle aktivieren - IV/IO流量操作を有効化 - 啟用IV/IO流量控制 - 启用IV/IO流量控制 + + Pushing 12mg Adenosine - - Enables the IV/IO flow control menu which gives the medic fine control over the volume running through the active line - Umožňuje řízení průtoku tekutin v IV/IO, dávající tak zdravotníkům kontrolu nad objemem procházejícím aktivní hadičkou - Active le menu de contrôle du débit IV/IO qui permet à l'infirmier de contrôler finement le volume circulant dans la ligne active. - Abilita il menu di controllo del flusso IV/IO che consente al medico di controllare con precisione il volume che scorre attraverso la linea attiva. - Aktiviert das IV/IO-Flusskontrollmenü, das dem Arzt eine genaue Kontrolle über das Volumen gibt, das durch die aktive Leitung fließt - IV/IO流量操作メニューを有効にし、輸液がラインを流れる液量を衛生兵が細かく制御できるようにします。 - 啟用IV/IO流量控制選單,使醫務人員能夠精細控制通過活動線路的音量 - 启用IV/IO流量控制菜单,使医务人员能够精细控制通过活动线路的音量 + + 5ml Syringe / 12mg Adenosine - - Kidney damage/failure - Poškození/selhání ledvin - Lésions/Insuffisance rénale - Insuficiencia/Daño Renal - Rene danneggiato/collassato - Uszkodzenie nerek - Dano/insuficiência renal - Повреждение/недостаточность почек - Nierenschäden/-versagen - 신장 손상/기능상실 - 腎臓の損傷/機能不全 - 腎損傷/衰竭 - 肾损伤/衰竭 - Munuaisvaurio/munuaisten vajaatoiminta - Nierschade/-falen + + Push 0.6mcg Atropine + + + Pushing 0.6mcg Atropine + + + 5ml Syringe / 0.6mcg Atropine + + + Push 2mg Atropine - - Enables kidney damage caused by overuse of saline - Umožňuje poškození ledvin způsobené nadužíváním fyziologického roztoku - Active les lésions rénales causées par une surutilisation de solution saline - Permite el daño de los riñones causado por uso excesivo de salino - Abilita danni renali causati da un overdose di soluzione salina - Włącza uszkadzanie nerek spowodowane zbytnim użyciem soli fizjologicznej - Permite dano renal causado pelo uso excessivo de solução salina - Предотвращает повреждение почек, вызванное чрезмерным употреблением физиологического раствора - Ermöglicht Nierenschäden, die durch übermäßigen Gebrauch von Kochsalzlösung verursacht werden - 식염수 과다 사용으로 인한 신장 손상 활성화 - 生理食塩液の過剰使用による腎臓の損傷を可能にします - 啟用因過度使用生理鹽水而造成的腎臟損害 - 启用因过度使用生理盐水而造成的肾脏损害 - Mahdollistaa suolaliuoksen liiallisen käytön aiheuttaman munuaisvaurion - Schakelt nierschade veroorzaakt door overgebruik van saline in + + Pushing 2mg Atropine - - Maximum Fluid Bag Stack - Maximální počet vaků s tekutinou - Empilement maximal de poches de fluide - Máxima cantidad de bolsas de fluidos simultaneas - Stack massimo della sacca per fluidi - Maksymalna ilość worków z płynami dla jednego pajenta - Pilha Máxima de Sacos de Fluidos - Максимальный объем пакета с жидкостью - Maximaler Flüssigkeitsbeutelstapel - 최대 액체 가방 양 - 輸液袋の最大スタック数 - 注射液堆疊上限 - 注射液堆叠上限 - Suurin nestepussipino - Maximale vloeistofzak stapel + + 5ml Syringe / 2mg Atropine - - The maximum amount of fluid bags that can be stacked to increase IV flow rate - Maximální množství vaků s tekutinou, které lze zavést pacientovi za účelem zrychlení průtoku skrze IV. - Le nombre maximal de poches de fluide pouvant être empilées pour augmenter le débit IV - La cantidad máxima de bolsas de fluido que se pueden apilar para aumentar el flujo de IV - La quantità massima di sacche per fluidi che possono essere accorpate per aumentare la portata (flow rate) della IV - Maksymalna ilość worków z płynem, które można przypiąć w tym samym momencie, aby zwiększyć szybkość przepływu IV - A quantidade máxima de bolsas de fluido que podem ser empilhadas para aumentar a taxa de fluxo IV - Максимальное количество пакетов с жидкостью, которое можно сложить в стопку для увеличения скорости внутривенного вливания - Die maximale Anzahl von Flüssigkeitsbeuteln, die gestapelt werden können, um die Durchflussrate der Infusion zu erhöhen - IV 주입량을 증가시키기 위해 쌓을 수 있는 최대 액체 가방의 양 - IV流量を増やすために積み重ねることができる輸液袋の最大数 - 可堆疊的最大液體袋量以增加 IV 流速 - 可堆叠的最大液体袋量以增加 IV 流速 - Suurin määrä nestepusseja, jotka voidaan pinota IV-virtausnopeuden lisäämiseksi - De maximale hoeveelheid vloeistofzakken die gestapeld kunnen worden om de IV vloeisnelheid te verhogen + + Push 60mg Doxapram - - The animation speed that gets set in Stage 1 of Pervitin. (1 = normal, 2 = twice) - Rychlost animace efektu pervitinu v jeho první fázi. (1 = normální, 2 = dvojnásobná) - La vitesse de déplacement étant redéfinie durant le stage 1 de la pervitine. (1 = normal, 2 = doublée)1 - La velocidad de animacion que se fija en la fase 1 de la pervitina. (1 = Normal. 2 = Doble) - La velocità di animazione impostata nella Fase 1 di Pervitin. (1 = normale, 2 = due volte) - Prędkość animacji po zażyciu pervitinu (1 = normalnie, 2 = podwójnie) - A velocidade da animação definida no Estágio 1 do Pervitin. (1 = normal, 2 = duas vezes) - Скорость анимации, которая устанавливается на этапе 1 Первитина. (1 = обычная, 2 = двойная) - Geschwindigkeit, die in Phase 1 von Pervitin gesetzt wird. (1 = normal, 2 = doppelt) - 페르피틴 효과 1단계에서 설정되는 애니메이션 속도. (1 = 정상, 2 = 두 배) - ペルビチン効果の第一段階でのアニメーションの再生速度を設定します (1 = 通常、2 = 2倍速) - 在柏飛汀(Pervitin)的第一階段中設置的動畫速度。(1=正常,2=兩次) - 在柏飞汀(Pervitin)的第一阶段中设置的动画速度。(1=正常,2=两次) - Animaationopeus, joka asetetaan pervitiinin vaiheessa 1. (1 = normaali, 2 = kahdesti) - Animatiesnelheid van fase 1 van pervitin. (1 = normaal, 2 = dubbel) + + Pushing 60mg Doxapram - - Pervitin Speed Boost - Pervitin Speed Boost - Boost de vitesse de la pervitine - Aumento de velocidad de la pervitina - Boost velocità Pervitin - Zwiększenie prędkości ruchu - Aumento de velocidade do Pervitin - Повышение скорости Первитином - Pervitin Geschwindigkeit Boost - 페르피틴 속도 부스트 - ペルビチン速度上昇 - 柏飛汀(Pervitin)速度提升 - 柏飞汀(Pervitin)速度提升 - Pervitiini nopeuden lisääminen - Pervitin snelheidsboost + + 5ml Syringe / 60mg Doxapram - - Fluid Require inserted IV/IO - Tekutina vyžaduje zavedné IV/IO - Les fluides nécessitent une IV/IO insérée - Los Fluidos requieren que se inserte la IV/IO - Fluido richiede IV/IO inserito - Fluido necessita de inserção IV/IO - Требовать установки IV/IO - Flüssigkeiten Erfordert eingefügtes IV/IO - 輸液にIV/IO刺入を要求する - 注射需要插入IV/IO - 推注需要插入IV/IO - Vloeistoffen vereisen een aangelegde IV/IO + + Push 80mg Doxapram - - Blood Drawing Require IV/IO - Krevní odběr vyžaduje zavedené IV/IO - La prise de sang nécessite une IV/IO - La Extracción de Sangre Requiere la IV/IO - Prelievo di sangue richiede IV/IO - Extração de sangue necessita de IV/IO - Забор крови требует IO/IV - Blutentnahme benötigt IV/IO - 採血にIV/IO刺入を要求する - 抽血需要插入IV/IO - 抽血需要插入IV/IO - Bloedoptrekken vereist IV/IO + + Pushing 80mg Doxapram - - Default false. If true, you will need to insert IV/IO first before being able to draw blood from someone. \nIf false, you can draw without it. - Výchozí false. Pokud true, pak bude před odběrem krve potřeba zavést IV/IO.\nPokud false, můžete odběr provádět i bez zavedené IV/IO. - Désactivé par défaut. Si activé, vous devrez d’abord insérer une IV/IO avant de pouvoir prélever du sang sur quelqu’un. \nSi désactivé, vous pouvez effectuer une prise de sang sans IV/IO. - Falso por defecto. Si se habilita, necesitarás insertar primero la IV/IO para poder extraer sangre de alguien. \nSi falso, puedes extraer sangre sin ello. - Impostazione predefinita falsa. Se vera, dovrai inserire prima IV/IO prima di poter prelevare sangue da qualcuno. \nSe falsa, puoi prelevare senza di esso. - Desativado, por padrão. Quando ativado, você precisará inserir IV/IO primeiro antes de poder retirar sangue de alguém. \nSe desativado, você pode retirar sem ele. - По умолчанию false. Если true, вам нужно будет сначала ввести IO/IV, прежде чем вы сможете взять кровь у кого-либо. \nесли false, вы можете забрать кровь без них - Steuert, ob eine IV/IO vorhanden sein muss, um Blut abnehmen zu könnnen./nStandard: falsch - デフォルトではfalseです。trueの場合、人から採血する前にIV/IOの刺入が必要になります。 \nfalseの場合は刺入無しで採血できます。 - 默認值為false。如果是真的,你需要先插入靜脈注射/IO,然後才能從某人身上抽血。\n如果是假的,你可以不用它畫畫。 - 默认值为false。如果是真的,你需要先插入静脉注射/IO,然后才能从某人身上抽血。\n如果是假的,你可以不用它画画。 - Standaard vals. Wanneer waar moet er eerst een IV/IO toegediend worden voordat je bloed kan optrekken. \nWanneer vals is dit niet vereist. + + 5ml Syringe / 80mg Doxapram - - Default false. If true, you will need to insert IV/IO first before being able to give someone saline/blood/plasma. \nIf false, it retains standard ACE behaviour for using saline/blood/plasma. - Výchozí zakázáno. Pokud je povoleno, budete muset nejprve vložit IV/IO, než budete moci někomu podat fyziologický roztok/krev/plazmu. \nPokud je zakázano, zachová standardní chování ACE pro použití fyziologického roztoku/krve/plazmy. - Par défaut désactivé. Si activé, vous avez besoin de poser une IV/IO avant de pouvoir administrer de la saline/sang/plasma. \nSi désactivé, le comportement standard de ACE pour l'usage de saline/sang plasma est utilisé. - Predeterminado desactivado. Si se activa, se necesitará insertar una IV/IO primero antes de poder suministrar salino/sangre/plasma. \nSi esta desactivado, se mantiene el funcionamiento de ACE para aplicar salino/sangre/plasma. - Predefinito falso. Se è vero, dovrai prima inserire l'IV/IO per poter somministrare a qualcuno soluzione salina/sangue/plasma. \nSe falso, mantiene il comportamento ACE standard per l'utilizzo di soluzione salina/sangue/plasma. - Domyślnie wyłączone. Jeśli włączone, należy najpierw umieścić IV/IO przed podaniem płynów. \nJeśli wyłączone, mechanika będzie taka sama jak w ACE przy podawaniu soli fizjologicznej/krwi/osocza. - Falso, por padrão. Se verdadeiro, você precisará inserir IV/IO primeiro antes de poder administrar solução salina/sangue/plasma a alguém. \nSe falso, mantém o comportamento padrão do ACE para uso de solução salina/sangue/plasma. - Истина по умолчанию. Если это правда, вам нужно будет сначала ввести IV/IO, прежде чем вы сможете дать кому-то физиологический раствор/кровь/плазму. \nЕсли false, он сохраняет стандартное поведение ACE для использования физиологического раствора/крови/плазмы. - Standardeinstellung falsch. Wenn wahr, müssen Sie zuerst eine IV/IO einführen, bevor Sie jemandem Kochsalzlösung/Blut/Plasma geben können. \nWenn falsch, behält es das Standard-ACE-Verhalten für die Verwendung von Kochsalzlösung/Blut/Plasma bei. - 기본값은 참입니다. 참이면 식염수/혈액/혈장을 제공하기 전에 먼저 IV/IO를 삽입해야 합니다. \n거짓이면 식염수/혈액/혈장 사용에 대한 표준 ACE 동작을 유지합니다. - デフォルトではfalseです。trueの場合、生理食塩液/血液/血漿の輸液を行う前にIV/IOの刺入が必要になります。 \nfalseの場合はACE標準の生理食塩液/血液/血漿と同様に作用します。 - 默認為真。 如果為 false, 您需要先建立 IV/IO, 然後才能給某人注射鹽水/血液/血漿。 \n如果為 false, 它保留使用鹽水/血液/血漿的標準 ACE 行為。 - 默认为真。 如果为 false, 您需要先建立 IV/IO, 然后才能给某人注射盐水/血液/血浆。 \n如果为 false, 它保留使用盐水/血液/血浆的标准 ACE 行为。 - VDefault false. Doğruysa, birine salin/kan/plazma vermeden önce IV/IO eklemeniz gerekir. \nYanlışsa, salin/kan/plazma kullanımı için standart ACE davranışını korur. - Oletusarvo epätosi. Jos totta, sinun on lisättävä IV/IO ensin, ennen kuin voit antaa jollekulle suolaliuosta/verta/plasmaa \nJos väärin, se säilyttää normaalin ACE-käyttäytymisen suolaliuoksen/veren/plasman käytössä. - Standaard vals. Wanneer waar moet er eerst een IV/IO aangelegd worden voordat je vloeistoffen kan toedienen.\nWanneer vals, wordt standaard ACE gedrag gebruikt voor vloeistoffen + + Push 100mg Doxapram - - Medications Require IV/IO - Léčiva vyžadující IV/IO - Les médicaments nécessitent une IV/IO - Requerir IV/IO para fármacos - Le medicazioni richiedono un accesso IV/IO - Leki wymagają IV/IO - Medicamentos requerem IV/IO - Лекарства требуют внутривенного введения - Medikamente erfordern eine IV/IO - 투약에 IV/IO가 필요함 - 薬液にIV/IO刺入を要求する - 藥物需要通過IV/IO注射 - 药物需要通过IV/IO注射 - Lääkkeet vaativat IV/IO:n - Medicaties vereisen IV/IO + + Pushing 100mg Doxapram - - Default false. If true, you will need to insert IV/IO first before being able to give someone medications. \nIf false, you can give them without it. - V základu vypnuto. Pokud zapnuto, budete potřebovat zavést IV/IO jako první, než budete moct někomu dávat léčiva \nPokud vypnuto, tak je můžete dávat bez nich. - Faux par défaut. Si vrai, il sera nécessaire d'insérer une IV/IO avant de pouvoir donner des médicaments à quelqu'un. \nSi faux, ils pourront être donnés sans - Predeterminado desactivado. Si se activa, se necesitará insertar una IV/IO primero antes de poder suministrar fármacos. \nSi esta desactivado, se podrán suministrar sin IV/IO. - Falso nel default. Se vero/true, dovrai prima inserire un IV/IO per poter effettuare alcune medicazioni. \nSe falso, potrai dargliele senza IV/IO. - Domyślnie wyłączone. Jeśli włączone leki będą wymagać założonego IV/IO \nWyłączone pozwoli podać leki bez tego. - Falso, por padrão. Se verdadeiro, você precisará inserir IV/IO primeiro antes de poder administrar medicamentos a alguém. \nSe falso, você pode administrá-los sem ele. - По умолчанию false. Если true, вам нужно будет сначала ввести IV/IO, прежде чем вы сможете давать кому-либо лекарства. n\Если false, вы можете давать их без этого. - Standardmäßig falsch. Bei "wahr" muss zuerst ein IV/IO gelegt sein, bevor jemandem Medikamente geben werden können. \nBei "falsch" können Medikamente ohne IV/IO geben werden. - 기본값은 false입니다. true일 경우 누군가에게 약을 주입하기 전에 먼저 주사를 꽂아야 합니다. \nfalse일 경우 주사없이 투약이 가능합니다. - デフォルトではfalseです。trueの場合、薬液注射を行う前にIV/IOの刺入が必要になります。 \nfalseの場合は薬品だけで投与可能になります。 - 默認假。 如果為真,您將需要先建立 IV/IO, 然後才能給某人注射藥。 \n如果為假, 您可以在沒有IV/IO的情況下注射藥物他們。 - 默认假。 如果为真,您将需要先建立 IV/IO, 然后才能给某人注射药。 \n如果为假, 您可以在没有IV/IO的情况下注射药物他们。 - Oletusarvo epätosi. Jos totta, sinun on lisättävä IV/IO ensin, ennen kuin voit antaa jollekin lääkkeitä. \nJos vääriä, voit antaa ne ilman sitä. - Standaard vals. Wanneer waar moet er eerst een IV/IO aangelegd worden voordat medicatie toegedient kan worden. \nWanneer vals kunnen medicijnen gegeven worden zonder IV/IO + + 5ml Syringe / 100mg Doxapram - - Reorientation enabled? - Reorientace povolena? - Stimulation activé? - ¿Habilitar bofetada? - Stimolazione abilitata? - Cucenie dostępne? - Reorientação habilitada? - Переориентация включена? - Umorientieren aktiviert? - 뺨 때리기를 활성화합니까? - "患者を刺激する"アクションを有効化 - 啟用刺激患者功能? - 启用刺激患者功能? - Yeniden yönlendirme etkin mi? - Uudelleensuuntaus käytössä? - Heroriëntatie ingeschakeld? + + Push 80mg Alteplase - - Enables reorientation - Povolí reorientaci - Activer stimulation - Habilita la bofetada para recuperar la consciencia - Stimolazione abilitata - Pozwala na cucenie - Habilita a reorientação - Включает переориентация - Aktiviert das Umorientieren - 뺨 때리기 활성화 여부 - 安定化している患者を刺激(平手打ち)することで、目覚めさせる機能とアクションを有効化します - 啟用刺激患者的功能 - 启用刺激患者的功能 - Yeniden yönlendirmeyi etkinleştirir - Mahdollistaa suunnanmuutoksen - Schakelt heroriëntatie in + + Pushing 80mg Alteplase - - Reorientation slap sound - Zvuk facky reorientace - Son claque stimulation - Sonido de bofetada para recuperar la consciencia - Suono schiaffo stimolazione - Dźwięk przy cuceniu - Som de tapa durante reorientação - Звук пощечины при переориентации - Slap-Sound für Umorientieren - 뺨 때리기 사운드 - 患者を刺激するアクションで音を鳴らす - 刺激患者的拍擊聲 - 刺激患者的拍击声 - Yönlendirme tokat sesi - Lyöksytysääni potilaan suunnan muuttamiseen - Heroriëntatie klapgeluid + + 5ml Syringe / 80mg Alteplase - - Enables slap sound for reorientation - Povolit zvuk facky pro reorientaci - Activer son de la claque - Habilia el sonido de bofetada para recuperar la consciencia - Abilita il suono dello schiaffo per la stimolazione - Włącza dźwięk uderzenia przy cuceniu - Ativa o som de tapa durante reorientação - Включает звук пощечины для переориентации - Aktiviert Slap-Sound für Umorientieren - 환자를 깨우기 위해 뺨을 때리는 사운드를 활성화 - 患者を刺激した際に平手打ちするような音を鳴らします - 啟用刺激患者時的拍打聲 - 启用刺激患者时的拍打声 - Yeniden yönlendirme için tokat sesini etkinleştirir - Sallii iskuäänen uudelleensuuntaamista varten - Schakelt het klapgeluid in voor heroriëntatie + + 5ml Syringe / Saline Flush Syringe - - Enable Weapon Sway - Povolit Houpání Zbraně - Activer l'oscillation de l'arme - Habilita el balanceo del arma - Abilita l'oscillazione dell'arma - Włącz kołysanie broni - Ativar balanço da arma - Включить раскачивание оружия - Aktiviere Waffen Schwanken - 무기 흔들림 사용(페르피틴) - 武器の揺れを有効化 - 啟用武器搖擺 - 启用武器摇摆 - Ota aseen heiluminen käyttöön - Schakel wapenbeweging in + + Ondansetron Settings - - Enables if pervitin should influance your weapon sway - Povoluje, zda pervitin ovlivní Vaše houpání zbraně - Définie si la pervitine influance l'oscillation de l'arme - Habilita si la pervitina afecta al balanceo del arma - Attiva se il pervitin debba influenzare l'oscillazione dell'arma - Włącza efekt zmiany kołysania broni po spożyciu pervitinu - Ativa se o Pervitin influenciar o balanço da sua arma - Включается, если Первитин должен повлиять на раскачивание вашего оружия - Aktiviert, ob Pervitin das Schwanken deiner Waffen beeinflussen soll - 페르피틴이 무기의 흔들림에 영향을 미치는지의 여부를 활성화합니다. - ペルビチンが武器の揺れに影響を与える機能を有効にします - 啟用柏飛汀(Pervitin)影響您的武器擺動 - 启用柏飞汀(Pervitin)影响您的武器摆动 - Mahdollistaa pervitiinin vaikutuksen aseen heilumiseen. - Bepaald of pervitin invloed heeft op wapenbewegingen + + Ondansetron, For relief of nausea - - Allow Stacking - Povolit stohování - Autoriser l'empilage - Permitir acumulación - Consenti la sovrapposizione - Permitir somatória de efeito - Stapeln zulassen - 重複の許可 - 允許堆疊 - 允许堆叠 - Sta stapelen toe + + Vial: Ondansetron - - If enabled EACA will be stackable and double its efficiency - Pokud je povoleno, EACA bude stohovatelné a zdvojnásobí svou účinnost - Si activé, l'EACA sera empilable et doublera son efficacité - Si el EACA esta permitido, se podrá acumular y duplicará su eficiencia - Se abilitato, EACA sarà sovrapponibile e raddoppierà la sua efficienza. - Se habilitado, o efeito do EACA será somável e sua eficiência será dobrada - Wenn aktiviert, ist EACA stapelbar und verdoppelt seine Effizienz - 有効にすると、EACAの重複と効率の倍化が可能になります。 - 如果啟用,EACA 將可堆疊,效率提高一倍 - 如果启用,EACA将可堆叠,效率提高一倍 - Staat het stapelen van EACA toe wanneer ingeschakeld, wat leidt tot een verdubbeling van de effectiviteit + + Medical level required for Ondansetron - - Allow Stacking - Povolit stohování - Autoriser l'empilage - Permitir acumulación - Permetti l'impilamento - Stapeln zulassen - 重複の許可 - 允許堆疊 - 允许堆叠 - Sta stapelen toe + + Treatment time for Ondansetron - - If enabled TXA will be stackable and double it's efficiency - Pokud je povoleno, TXA bude stohovatelné a zdvojnásobí svou efektivitu - Si activé, le TXA sera empilable et doublera son efficacité - Si el ATX esta permitido, se podrá acumular y duplicará su eficiencia - Se abilitato, il TXA sarà impilabile e raddoppierà la sua efficienza - Wenn aktiviert, ist TXA stapelbar und verdoppelt seine Effizienz - 有効にすると、TXAの重複が可能になり、効率が2倍になります。 - 如果啟用血栓素(TXA),它將是可堆疊的,效率提高一倍 - 如果启用血栓素(TXA),它将是可堆叠的,效率提高一倍 - Wanneer ingeschakeld: sta het stapelen van TXA toe, wat de effectiviteit verdubbeld) + + Push 90mg Succinylcholine - - EACA Cycle Time - Doba Cyklu EACA - Temps de cycle de l'EACA - Duración del Ciclo del EACA - Tempo di ciclo EACA - Tempo de Ciclo do EACA - EACA-Zykluszeit - EACAサイクル時間 - EACA 循環時間 - EACA循环时间 - EACA cyclustimer + + Pushing 90mg Succinylcholine - - The time it takes for EACA to close a stich a wound - Doba, za kterou EACA zašije ránu - Temps requis à l'EACA pour suturer une plaie - El tiempo que tarda EACA en suturar una herida - Il tempo che impiega EACA per suturare una ferita. - O intervalo entre suturas do EACA - Die Zeit, die EACA benötigt, um einen Stich oder eine Wunde zu schließen - EACAが創傷を縫合するのに掛かる時間 - EACA 閉合傷口所需的時間 - EACA闭合伤口所需的时间 - Hoe lang het duurt voor EACA om een wond te hechten + + 5ml Syringe / 90mg(60kg) Succinylcholine - - TXA Cycle Time - Doba Cyklu TXA - Temps de cycle du TXA - Ciclo de tiempo del ATX - Tempo del ciclo TXA - TXA-Zykluszeit - TXAサイクル時間 - 血栓素(TXA)循環時間 - 血栓素(TXA)循环时间 - TXA cyclustijd + + Push 96mg Succinylcholine - - The time it takes for TXA to close a wound - Doba, za kterou TXA uzavře ránu - Temps requis pour permettre au TXA de refermer une blessure - El tiempo que tarda el ATX en cerrar una herida - Il tempo necessario affinché TXA chiuda una ferita - Die Zeit, die TXA benötigt, um eine Wunde zu schließen - TXAが創傷を塞ぐのに掛かる時間 - 血栓素(TXA)閉合傷口所需的時間 - 血栓素(TXA)闭合伤口所需的时间 - Hoe lang het duurt voordat TXA een wond dicht + + Pushing 96mg Succinylcholine - - Maximum Carbonate Success Chance - Šance na úspěšné použití Uhličitanu - Chance de succès des Sels d'Ammoniac - Probabilidad para un uso exitoso del Carbonato - Possibilità di utilizzare con successo il carbonato - Szansa na pomyślne użycie soli trzeźwiących - Possibilidade de uso bem-sucedido de Carbonato - Максимальный шанс успеха Карбоната - Chance für den erfolgreichen Einsatz von Carbonat - 탄산암모늄 사용으로 성공할 확률 - 炭酸アンモニウムを使用した際の覚醒成功率 - 成功使用碳酸鹽的機率 - 成功使用碳酸盐的几率 - Suurin karbonaatin onnistumismahdollisuus - Maximale succeskans van carbonaat + + 5ml Syringe / 96mg(64kg) Succinylcholine - - Coagulation Factor Limit - Limit Koagulačního Faktoru - Limite de facteurs de coagulation - Limite del Factor de Coagulación - Limite dei fattori di coagulazione - Grenzwert des Gerinnungsfaktors - 凝固因子の限界値 - 凝血因子限值 - 凝血因子限值 - Stollingsfactor limiet + + Push 102mg Succinylcholine - - The limit for how many coagulation factors can be present inside a units body at once. Meaning if you administer plasma this is the maximum attainable value. - Limit pro to, kolik koagulačních faktorů může být přítomno uvnitř těla dané jednotky najednou. To znamená, že pokud podáváte plazmu, jedná se o maximální dosažitelnou hodnotu. - La limite du nombre de facteurs de coagulation pouvant être présents dans le corps d'une unité. Cela signifie que si du plasma est administré, il s'agira de la valeur maximale atteignable. - Limite del número de factores de coagulación que pueden estar presentes a la vez en el organismo de una unidad. Es decir, si administras plasma, éste es el valor máximo alcanzable. - Il limite di quanti fattori di coagulazione possono essere presenti nel corpo di un'unità contemporaneamente. Ciò significa che se somministri plasma, questo è il valore massimo raggiungibile. - Die Grenze dafür, wie viele Gerinnungsfaktoren gleichzeitig im Körper einer Einheit vorhanden sein können. Das heißt, wenn Sie Plasma verabreichen, ist dies der maximal erreichbare Wert. - 血液凝固因子が一度にどれだけ体内に存在できるかの限界値。つまり、血漿を投与した場合における保持可能な因子の最大値。 - 一個單位體內同時存在多少凝血因子的限制。這意味著,如果你服用血漿,這是可達到的最大值。 - 一个单位体内同时存在多少凝血因子的限制。这意味着,如果你服用血浆,这是可达到的最大值。 - Het limiet voor hoeveel stollingsfactoren er in een eenheids lichaam tegelijkertijd aanwezig kan zijn. Wat betekent dat dit de waarde is waar zelfs plasma geen extra factoren meer toevoegd + + Pushing 102mg Succinylcholine - - IV Check limb damage - IV Kontrola poškození končetin - Vérification des dégâts du membre pour l'IV - Permitir inserción de IV en extremidad dañada - IV Controllare il danno agli arti - Sprawdzanie obrażeń kończyn do IV - Verificação dos danos ao membro para o IV - Проверьте повреждение IV - IV Gliedmaßenschäden prüfen - IV로 사지 손상 검사 - IVの四肢損傷の確認 - IV 檢查肢體損傷 - IV 检查肢体损伤 - IV tarkista raajan vauriot - IV checkt voor ledemaatschade + + 5ml Syringe / 102mg(68kg) Succinylcholine - - Whether or not you can apply the IV to the too damaged limb. In default, this is disabled. - Zda můžete aplikovat IV na příliš poškozenou končetinu. Ve výchozím nastavení je toto zakázáno. - Définie si vous pouvez ou non appliquer une IV sur un membre trop endommagé. Par défaut, ce réglage est désactivé. - Si se puede o no aplicar una IV en extramidades demasiado dañadas. En predeterminado, esto esta desactivado. - Puoi o no applicare la flebo all'arto troppo danneggiato. Nel default, questo è disabilitato. - Czy można zastosować IV na zbyt uszkodzoną kończynę. Domyślnie jest to wyłączone. - Se você pode ou não aplicar o IV ao membro muito danificado. Por padrão, isto é desativado. - Независимо от того, можете ли вы применить капельницу. По умолчанию это отключено. - Ob die IV an der zu stark beschädigten Gliedmaße angewendet werden kann oder nicht. In der Standardeinstellung ist dies deaktiviert. - 심하게 손상된 사지에 IV를 꽂을 수 있는지의 여부. 기본값은 비활성화입니다. - あまりにも損傷した手足に点滴を適用できるかどうか。 デフォルトでは無効。 - 是否可以將 IV 應用於受損的肢體。 預設情況下,這是禁用的。 - 是否可以将 IV 应用于受损的肢体。 默认情况下,这是禁用的。 - Voitko laittaa IV vaurioituneeseen raajaan vai et. Tämä on oletuksena pois käytöstä. - Of je wel of niet een IV kan plaatsen op een te beschadigd ledemaat. standaard staat dit uit. + + Push 108mg Succinylcholine - - Keep Stiching Until Out Of System - Šití dokud je v oběhu - Suturer pour supprimer le produit du système - Mantiene la Sutura hasta que desaparezca del Organismo - Continua a suturare fino all'eliminazione dal sistema - Sutura contínua enquanto presente no sistema - Nähen Sie weiter, bis das System verlassen ist - 体内に効果が無くなるまで"縫合"を適用する - 繼續攪拌,直到系統崩潰 - 继续搅拌,直到系统崩溃 - Blijf hechten tot uit systeem + + Pushing 108mg Succinylcholine - - If enabled EACA will keep stichinng until it's out of your system\nIf disabled EACA will stop working after stiching the last bandaged wound it can find - Pokud je povoleno, EACA bude zašívat rány dokud bude v oběhu.\n Pokud je zakázáno, EACA přestane fungovat po zašití poslední rány, kterou může najít. - Si activé, l'EACA continuera de suturer jusqu'à ce qu'il soit éliminé du système.\nSi désactivé, l'EACA cessera de fonctionner après avoir suturé le dernier bandage qu'il peut trouver. - Si el EACA esta permitido, seguirá suturando hasta que desaparezca del organismo.\n Si el EACA no está permitido, dejará de funcionar después de suturar la última herida que pueda encontrar - Se abilitato, EACA continuerà a suturare finché non verrà eliminato dal sistema.\nSe disabilitato, EACA smetterà di funzionare dopo aver suturato l'ultima ferita medicata che può trovare. - Se habilitado, o EACA continuará suturando até que esteja fora do seu sistema\nSe desabilitado, o funcionamento do EACA será interrompido assim que suturar o último ferimento - Wenn aktiviert, näht EACA weiter, bis es aus Ihrem System entfernt wird.\nWenn deaktiviert, stoppt EACA nach dem Nähen der letzten verbundenen Wunde, die es finden kann - 有効にすると、EACAが体内から無くなるまで"縫合"をします。 \n無効にすると、EACAが判定済の最後の包帯創傷に"縫合"を適用した後に、その作用を終了します。 - 如果啟用,EACA 將繼續縫合,直到它脫離您的系統\n如果禁用,EACA 在縫合它能找到的最後一個繃帶傷口後將停止工作 - 如果启用,EACA将继续缝合,直到它脱离您的系统\n如果禁用,EACA在缝合它能找到的最后一个绷带伤口后将停止工作 - Als dit ingeschakeld is, EACA blijft hechten tot het uit je systeem is.\nEACA zal stoppen na de laatste hechtbare wond die hij kan vinden wanneer uitgeschakeld + + 5ml Syringe / 108mg(72kg) Succinylcholine - - Keep Bandaging Until Out Of System - Bandážování dokud je v oběhu - Continuer à bander jusqu'à ce que le produit soit éliminé du système - Mantiene el Vendaje hasta que desaparezca del organismo - Continua a fasciarti finché non esce dal sistema - So lange verbinden, bis es aus dem Kreislauf ist - 体内に効果が無くなるまで"包帯"を適用する - 保持包紮,直到脫離系統 - 保持包扎,直到脱离系统 - Blijf verbinden tot uit het systeem + + Push 114mg Succinylcholine - - If enabled TXA will keep bandaging until it's out of your system\nIf disabled TXA will stop working after bandaging the last wound it can find - Pokud je povoleno, TXA bude pokračovat v "bandážování" dokud nebude mimo oběh.\nPokud je zakázáno, TXA přestane fungovat po "zabandážování" poslední rány, kterou může najít - Si activé, le TXA continuera à bander jusqu'à ce qu'il soit éliminé du système.\nSi désactivé, le TXA cessera de fonctionner après avoir bandé la dernière plaie qu'il peut trouver. - Si el ATX esta permitido, seguirá vendando hasta que desaparezca del organismo\nSi el ATX no esta permitido, dejará de funcionar después de vendar la última herida que pueda encontrar - Se abilitato, TXA continuerà a fasciarsi finché non sarà eliminato dal sistema.\nSe disabilitato, TXA smetterà di funzionare dopo aver fasciato l'ultima ferita che trova. - Wenn aktiviert, verbindet TXA so lange, bis es aus Ihrem System entfernt wird.\nWenn deaktiviert, stoppt TXA nach dem Verbinden der letzten Wunde, die es finden kann - 有効にすると、TXAが体内から無くなるまで傷口に"包帯"を巻きます。 \n無効にすると、TXAが判定済の最後の創傷に"包帯"を適用した後に、その作用を終了します。 - 如果啟用,血栓素(TXA)將繼續包紮,直到它離開您的系統\n如果禁用,血栓素(TXA)在包紮最後一個傷口後將停止工作 - 如果启用,血栓素(TXA)将继续包扎,直到它离开您的系统\n如果禁用,血栓素(TXA)在包扎最后一个伤口后将停止工作 - Wanneer ingeschakeld: TXA blijft verbinden tot het uit jouw systeem is.\nWanneer uitgeschakeld: TXA Stopt met werken wanneer alle wonden gedicht zijn. + + Pushing 114mg Succinylcholine - - Medical level required for Penthrox Inhaler - Úroveň zdravotnického výcviku potřebná k použití Penthrox Inhalátoru - Niveau médical requis pour l'inhalateur de Penthrox - Nivel médico requerido para el Penthrox - Livello medico richiesto per l'inalatore Penthrox - Nível médico exigido para uso do Inalador de Penthrox - Медицинский уровень, необходимый для использования ингалятора Пентрокс - Benötigter medizinischer Grad, für die Verwendung des Penthrox-Inhalators - 펜트록스를 사용하는 데 필요한 의료 레벨 수준 변경 - ペンスロックス吸入器の許可 - Penthrox吸入器需要的醫療等級 - Penthrox吸入器所需的医疗水平 - Lääketieteellinen koulutustaso vaatii penthrox-inhalaattorin - Medisch niveau benodigd voor het gebruik van Penthrox inhalators + + 5ml Syringe / 114mg(76kg) Succinylcholine - - Maximum Reorientation Success Chance - Šance na úspěšnou reorientaci - Chance de succès de la réorientation - Probabilidad para una reorientación exitosa - Possibilità di un riorientamento riuscito - Szansa na pomyślne ocucenie - Chance de reorientação bem-sucedida - Максимальный шанс на успех переориентации - Chance für eine erfolgreiche Umorientierung - 뺨 때리기가 성공할 확률 - 患者を刺激した際の覚醒成功率 - 成功進行恢復體態的機率 - 成功进行恢复体态的几率 - Suurin mahdollisuus uudelleenorientoitumiseen - Maximale heroriëntatie succeskans + + Push 120mg Succinylcholine - - Medication Modifies Stamina - Léky Modifikují Staminu - Les médicaments modifient l'endurance - Medicación modifica la resistencia - Il farmaco modifica la resistenza - Medicamentos afetam a Stamina - Лекарства изменяют выносливость - Medikamente beeinflussen die Ausdauer - 약물이 스태미나를 조절합니다 - 薬品によるスタミナの変化 - 藥物可以改善體力 - 药物可以改善体力 - Lääkitys muuttaa kestävyyttä - Medicatie heeft invloed op uithoudingsvermogen + + Pushing 120mg Succinylcholine - - Allow certain medications to modify (vanilla/advanced fatigue) stamina as a side effect - Povolit některým lékům upravovat Vanilla/Pokročilou Staminu jako vedlejší účinek - Autorise certains médicaments à modifier (Vanilla/Fatigue avancée) l'endurance en effet secondaire - Permitir que ciertos medicamentos modifiquen la resistencia (fatiga convencional/avanzada) como efecto secundario - Consenti a determinati farmaci di modificare la resistenza (fatica normale/avanzata) come effetto collaterale - Permite que certos medicamentos modifiquem a Stamina (vanilla/fadiga avançada) como efeito colateral - Позволяют определенным лекарствам изменять выносливость (ваниль/повышенная утомляемость) в качестве побочного эффекта - Erlaubt es, dass bestimmte Medikamente als Nebenwirkung die Ausdauer beeinflussen (Vanilla/fortgeschrittene Ausdauer). - 부작용으로 특정 약물이 (바닐라/고급 피로도) 스태미나를 조절할 수 있도록 허용 - 特定の薬の副作用としてスタミナ(バニラ/ACEアドバンスド疲労)を変更することを許可する - 允許某些藥物改變(香草/重度疲勞)耐力作為副作用 - 允许某些药物改变(香草/重度疲劳)耐力作为副作用 - Salli tiettyjen lääkkeiden muuttaa kestävyyttä (vanilja/edistynyt väsymys) sivuvaikutuksena - Bepaald of sommige medicijnen het uithoudingsvermogen (vanilla/geadvanceerde uitputting) beïnvloeden als een bijwerking + + 5ml Syringe / 120mg(80kg) Succinylcholine - - Treatment time for Penthrox Inhaler - Doba léčby Penthrox Inhalátorem - Durée d'utilisation de l'inhalateur de Penthrox - Tiempo de tratamiento para el Penthrox - Tempo di trattamento per l'inalatore Penthrox - Tempo de uso do Inalador de Penthrox - Время обработки ингалятором Пентрокс - Behandlungszeit für den Penthrox-Inhalators - 펜트록스로 치료하는 시간 - ペンスロックス吸入器の所要時間 - Penthrox吸入器的治療時間 - Penthrox吸入器的治疗时间 - Penthrox-inhalaattorin hoitoaika - Behandeltijd van Penthrox inhalators + + Push 126mg Succinylcholine - - Saline Flush - Vypláchnutí fyziologickým roztokem - Rinçage à la solution saline - Enjuague con salino - Risciaquo acqua salina - Płukanie solą fizjologiczną - Lavagem salina - Промывание физиологическим раствором - Kochsalzspülung - 식염수 주입 - 生理食塩液フラッシュ - 用生理食鹽水沖洗 - 用生理盐水冲洗 - suolainen flunssa - Salinespoeling + + Pushing 126mg Succinylcholine - - Amiodarone Settings - Nastavení Amiodaronu - Paramètres de l'Amiodarone - Parámetros de la Amiodarona - Impostazion dell'Amiodarone - Ustawienia Amiodarone - Configurações de Amiodarona - Настройки Амиодарона - Amiodaron Einstellungen - 아미오다론 설정 - アミオダロン設定 - 胺碘酮設定 - 胺碘酮设置 - Amiodaronin asetukset - Amiodaron instellingen + + 5ml Syringe / 126mg(84kg) Succinylcholine - - IO Settings - Nastavení IO - Paramètres des IO - Parámetros de la IO - Impostazioni IO - Ustawienia IO - Configurações de IO - Настройки IO - IO Einstellungen - IO 설정 - IO 設定 - IO設定 - IO设置 - IO-asetukset - IO instellingen + + Push 132mg Succinylcholine - - IV Settings - IV Nastavení - Paramètres des IV - Parámetros de la IV - Impostazioni IV - Ustawienia IV - Configurações de IV - Настройки IV - IV Einstellungen - IV 설정 - IV 設定 - IV設定 - IV设置 - IV asetukset - IV instellingen + + Pushing 132mg Succinylcholine - - Atropine Settings - Nastavení Atropinu - Paramètres de l'Atropine - Parámetros de la Atropina - Impostazioni dell'Atropina - Ustawienia Atropiny - Configurações de Atropina - Настройки Атропина - Atropin Einstellungen - 아트로핀 설정 - アトロピン設定 - 阿托品設定 - 阿托品设置 - Atropiiniasetukset - Atropine instellingen + + 5ml Syringe / 132mg(88kg) Succinylcholine + + + Push 138mg Succinylcholine - - Basic Settings - Základní nastavení - Paramètres basiques - Parámetros básicos - Impostazioni di base - Podstawowe Ustawienia - Configurações básicas - Основные настройки - Grundeinstellungen - 일반 설정 - 基本設定 - 基礎設定 - 基础设置 - Perus asetukset - Basis instellingen + + Pushing 138mg Succinylcholine - - CWMP Settings - Paramètres CWMP - Impostazioni CWMP - CWMP Einstellungen - 戦闘傷病治療薬(CWMP)設定 + + 5ml Syringe / 138mg(92kg) Succinylcholine - - Caffeine Settings - Nastavení Kofeinu - Paramètres de la Caféine - Parámetros de la Cafeina - Impostazioni della Caffeina - Ustawienia Kofeiny - Configurações de Cafeína - Настройки Кофеина - Koffein Einstellungen - 카페인 설정 - カフェイン設定 - 咖啡因設定 - 咖啡因设置 - Kofeiiniasetukset - Caffeïne instellingen + + Push 144mg Succinylcholine - - Carbonate Settings - Nastavení Uhličitanu - Paramètres des Sels d'Ammoniac - Parámetros del Carbonato - Impostazioni del Carbonato d'ammonio - Ustawienia Soli Trzeźwiących - Configurações de Carbonato - Настройки Карбоната - Carbonat Einstellungen - 탄산암모늄 설정 - 炭酸アンモニウム設定 - Carbonate碳酸鹽設定 - 碳酸盐设置 - Karbonaattiasetukset - Carbonaat instellingen + + Pushing 144mg Succinylcholine - - Coag-Sense Settings - Coag-Sense Nastavení - Paramètres du Coag-Sense - Ajustes de Coag-Sense - Impostazioni Coag-Sense - Configuração do Medidor de Coagulação - Coag-Sense-Einstellungen - Coag-Sense設定 - Coag-Sense 設定 - Coag-Sense设置 - Coag-Sense instellingen + + 5ml Syringe / 144mg(96kg) Succinylcholine - - Coagulation Settings - Nastavení Koagulace - Paramètres de coagulation - Configuración de la coagulación - Impostazioni di coagulazione - Configurações de coagulação - Koagulationseinstellungen - 凝固設定 - 凝固設定 - 凝固设置 - Coagulatie instellingen + + Push 150mg Succinylcholine - - EACA Settings - Nastavení EACA - Paramètres de l'Acide Aminocaproïque - Parámetros del EACA - Impostazioni EACA - Ustawienia EACA - Configurações de EACA - Настройки EACA - Aminocapronsäure Einstellungen - 아미노카프로산 설정 - EACA設定 - EACA設定 - EACA设置 - EACA-asetukset - EACA instellingen + + Pushing 150mg Succinylcholine - - IV Epinephrine Settings - Nastavení IV Epinefrinu - Paramètres de l'épinéphrine IV - Ajustes de Epinefrina IV - Impostazioni Epinefrina IV - IV-Epinephrine-Einstellungen - EACAが創傷を縫合するのに掛かる時間 - 四腎上腺素設定 - 四肾上腺素设置 - IV Adrenaline Instellingen + + 5ml Syringe / 150mg(100kg) Succinylcholine - - Etomidate Settings - Nastavení Etomidátu - Paramètres de l'Étomidate - Parámetros del Etomidato - Impostazioni del Etomidato - Ustawienia Etomidatu - Configurações de Etomidato - Настройки Этомидата - Etomidat Einstellungen - 에토미데이트 설정 - エトミデート設定 - 依托咪酯設定 - 依托咪酯设置 - Etomidatin asetukset - Etomidaat instellingen + + Succinylcholine Settings - - Fentanyl Settings - Nastavení Fentanylu - Paramètres du Fentanyl - Parámetros del Fentalino - Impostazioni del fentanil - Ustawienia Fentanylu - Configurações de Fentanil - Настройки Фентанила - Fentanyl Einstellungen - 펜타닐 설정 - フェンタニル設定 - 芬太尼設定 - 芬太尼设置 - Fentanyyliasetukset - Fentanyl instellingen + + Succinylcholine, For RSI - - Flumazenil Settings - Nastavení Flumazenilu - Paramètres du Flumazénil - Parámetros del Flumazenil - Impostazioni del Flumazenil - Ustawienia Flumazenilu - Configurações de Flumazenil - Настройки Флумазенила - Flumazenil Einstellungen - 플루마제닐 설정 - フルマゼニル設定 - 氟馬西尼設定 - 氟马西尼设置 - Flumazenilin asetukset - Flumazenil instellingen + + Vial: Succinylcholine - - Ketamine Settings - Nastavení Ketaminu - Paramètres de la Kétamine - Parámetros de la Ketamina - Impostazioni della Ketamina - Ustawienia Ketaminy - Configurações de Cetamina - Настройки Кетамина - Ketamin Einstellungen - 케타민 설정 - ケタミン設定 - 氯胺酮設定 - 氯胺酮设置 - Ketamiinin asetukset - Ketamine instellingen + + Medical level required for Succinylcholine - - Lidocaine Settings - Nastavení Lidokainu - Paramètres de la Lidocaine - Parámetros de la Lidocaína - Impostazioni della Lidocaina - Ustawienia Lidokainy - Configurações de Lidocaína - Настройки Лидокаина - Lidocain Einstellungen - 리도카인 설정 - リドカイン設定 - 利多卡因設定 - 利多卡因设置 - Lidokaiiniasetukset - Lidocaïne instellingen + + Push 400mg Sugammadex - - Lorazepam Settings - Nastavení Lorazepamu - Paramètres du Lorazépam - Parámetros del Lorazepam - Impostazioni del Lorazepam - Ustawienia Lorazepamu - Configurações de Lorazepam - Настройки Лоразепама - Lorazepam Einstellungen - 로라제팜 설정 - ロラゼパム設定 - 勞拉西泮設定 - 劳拉西泮设置 - Loratsepamin asetukset - Lorazepam instellingen + + Pushing 400mg Sugammadex - - Nalbuphine Settings - Nastavení Nalbufinu - Paramètres de la Nalbuphine - Parámetros de la Nalbufina - Impostazione della Nalbufina (Nubain) - Ustawienia Nalbuphinu - Configurações de Nalbufina - Настройки Налбуфина - Nalbuphin Einstellungen - 날부핀 설정 - ナルブフィン設定 - 納布啡設定 - 纳布啡设置 - Nalbuphine-asetukset - Nalbufine instellingen + + 5ml Syringe / 400mg Sugammadex - - Naloxone Settings - Nastavení Naloxonu - Paramètres de la Naloxone - Parámetros de la Naloxona - Impostazioni del Naloxone - Ustawienia Naloksonu - Configurações de Naloxona - Настройки Налоксона - Naloxon Einstellungen - 날록손 설정 - ナロキソン設定 - Naloxone納洛酮設定 - 纳洛酮设置 - Naloksonin asetukset - Naloxone instellingen + + Sugammadex, For reversal of Rocuronium - - Nitroglycerin Settings - Nastavení Nitroglycerinu - Paramètres de la Nitroglynérine - Parámetros de la Nitroglicerina - Impostazioni della Nitroglicerina - Ustawienia Nitrogliceryny - Configurações de Nitroglicerina - Настройки Нитроглицерина - Nitroglycerin Einstellungen - 니트로글리세린 설정 - ニトログリセリン設定 - 硝酸甘油設定 - 硝酸甘油设置 - Nitroglyseriiniasetukset - Nitroglycerine instellingen + + Vial: Sugammadex - - Norepinephrine Settings - Nastavení Norepinefrinu - Paramètres de la Noradrénaline - Parámetros de la Norepinefrina - Impostazioni della Norepinefrina - Ustawienia Noradrenaliny - Configurações de Norepinefrina - Настройки Нореадреналин - Norepinephrin Einstellungen - 노르에피네프린 설정 - ノルアドレナリン設定 - 去甲腎上腺素設定 - 去甲肾上腺素设置 - Norepinefriinin asetukset - Noradrenaline instellingen + + Push 90mg Rocuronium - - Penthrox Inhaler Settings - Nastavení Penthrox Inhalátoru - Paramètres de l'inhalateur de Penthrox - Configuracion del inhalador Penthrox - Impostazioni dell'inalatore Penthrox - Configurações do Inalador de Penthrox - Настройки ингалятора Пентрокс - Penthrox Einstellungen - 펜트록스 흡입기 설정 - ペンスロックス吸入器設定 - Penthrox吸入器設定 - Penthrox吸入器设置 - Penthrox-inhalaattorin asetukset - Penthrox inhalator instellingen + + Pushing 90mg Rocuronium + + + 5ml Syringe / 90mg(60kg) Rocuronium + + + Push 96mg Rocuronium + + + Pushing 96mg Rocuronium + + + 5ml Syringe / 96mg(64kg) Rocuronium + + + Push 102mg Rocuronium + + + Pushing 102mg Rocuronium + + + 5ml Syringe / 102mg(68kg) Rocuronium + + + Push 108mg Rocuronium + + + Pushing 108mg Rocuronium + + + 5ml Syringe / 108mg(72kg) Rocuronium + + + Push 114mg Rocuronium + + + Pushing 114mg Rocuronium + + + 5ml Syringe / 114mg(76kg) Rocuronium - - Pervitin Settings - Nastavení Pervitinu - Paramètres de la Pervitine - Parámetros de la Pervitina - Impostazioni del Pervitin - Ustawienia Pervitinu - Configurações do Pervitin - Настройки Перфитина - Pervitin Einstellungen - 페르피틴 설정 - ペルビチンの設定 - 柏飛汀(Pervitin)設定 - 柏飞汀(Pervitin)设置 - Pervitiinin asetukset - Pervitin instellingen + + Push 120mg Rocuronium - - Phenylephrine Settings - Nastavení Fenylefrinu - Paramètres de la Phényléphrine - Parámetros de la Fenilefrina - Impostazioni della Fenilefrina - Ustawienia Fenylefryny - Configurações de Fenilefrina - Настройки Фенилэфрина - Phenylephrin Einstellungen - 페닐에프린 설정 - フェニレフリン設定 - 去氧腎上腺素設定 - 苯肾上腺素设置 - Fenyyliefriinin asetukset - Fenylefrine instellingen + + Pushing 120mg Rocuronium - - Reorientation Settings - Nastavení reorientace - Paramètres de la réorientation - Parámetros de la reorientación - Impostazioni di riorientamento - Ustawienia Cucenia - Configurações de reorientação - Настройки переориентации - Umorientierungs-Einstellungen - 뺨 때리기 설정 - 患者を刺激する機能設定 - 刺激患者設定 - 刺激患者设置 - Uudelleensuuntausasetukset - Heroriëntatie instellingen + + 5ml Syringe / 120mg(80kg) Rocuronium - - TXA Settings - Nastavení TXA - Paramètres de l'Acide Tranexamique - Parámetros del ATX - Impostazioni del TXA - Ustawienia TXA - Configurações de TXA - Настройки TXA - TXA Einstellungen - TXA 설정 - TXA設定 - TXA血栓素設定 - 血栓素设置 - TXA-asetukset - TXA instellingen + + Push 126mg Rocuronium - - TXA - TXA - Acide Tranexamique - ATX - TXA - TXA - TXA - TXA - TXA - TXA - トラネキサム酸 (TXA) - 血栓素 (TXA) - 血栓素 - TXA - TXA - TXA + + Pushing 126mg Rocuronium - - Encourages clot formation - Podporuje tvorbu sraženin - Favorise la coagulation - Favorece la coagulación - Favorisce la coagulazione - Wspomaga tworzenie skrzepów - Intensifica a coagulação - Способствует образованию тромбов - Fördert die Gerinnungsbildung - 혈전 형성 촉진 - 血液凝固を促進し、出血を抑えます - 促進血凝塊的形成, 有利於抑制出血 - 促进血凝块的形成, 有利于抑制出血 - Pıhtı oluşumunu teşvik eder - Edistää verihyytymien muodostumista - Bevorderd bloedstolling + + 5ml Syringe / 126mg(84kg) Rocuronium - - Push Amiodarone - Aplikovat Amiodaron - Injecter Amiodarone - Administrar Amiodarona - Iniettare l'amiodarone - Wstrzyknij Amiodaron - Injetar Amiodarona - Ввести Амиодарон - Amiodaron verabreichen - 아미오다론 투여 - アミオダロンを注入 - 注射胺碘酮 - 推注胺碘酮 - Amiodaron'u itin - Työnnä amiodaria - Injecteer Amiodaron + + Push 132mg Rocuronium - - Inject Atropine - Aplikovat Atropin - Injecter Atropine - Administrar Atropina - Iniettare l'atropina - Wstrzyknij Atropinę - Injetar Atropina - Ввести Атропин - Atropin verabreichen - 아트로핀 투여 - アトロピンを注入 - 注射阿托品 - 推注阿托品 - Atropin itin - Työnnä atropiinia - Injecteer Atropine + + Pushing 132mg Rocuronium - - Take Caffeine - Dát si Kofein - Prendre la caféine - Tomar cafeina - Assumi Caffeina - Użyj kofeinę - Administrar Cafeína - Выпить Кофеин - Koffein einnehmen - 카페인 복용 - カフェインを服用する - 服用 咖啡因 - 服用 咖啡因 - Ota kofeiinia - Neem Caffeïne + + 5ml Syringe / 132mg(88kg) Rocuronium - - Use Carbonate - Použít Uhličitan - Utiliser Sels d'Ammoniac - Administrar carbonato de amonio - Somministra Carbonato d'ammonio - Użyj soli trzeźwiących - Administrar Carbonato de Amônio - Ввести Карбонат - Ammoniumkarbonat verwenden - 탄산암모늄 사용 - 炭酸アンモニウムを使う - 使用碳酸銨 - 使用碳酸铵 - Karbonat kullanın - Käytä karbonaattia - Gebruik carbonaat + + Push 138mg Rocuronium - - Push EACA - Aplikovat EACA - Administrer de l'Acide aminocaproïque - Administrar EACA - Iniettare EACA - Wstrzyknij EACA - Injetar EACA - Ввести EACA - Verabreiche Aminocapronsäure - 아미노카프로산 투여 - E-アミノカプロン酸 (EACA)を注入 - 注射EACA - 推注EACA - Paina EACA - Injecteer EACA + + Pushing 138mg Rocuronium - - Push Epinephrine - Aplikovat Epinefrin - Administrer l'épinéphrine - Administrar Epinefrina - Somministra Epinefrina - Verabreiche Epinephrine - アドレナリンを注入 - 注射腎上腺素 - 推肾上腺素 - Injecteer IV Adrenaline + + 5ml Syringe / 138mg(92kg) Rocuronium - - Push Fentanyl - Aplikovat Fentanyl - Administrer du fentanyl - Administrar Fentanilo - Iniettare Fentanil - Wstrzyknij Fentanyl - Injetar Fentanil - Ввести Фентанил - Verabreiche Fentanyl - 펜타닐 투여 - フェンタニルを注入 - 注射芬太尼 - 推注芬太尼 - Työnnä fentanyyliä - Injecteer Fentanyl + + Push 144mg Rocuronium - - Push Ketamine - Aplikovat Ketamin - Administrer de la kétamine - Administrar Ketamina - Iniettare Ketamina - Wstrzyknij Ketaminę - Injetar Cetamina - Ввести Кетамин - Verabreiche Ketamin - 케타민 투여 - ケタミンを注入 - 注射氯胺酮 - 推注氯胺酮 - Paina ketamiinia - Injecteer Ketamine + + Pushing 144mg Rocuronium - - Push Lidocaine - Aplikovat Lidokain - Injecter Lidocaïne - Administrar Lidocaína - Iniettare la lidocaina - Wstrzyknij Lidokainę - Injetar Lidocaína - Ввести Лидокаин - Lidocain verabreichen - 리도카인 투여 - リドカインを注入 - 注射利多卡因 - 推注利多卡因 - Push Lidokain - Paina lidokaiinia - Injecteer Lidocaïne + + 5ml Syringe / 144mg(96kg) Rocuronium - - Push Nalbuphine - Aplikovat Nalbufin - Administrer de la nalbuphine - Administrar Nalbufina - Iniettare Nalbufina (Nubain) - Wstrzyknij Nalbufinę - Injetar Nalbufina - Ввести Налбуфин - Verabreiche Nalbuphin - 날부핀 투여 - ナルブフィンを注入 - 注射納布啡 - 推注纳布啡 - Paina nalbufiinia - Injecteer Nalbufine + + Push 150mg Rocuronium - - Use Naloxone - Použít Naloxon - Administrer Naloxone - Administrar Naloxona - Somministrare Naloxone - Użyj Naloksonu - Administrar Naloxona - Ввести Налоксон - Naloxone verwenden - 날록손 복용 - ナロキソンを投与 - 使用納洛酮 - 使用纳洛酮 - Nalokson kullanın - Käytä naloksonia - Gebruik Naloxone + + Pushing 150mg Rocuronium + + + 5ml Syringe / 150mg(100kg) Rocuronium + + + Rocuronium/Sugammadex Settings + + + Rocuronium, For RSI + + + Vial: Rocuronium - - Push Nitroglycerin - Aplikovat Nitroglycerin - Injecter Nitroglycérine - Administrar Nitroglicerina - Iniettare la nitroglicerina - Wstrzyknij Nitroglicerynę - Injetar Nitroglicerina - Ввести Нитроглицерин - Nitroglycerin verabreichen - 니트로글리세린 투여 - ニトログリセリンを注入 - 注射硝化甘油 - 推注硝化甘油 - Nitrogliserin itin - Paina nitroglyseriiniä - Injecteer Nitroglycerine + + Medical level required for Rocuronium/Sugammadex - - Push Norepinephrine - Aplikovat Norepinefrin - Injecter Noradrénaline - Administrar Norepinefrina - Iniettare la norepinefrina - Wstrzyknij Noradrenalinę - Injetar Norepinefrina - Ввести Норадреналин - Noradrenalin verabreichen - 노르에피네프린 투여 - ノルアドレナリンを注入 - 注射去甲腎上腺素 - 推注去甲肾上腺素 - Norepinefrin itin - Työnnä norepinefriiniä - Injecteer Noradrenaline + + Treatment time for AMS IV Medications - - Take Pervitin - Vzít si Pervitin - Prendre la pervitine - Tomar Pervitina - Assumi Pervitin - Użyj Pervitin - Administrar Pervitin - Принять Первитин - Pervitin einnehmen - 페르피틴 복용 - ペルビチンを服用する - 使用 柏飛丁 - 使用 柏飞丁 - Ota pervitiini - Neem Pervitin + + Treatment time for AMS IM Medications - - Push Phenylephrine - Aplikovat Fenylefrin - Injecter Phényléphrine - Administrar Fenilefrina - Iniettare la fenilefrina - Wstrzyknij Fenylefrynę - Injetar Fenilefrina - Ввести Фенилэфрин - Phenylephrin verabreichen - 페닐에프린 투여 - フェニレフリンを注入 - 注射去氧腎上腺素 - 推注苯肾上腺素 - Fenilefrin itin - Työnnä fenyyliefriiniä - Injecteer Fenylefrine (IV) + + Fentanyl Patch - - Inject Phenylephrine - Aplikovat Fenylefrin - Injecter Phényléphrine - Administrar Fenilefrina - Iniettare la fenilefrina - Wstrzyknij Fenylefrynę - Injetar Fenilefrina - Ввести Фенилэфрин - Phenylephrin verabreichen - 페닐에프린 투여 - フェニレフリンを注射 - 注射去氧腎上腺素 - 推注苯肾上腺素 - Fenilefrin itin - Injecteer Fenylefrine + + Apply Fentanyl Patch - - Reorient Patient - Reorientovat pacienta - Stimuler le patient - Estimular al paciente - Stimolare il paziente - Ocuć pacjenta - Reorientar Paciente - Переориентация пациента - Patient umorientieren - 환자 깨우기 - 患者を刺激する - 刺激患者 - 刺激患者 - Suuntaa potilas uudelleen - Heroriënteer patiënt + + Applying Fentanyl Patch... - - Push TXA - Aplikovat TXA - Injecter Acide Tranexamique - Administrar ATX - Iniettare TXA - Wstrzyknij TXA - Injetar TXA - Ввести TXA - TXA verabreichen - TXA 투여 - トラネキサム酸 (TXA)を注入 - 注射 TXA - 推注血栓素 - TXA'yı itin - Paina TXA - Injecteer TXA + + Remove Fentanyl Patch - - Use Penthrox Inhaler - Použít Penthrox Inhalátor - Utiliser l'inhalateur de Penthrox - Usar inhalador Penthrox - Usa l'Inalatore Penthrox - Usar Inalador de Penthrox - Использовать ингалятор Пентрокс - Verwende Penthrox-Inhalator - 펜트록스 흡입기 사용 - ペンスロックス吸入器を使う - 使用 Penthrox 吸入器 - 使用“绿哨”吸入式止痛药物 - Käytä penthrox-inhalaattoria - Gebruik Penthrox inhalator + + Removing Fentanyl Patch... - - Using - Používám - Utilisation - Usando - Usando - Używanie - Usando - С использованием - Verwenden - 사용 중 - 使用中 - 服用中 - 服用中 - Kullanılıyor - Käyttämällä - Wordt gebruikt + + Medical level required for Fentanyl Patches - - Torso - Trup - Torse - Torso - Torso - Tors - Torso - Торс - Torso - 몸통 - 胴体 - 軀幹 - 躯干 - Gövde - Torso + + Treatment time for Fentanyl Patches - - KAT - ADV Medical: Pharmacy - KAT - ADV Medical : Pharmacie - KAT - ADV Medica: Farmaceutica - KAT - ADV Medical: Medikamente - KAM - 薬学 (Pharmacy) + + Fentanyl Patch - - Blood clotting temporarily closed a wound on %1 - Srážení krve dočasně uzavřelo ránu na %1 - La coagulation a temporairement fermé une plaie sur %1 - La coagulación sanguínea cerró temporalmente una herida en %1 - Il coagulo di sangue ha temporaneamente chiuso una ferita su %1 - Coagulação estancou temporariamente um ferimento em %1 - Durch die Blutgerinnung wurde eine Wunde bei %1 vorübergehend geschlossen - 血液凝固が一時的に %1 の創傷を塞いだ - 凝血暫時閉合了 %1 的傷口 - 凝血暂时闭合了%1的伤口 - Wondstolling heeft een wond op %1 tijdelijk gedicht + + Fentanyl Patch (Full) - - Blood clotting permanently closed a wound on %1 - Srážení krve trvale uzavřelo ránu na %1 - La coagulation a définitivement fermé une plaie sur %1 - La coagulación sanguínea cerro permanentemente una herida en %1 - Il coagulo di sangue ha chiuso permanentemente una ferita su %1 - Coagulação estancou permanentemente um ferimento em %1 - Durch die Blutgerinnung wurde eine Wunde bei %1 dauerhaft geschlossen - 血液凝固が完全に %1 の創傷を塞いだ - 凝血永久閉合了 %1 的傷口 - 凝血永久闭合了%1的伤口 - Wondstolling heeft een wond op %1 permanent gedicht + + Fentanyl Patch (Partial) - - %1 performed dialysis - %1 provedl dialýzu - %1 a effectué une dialyse - %1 realizó una dialisis - %1 ha eseguito la dialisi - %1 przeprowadził dializę - %1 realizou diálise - %1 провел диализ - %1 hat eine Dialyse durchgeführt - %1 이(가) 투석을 수행했습니다 - %1 が透析を行った - %1 進行了透析 - %1 进行了透析 - %1 suoritettu dialyysi - %1 heeft een dialyse uitgevoerd + + Fentanyl Patch (Nearly Depleted) - - %1 performed a saline flush - %1 provedl výplach fyziologickým roztokem - %1 a effectué le rinçage salin - %1 realizó un enjuague con salino - %1 ha eseguito un lavaggio salino - %1 realizou uma lavagem salina - %1 провел промывание физиологическим раствором - %1 hat eine Kochsalzlösungsspülung durchgeführt - %1이(가) 식염수 주입을 수행했다 - %1 が生理食塩液フラッシュを実施 - %1 進行了鹽水沖洗 - %1 进行了盐水冲洗 - %1 suoritti suolaliuoksen huuhtelun - %1 voerde een salinespoeling uit + + Fentanyl Patch (Depleted) - - Head - Hlava - Tête - Cabeza - Testa - Głowa - Cabeça - Голова - Kopf - 머리 - 頭部 - 頭部 - 头部 - Kafa - Hoofd + + Med lvl req for Phenylephrine Autoinjector - - %1 injected %2 - %1 aplikoval %2 - %1 a injecté un(e) %2 - %1 inyectó %2 - %1 ha iniettato %2 - %1 włożył %2 - %1 injetou %2 - %1 введено %2 - %1 verabreichte %2 - %1 이(가) %2 에게 주사됨 - %1 が%2を注射した - %1 被注射了 %2 - %1 被注射了 %2 - % 1,% 2 eklendi - %1 pistetään %2 - %1 injecteerde %2 + + Treatment time for Phenylephrine Autoinjector - - %1 established a %2 - %1 zavedl %2 - %1 a inseré un(e) %2 - %1 ha colocado %2 - %1 ha posizionato %2 - %1 założył %2 - %1 inseriu %2 - %1 ввёл %2 - %1 legte ein %2 - %1 가 %2 에게 주사됨 - %1 が%2を刺入した - %1 被建立了一個 %2 - %1 被建立了一个 %2 - % 1,% 2 eklendi - %1 perusti %2 - %1 heeft een %2 aangelegd + + Pressure Affect Clots + + + If enabled, applying pressure to that bodypart increases the chance of a clot forming + + + Chance to clot Minor Wounds - - Left Arm - Levá Ruka - Bras gauche - Brazo Izquierdo - Braccio Sinistro - Lewa ręka - Braço Esquerdo - Левая рука - Linker Arm - 왼팔 - 左腕 - 左臂 - 左臂 - Sol Kol - Linkerarm + + Base chance for a Minor wound to clot - - Left Leg - Levá Noha - Jambe gauche - Pierna Izquierda - Gamba Sinistra - Lewa noga - Perna Esquerda - Левая нога - Linkes Bein - 왼다리 - 左足 - 左腿 - 左腿 - Sol Bacak - Linkerbeen + + Chance to clot Medium Wounds - - Medical level required for Amiodarone - Zdravotnická úroveň potřebná pro Amiodaron - Niveau médical requis pour l'Amiodarone - Nivel médico requerido para la Amiodarona - Livello medico richiesto per Amiodarone - Poziom wyszkolenia medycznego dla Amiodaronu - Nível médico exigido para uso de Amiodarona - Медицинский уровень, необходимый для использования Амиодарона - Anwendungszeit für Amiodaron - 아미오다론을 사용하는 데 필요한 의료 레벨 수준 변경 - アミオダロンの許可 - 胺碘酮需要的醫療等級 - 胺碘酮所需的医疗水平 - Amiodaronille vaadittu lääketieteellinen koulutustaso - Medisch niveau benodigd voor het gebruik van Amiodaron + + Base chance for a Medium wound to clot - - Allow applying IO - Povolit zavedení IO - Autoriser la pose d'IO - Permitir colocar IO - Permetti utilizzo IO - Poziom wyszkolenia medycznego dla IO - Permitir aplicar IO - Разрешить применение IO - Erlaubt die Anwendung von IO - IO 설정 허용 - IOの使用許可 - 允許施用骨內注射 (IO) - 允许使用IO - Salli IO:n käyttö - IO plaatsing niveau + + Chance to clot Large Wounds - - Changes what medical level is required to set IOs - Změní, která zdravotnická úroveň je potřeba k zavedení IO - Change le niveau médical requis pour poser des IO - Cambia el nivel médico que se requiere para colocar las IOs - Cambia quale livello medico è richiesto per posizionare la IO. - Poziom wyszkolenia medycznego potrzebnego do założenia IO - Muda qual nível médico é necessário para aplicar IOs - Изменяет, какой медицинский уровень требуется для установки IO - Benötigter medizinischer Grad, welcher für das Legen von IOs erforderlich ist - IO를 설정하는 데 필요한 의료 레벨 수준 변경 - IOの使用に必要な医療スキルのレベルを設定します。 - 更改設置骨內注射 (IO) 需要的醫療資格 - 更改设置 IO 所需的医疗级别 - Muuttaa IO:iden asettamiseen vaadittavaa lääketieteellistä tasoa - Bepaald welk medisch niveau benodigd is om IO's aan te kunnen leggen + + Base chance for a Large wound to clot - - Allow applying IV - Povolit zavedení IV - Autoriser la pose d'IV - Permitir colocar IV - Permetti utilizzo IV - Poziom wyszkolenia medycznego dla IV - Permitir aplicar IV - Разрешить внутривенное введение - Erlaubt die Anwendung von IV - IV 설정 허용 - IVの使用許可 - 允許施用靜脈注射 (IV) - 允许使用IV - Salli hakeminen IV - IV plaatsing niveau + + Squeezing Fluid Bag - - Changes what medical level is required to set IVs - Změní, která zdravotnická úroveň je potřeba k zavedení IV - Niveau nécessaire pour poser une IV - Cambia el nivel médico que se requiere para colocar las IVs - Cambia il livello medico richiesto per impostare le IV - Poziom wyszkolenia medycznego potrzebnego do założenia kaniul IV - Muda qual nível médico é necessário para aplicar IVs - Изменяет медицинский уровень, необходимый для установки IV. - Benötigter medizinischer Grad, welcher für das Legen von IVs erforderlich ist - IV를 설정하는 데 필요한 의료 레벨 수준 변경 - IVの使用に必要な医療スキルのレベルを設定します。 - 更改設置 IV 需要的醫療級別 - 改变设置 IV 所需的医疗级别 - IV'leri'ları ayarlamak için gereken tıbbi düzeyi değiştirir - Muuttaa, mitä lääketieteen koulutustasoa tarvitaan IV:n lisäämiseen - Bepaald welk medisch niveau benodigd is om IV's aan te kunnen leggen + + Squeeze Fluid Bag - - Medical level required for Atropine - Zdravotnická úroveň potřebná pro Atropin - Niveau médical requis pour l'Atropine - Nivel médico requerido para la Atropina - Livello medico richiesto per l'Atropina - Poziom wyszkolenia medycznego dla Atropiny - Nível médico exigido para uso de Atropina - Медицинский уровень, необходимый для использования Атропина - Benötigter medizinischer Grad, für die Gabe von Atropin - 아트로핀을 사용하는 데 필요한 의료 레벨 수준 변경 - アトロピンの許可 - 阿托品需要的醫療等級 - 阿托品所需的医疗水平 - Atropiinia varten vaadittava lääketieteellinen koulutustaso - Medisch niveau benodigd voor het gebruik van Atropine + + Pressure Already Applied - - Allow using CWMP - Autoriser l'utilisation du CWMP - Consenti l'uso dei CWMP - Erlaube die Verwendung von CWMP - 戦闘傷病治療薬(CWMP)の許可 + + Started Squeezing Fluid Bag - - Allow using Caffeine - Autoriser l'utilisation de la caféine - Consenti l'uso della caffeina - Erlaube die Verwendung von Koffein - カフェインの許可 + + Stopped Squeezing Fluid Bag - - Allow using Carbonate - Povolení použití Uhličitanu - Autoriser l'usage des Sels d'Ammoniac - Habilitar el uso del Carbonato - Consenti di usare il Carbonato - Poziom wyszkolenia medycznego dla soli trzeźwiących - Permitir o uso de Carbonato - Разрешить использование Карбоната - Erlaube die Verwendung von Carbonat - 탄산암모늄 사용 허가 - 炭酸アンモニウムの使用を許可 - 允許使用碳酸鹽 - 允许使用碳酸盐 - Salli karbonaatin käyttö - Sta gebruik van carbonaat toe + + IV Bag Squeezed - - Medical level required for EACA - Zdravotnická úroveň potřebná pro EACA - Niveau médical requis pour l'Acide Aminocaproïque - Nivel médico requerido para el EACA - Livello medico richiesto per EACA - Poziom wyszkolenia medycznego dla EACA - Nível médico exigido para uso de EACA - Медицинский уровень, необходимый для EACA - Benötigter medizinischer Grad, für die Gabe von Aminocapronsäure - 아미노카프로산을 사용하는 데 필요한 의료 레벨 수준 변경 - EACAの許可 - EACA需要的醫療等級 - EACA所需的医疗水平 - Lääketieteellinen koulutustaso vaaditaan EACA:lle - Medisch niveau benodigd voor het gebruik van EACA + + Pressure Bag Applied - - Medical level required for IV Epinephrine - Úroveň zdravotnického výcviku pro použití IV Epinefrinu - Niveau médical requis pour l'épinéphrine IV - Nivel médico requerido para Epinefrina IV - Livello medico richiesto per Epinefrina IV - Erforderliches medizinisches Niveau für die Gabe von IV-Epinephrine - アドレナリン静脈注射 (IV)の許可 - 靜脈注射腎上腺素需要的醫療等級 - 静脉注射肾上腺素所需的医疗水平 - Vereist medisch niveau voor gebruik van IV Adrenaline + + Apply Pressure Bag - - Medical level required for Etomidate - Zdravotnická úroveň potřebná pro Etomidát - Niveau médical requis pour l'Étomidate - Nivel médico requerido para el Etomidato - Livello medico richiesto per Etomidato - Poziom wyszkolenia medycznego dla Etomidatu - Nível médico exigido para uso de Etomidato - Медицинский уровень, необходимый для применения Этомидата - Benötigter medizinischer Grad, für die Gabe von Etomidat - 에토미데이트를 사용하는 데 필요한 의료 레벨 수준 변경 - エトミデートの許可 - 依托咪酯需要的醫療等級 - 依托咪酯所需的医疗水平 - Etomidaatille vaadittava lääketieteellisen hoidon taso - Medisch niveau benodigd voor het gebruik van Etomidaat + + Applying Pressure Bag - - Medical level required for Fentanyl - Zdravotnická úroveň potřebná pro Fentanyl - Niveau médical requis pour le Fentanyl - Nivel médico requerido para el Fentalino - Livello medico richiesto per Fentanil - Poziom wyszkolenia medycznego dla Fentanylu - Nível médico exigido para uso de Fentanil - Медицинский уровень, необходимый для использования Фентанила - Benötigter medizinischer Grad, für die Gabe von Fentanyl - 펜타닐을 사용하는 데 필요한 의료 레벨 수준 변경 - フェンタニルの許可 - 芬太尼需要的醫療等級 - 芬太尼所需的医疗水平 - Fentanyylille vaadittu lääketieteellinen koulutustaso - Medisch niveau benodigd voor het gebruik van Fentanyl + + Remove Pressure Bag - - Medical level required for Flumazenil - Zdravotnická úroveň potřebná pro Flumazenil - Niveau médical requis pour le Flumazénil - Nivel médico requerido para el Flumazenil - Livello medico richiesto per Flumazenil - Poziom wyszkolenia medycznego dla Flumazenilu - Nível médico exigido para uso de Flumazenil - Медицинский уровень, необходимый для использования Флумазенила - Benötigter medizinischer Grad, für die Gabe von Flumazenil - 플루마제닐을 사용하는 데 필요한 의료 레벨 수준 변경 - フルマゼニルの許可 - 氟馬西尼需要的醫療等級 - 氟马西尼所需的医疗水平 - Flumatseniilin edellyttämä lääketieteellinen koulutustaso - Medisch niveau benodigd voor het gebruik van Flumazenil + + Removing Pressure Bag - - Medical level required for Ketamine - Lékařská úroveň potřebná pro Ketamin - Niveau médical requis pour la Kétamine - Nivel médico requerido para la Ketamina - Livello medico richiesto per la Ketamina - Poziom wyszkolenia medycznego dla Ketaminy - Nível médico exigido para uso de Cetamina - Медицинский уровень, необходимый для использования Кетамина - Benötigter medizinischer Grad, für die Gabe von Ketamin - 케타민을 사용하는 데 필요한 의료 레벨 수준 변경 - ケタミンの許可 - 氯胺酮需要的醫療等級 - 氯胺酮所需的医疗水平 - Lääketieteellinen koulutustaso vaaditaan ketamiinille - Medisch niveau benodigd voor het gebruik van Ketamine + + Pressure Bag - - Medical level required for Lidocaine - Zdravotnická úroveň potřebná pro Lidokain - Niveau médical requis pour la Lidocaïne - Nivel médico requerido para la Lidocaína - Livello medico richiesto per la Lidocaina - Poziom wyszkolenia medycznego dla Lidokainy - Nível médico exigido para uso de Lidocaína - Медицинский уровень, необходимый для применения Лидокаина - Benötigter medizinischer Grad, für die Gabe von Lidocain - 리도카인을 사용하는 데 필요한 의료 레벨 수준 변경 - リドカインの許可 - 利多卡因需要的醫療等級 - 利多卡因所需的医疗水平 - Lääketieteellinen koulutustaso vaaditaan lidokaiinin käyttöön - Medisch niveau benodigd voor het gebruik van Lidocaïne + + Pressure Bag, increases flow rate of fluid bags when attached + + + Results: %1 + + + Push 5mg Metoprolol + + + Pushing 5mg Metoprolol + + + 5ml Syringe / 5mg Metoprolol + + + Push 10mg Metoprolol + + + Pushing 10mg Metoprolol + + + 5ml Syringe / 10mg Metoprolol + + + Push 15mg Metoprolol + + + Pushing 15mg Metoprolol + + + 5ml Syringe / 15mg Metoprolol + + + Push 2mg Diazepam + + + Pushing 2mg Diazepam + + + 5ml Syringe / 2mg Diazepam - - Medical level required for Lorazepam - Zdravotnická úroveň potřebná pro Lorazepam - Niveau médical requis pour le Lorazépam - Nivel médico requerido para el Lorazepam - Livello medico richiesto per Lorazepam - Poziom wyszkolenia medycznego dla Lorazepamu - Nível médico exigido para uso de Lorazepam - Медицинский уровень, необходимый для применения Лоразепама - Benötigter medizinischer Grad, für die Gabe von Lorazepam - 로라제팜을 사용하는 데 필요한 의료 레벨 수준 변경 - ロラゼパムの許可 - 勞拉西泮需要的醫療等級 - 劳拉西泮所需的医疗水平 - Lääketieteellinen koulutustaso vaaditaan loratsepaamia varten - Medisch niveau benodigd voor het gebruik van Lorazepam + + Push 5mg Diazepam - - Medical level required for Nalbuphine - Zdravotnická úroveň potřebná pro Nalbufin - Niveau médical requis pour la Nalbuphine - Nivel médico requerido para la Nalbufina - Livello medico richiesto per Nalbufina (nubain) - Poziom wyszkolenia medycznego dla Nalbuphinu - Nível médico exigido para uso de Nalbufina - Медицинский уровень, необходимый для использования Налбуфина - Benötigter medizinischer Grad, für die Gabe von Nalbuphin - 날부핀을 사용하는 데 필요한 의료 레벨 수준 변경 - ナルブフィンの許可 - 納布啡需要的醫療等級 - 纳布啡所需的医疗水平 - Lääketieteellinen koulutustaso vaaditaan nalbufiinille - Medisch niveau benodigd voor het gebruik van Nalbufine + + Pushing 5mg Diazepam - - Medical level required for Naloxone - Zdravotnická úroveň potřebná pro Naloxon - Niveau médical requis pour la Naloxone - Nivel médico requerido para la Naloxona - Livello medico richiesto per Naloxone - Poziom wyszkolenia medycznego dla Naloksonu - Nível médico exigido para administrar Naloxona - Медицинский уровень, необходимый для использования Налоксона - Benötigter medizinischer Grad, für die Gabe von Naloxon - 날록손을 사용할 수 있는 필요한 의료 레벨 수준 변경 - ナロキソンの許可 - 納洛酮需要的醫療等級 - 纳洛酮所需的医疗水平 - Naloksonille vaaditaan lääketieteen koulutustaso - Medisch niveau benodigd voor gebruik van Naloxone + + 5ml Syringe / 5mg Diazepam - - Medical level required for Nitroglycerin - Zdravotnická úroveň potřebná pro Nitroglycerin - Niveau médical requis pour la Nitroglycérine - Nivel médico requerido para la Nitroglicerina - Livello medico richiesto per la Nitroglicerina - Poziom wyszkolenia medycznego dla Nitrogliceryny - Nível médico exigido para uso de Nitroglicerina - Медицинский уровень, необходимый для использования Нитроглицерина - Anwendungszeit für Nitroglycerin - 니트로글리세린을 사용하는 데 필요한 의료 레벨 수준 변경 - ニトログリセリンの許可 - 硝酸甘油需要的醫療等級 - 硝酸甘油所需的医疗水平 - Nitroglyseriinille vaadittu lääketieteellinen koulutustaso - Medisch niveau benodigd voor het gebruik van Nitroglycerine + + Push 10mg Diazepam - - Medical level required for Norepinephrine - Zdravotnická úroveň potřebná pro Norepinefrin - Niveau médical requis pour la Noradrénaline - Nivel médico requerido para la Norepinefrina - Livello medico richiesto per la Norepinefrina - Poziom wyszkolenia medycznego dla Noradrenaliny - Nível médico exigido para uso de Norepinefrina - Медицинский уровень, необходимый для использования Норадреналина - Benötigter medizinischer Grad, für die Gabe von Norepinephrin - 노르에피네프린을 사용하는 데 필요한 의료 레벨 수준 변경 - ノルアドレナリンの許可 - 去甲腎上腺素需要的醫療等級 - 去甲肾上腺素所需的医疗水平 - Norepinefriinin käytön edellyttämä lääketieteellinen taso - Medisch niveau benodigd voor het gebruik van Noradrenaline + + Pushing 10mg Diazepam - - Medical level required for Pervitin - Zdravotnická úroveň potřebná k použití Pervitinu - Niveau médical requis pour la Pervitine - Nivel médico requerido para la Pervitina - Livello medico richiesto per il Pervitin - Poziom wyszkolenia medycznego dla Pervitinu - Nível médico exigido para administrar Pervitin - Медицинский уровень, необходимый для использования Первитина - Erforderliches medizinischer Grad für die Gabe von Pervitin - 페르피틴을 사용하는데 필요한 의료 레벨 수준 변경 - ペルビチンの許可 - 柏飛汀(Pervitin)需要的醫療等級 - 柏飞汀(Pervitin)所需的医疗水平 - Pervitiini vaatii lääketieteellisen koulutustason - Medisch niveau benodigd voor het gebruik van Pervitin + + 5ml Syringe / 10mg Diazepam - - Medical level required for Phenylephrine - Zdravotnická úroveň potřebná pro Fenylefrin - Niveau médical requis pour la Phényléphrine - Nivel médico requerido para la Fenilefrina - Livello medico richiesto per la Fenilefrina - Poziom wyszkolenia medycznego dla Fenylefryny - Nível médico exigido para uso de Fenilefrina - Медицинский уровень, необходимый для использования Фенилэфрина - Benötigter medizinischer Grad, für die Gabe von Phenylephrin - 페닐에프린을 사용하는 데 필요한 의료 레벨 수준 변경 - フェニレフリンの許可 - 去氧腎上腺素需要的醫療等級 - 苯肾上腺素所需的医疗水平 - Lääketieteellinen taso vaaditaan fenyyliefriinille - Medisch niveau benodigd voor het gebruik van Fenylefrine + + Vial: Diazepam - - Medical level required for TXA - Zdravotnická úroveň potřebná pro TXA - Niveau médical requis pour l'Acide Tranexamique - Nivel médico requerido para el ATX - Livello medico richiesto per TXA - Poziom wyszkolenia medycznego dla TXA - Nível médico exigido para administrar TXA - Медицинский уровень, необходимый для TXA - Benötigter medizinischer Grad, für die Gabe von TXA - TXA를 사용하는 데 필요한 의료 레벨 수준 변경 - TXAの許可 - 血栓素(TXA)需要的醫療等級 - 血栓素(TXA)所需的医疗水平 - Lääketieteellinen koulutustaso vaaditaan TXA:n käyttöön - Medisch niveau benodigd voor het gebruik van TXA + + Used to reduce Respiratory Rate - - [KAM] Medicines crate - [KAM] Bedna s medikamenty - [KAM] Caisse de médicaments - [KAM] Caja de medicina - [KAT] Cassa medicinali - [KAM] Skrzynia z lekami - [KAM] Caixa de medicamentos - [КАМ] Ящик с лекарствами - [KAM] Medikamentenkiste - [KAM] 의약품 상자 - [KAM] 医薬品箱 - [KAM]藥品箱 - [KAM]药品箱 - [KAM] Lääkelaatikko - [KAM] Medijnenkrat + + Vial: Metoprolol - - %1 pushed %2 - %1 aplikoval %2 - %1 a administré un(e) %2 - %1 administró %2 - %1 ha somministrato %2 - %1 wstrzyknął %2 - %1 administrou %2 - %1 нажал %2 - %1 verabreichte %2 - %1 이(가) %2 에게 투여됨 - %1 が%2を注入した - %1 被注射了 %2 - %1 被注射了 %2 - % 1,% 2 eklendi - %1 työnnettiin %2 - %1 injecteerde %2 + + Used to reduce heart rate - - Right Arm - Pravá Ruka - Bras droit - Brazo Derecho - Braccio Destro - Prawa ręka - Braço Direito - Правая рука - Rechter Arm - 오른팔 - 右腕 - 右臂 - 右臂 - Sağ Kol - Rechterarm + + Medical level required for Metoprolol - - Right Leg - Pravá Noha - Jambe droite - Pierna Derecha - Gamba Destra - Prawa noga - Perna Direita - Правая нога - Rechtes Bein - 오른다리 - 右足 - 右腿 - 右腿 - Sağ Bacak - Rechterbeen + + Medical level required for Diazepam - - Treatment time for Amiodarone - Doba léčby pro Amiodaron - Temps de traitement de l'Amiodarone - Tiempo para uso de la Amiodarona - Tempo di trattamento per Amiodarone - Czas na wstrzyknięcie Amiodaronu - Tempo de uso de Amiodarona - Время обработки Амиодароном - Benötigter medizinischer Grad, für die Gabe von Amiodaron - 아미오다론으로 치료하는 시간 - アミオダロンの所要時間 - 胺碘酮的治療時間 - 胺碘酮的治疗时间 - Amiodaronin hoitoaika - Behandeltijd van Amiodaron + + Medication Settings - - Time to establish IOs - Čas k zavedení IO - Temps pour poser une IO - Tiempo para establecer las IO - Tempo per posizionare gli IO - Czas zakładania IO - Tempo de estabelecimento de IO - Время установки IO - Zeit zum Anlegen von IOs - IO를 꽂는 시간 변경 - IO刺入の所要時間 - 建立 IO 注射的時間 - 建立 IO 注射的时间 - IO'ları oluşturma zamanı - Aika luoda IO:t - Aanbrengtijd voor IO's + + Failed to place IV - - Time to establish IVs - Čas k zavedení IV - Temps pour poser une IV - Tiempo para establecer las IV - Tempo per inserire IV - Czas zakładania IV - Tempo de estabelecimento de IV - Время установки IV - Zeit zum Anlegen von IVs - IV를 꽂는 시간 변경 - IV刺入の所要時間 - 建立 IV 注射的時間 - 建立 IV 注射的时间 - IV'ler oluşturma zamanı - IV lisäämiseen tarvittava aika - Aanbrengtijd voor IV's + + Failed to place IO - - Treatment time for Atropine - Doba léčby na Atropin - Temps de traitement de l'Atropine - Tiempo para uso de la Atropina - Tempo di trattamento per l'Atropina - Czas na wstrzyknięcie Atropiny - Tempo de uso de Atropina - Время обратки Атропином - Anwendungszeit für Atropin - 아트로핀으로 치료하는 시간 - アトロピンの所要時間 - 阿托品的治療時間 - 阿托品的治疗时间 - Atropiinin hoitoaika - Behandeltijd van Atropine + + IV Damage Threshold - - Treatment time for CWMP - Temps de traitement pour le CWMP - Tempo di trattamento per il CWMP - Anwendungszeit für CWMP - 戦闘傷病治療薬(CWMP)の所要時間 + + Baseline threshold for a limb to be considered "Too damaged" to place an IV in - - Treatment time for Caffeine - Temps de traitement pour la caféine - Tempo di trattamento per la Caffeina - Anwendungszeit für Koffein - カフェインの所要時間 + + IV Leakage Threshold - - Treatment time for Carbonate - Doba ošetření Uhličitanem - Temps de traitement des Sels d'Ammoniac - Tiempo para uso del Carbonato - Tempo di trattamento per il Carbonato - Czas na użycie soli trzeźwiących - Tempo de uso de Carbonato - Время обработки Карбонатом - Anwendungszeit für Carbonat - 탄산암모늄으로 치료하는 시간 - 炭酸アンモニウムの所要時間 - 碳酸鹽的治療時間 - 碳酸盐的治疗时间 - Karbonaatin käsittelyaika - Behandeltijd van carbonaat + + Threshold for a limb to be considered damaged and cause leakage + + + Medical level required for Bicarbonate + + + Vial: Bicarbonate + + + Used to manage Ph + + + Push 80mEq Bicarbonate - - Treatment time for EACA - Doba léčby pro EACA - Temps de traitement de l'Acide Aminocaproïque - Tiempo para uso del EACA - Tempo di trattamento per EACA - Czas na wstrzyknięcie EACA - Tempo de uso de EACA - Время обработки для EACA - Anwendungszeit für Aminocapronsäure - 아미노카프로산으로 치료하는 시간 - EACAの所要時間 - EACA的治療時間 - EACA的治疗时间 - Hoitoaika EACA:lle - Behandeltijd van EACA + + Pushing 80mEq Bicarbonate - - Treatment time for IV Epinephrine - Čas ošetření pro IV Epinefrin - Temps de traitement pour l'épinéphrine IV - Tiempo de tratamiento para Epinefrina IV - Tempo di trattamento per Epinefrina IV - Behandlungszeit für intravenöses Epinephrine - アドレナリン静脈注射 (IV)の所要時間 - 靜脈注射腎上腺素的治療時間 - 静脉注射肾上腺素的治疗时间 - Toedieningstijd voor IV Adrenaline + + 5ml Syringe / 80mEq Bicarbonate - - Treatment time for Etomidate - Doba léčby pro Etomidát - Temps de traitement de l'Étomidate - Tiempo para uso del Etomidato - Tempo di trattamento per Etomidato - Czas na wstrzyknięcie Etomidatu - Tempo de uso de Etomidato - Время обработки Этомидатом - Anwendungszeit für Etomidat - 에토미데이트로 치료하는 시간 - エトミデートの所要時間 - 依托咪酯的治療時間 - 依托咪酯的治疗时间 - Etomidatin hoitoaika - Behandeltijd van Etomidaat + + Medical level required for Calcium Chloride - - Treatment time for Fentanyl - Doba léčby pro Fentanyl - Temps de traitement du Fentanyl - Tiempo para uso del Fentalino - Tempo di trattamento per Fentanil - Czas na wstrzyknięcie Fentanylu - Tempo de uso de Fentanil - Время обработки Фентанилом - Anwendungszeit für Fentanyl - 펜타닐로 치료하는 시간 - フェンタニルの所要時間 - 芬太尼的治療時間 - 芬太尼的治疗时间 - Fentanyylin hoitoaika - Behandeltijd van Fentanyl + + Vial: Calcium Chloride - - Treatment time for Flumazenil - Doba léčby pro Flumazenil - Temps de traitement du Flumazénil - Tiempo para uso del Flumazenil - Tempo di trattamento per Flumazenil - Czas na wstrzyknięcie Flumazenilu - Tempo de uso de Flumazenil - Время обработки Флумазенилом - Anwendungszeit für Flumazenil - 플루마제닐로 치료하는 시간 - フルマゼニルの所要時間 - 氟馬西尼的治療時間 - 氟马西尼的治疗时间 - Flumatseniilin hoitoaika - Behandeltijd van Flumazenil + + Used to manage calcium - - Treatment time for Ketamine - Doba léčby pro Ketamin - Temps de traitement de la Kétamine - Tiempo para uso de la Ketamina - Tempo di trattamento per la Ketamina - Czas na wstrzyknięcie Ketaminy - Tempo de uso de Cetamina - Время обработки Кетамином - Anwendungszeit für Ketamin - 케타민으로 치료하는 시간 - ケタミンの所要時間 - 氯胺酮的治療時間 - 氯胺酮的治疗时间 - Ketamiinin hoitoaika - Behandeltijd van Ketamine + + Push 1g Calcium Chloride - - Treatment time for Lidocaine - Doba léčby na Lidokain - Temps de traitement de la Lidocaïne - Tiempo para uso de la Lidocaína - Tempo di trattamento per la Lidocaina - Czas na wstrzyknięcie Lidokainy - Tempo de uso de Lidocaína - Время обработки Лидокаином - Anwendungszeit für Lidocain - 리도카인으로 치료하는 시간 - リドカインの所要時間 - 利多卡因的治療時間 - 利多卡因的治疗时间 - Lidokaiinin hoitoaika - Behandeltijd van Lidocaïne + + Pushing 1g Calcium Chloride - - Treatment time for Lorazepam - Doba léčby pro Lorazepam - Temps de traitement du Lorazépam - Tiempo para uso del Lorazepam - Tempo di trattamento per Lorazepam - Czas na wstrzyknięcie Lorazepamu - Tempo de uso de Lorazepam - Время обработки Лоразепамом - Anwendungszeit für Lorazepam - 로라제팜으로 치료하는 시간 - ロラゼパムの所要時間 - 勞拉西泮的治療時間 - 劳拉西泮的治疗时间 - Loratsepaamin hoitoaika - Behandeltijd van Lorazepam + + 5ml Syringe / 1g Calcium Chloride - - Treatment time for Nalbuphine - Doba léčby pro Nalbufin - Temps de traitement de la Nalbuphine - Tiempo para uso de la Nalbufina - Tempo di trattamento per Nalbufina (nubain) - Czas na wstrzyknięcie Nalbuphinu - Tempo de uso de Nalbufina - Время обработки Налбуфином - Anwendungszeit für Nalbuphin - 날부핀으로 치료하는 시간 - ナルブフィンの所要時間 - 納布啡的治療時間 - 纳布啡的治疗时间 - Nalbufiinin hoitoaika - Behandeltijd van Nalbufine + + Medical level required for Calcium Gluconate - - Treatment time for Naloxone - Doba léčby pro Naloxon - Temps de traitement de la Naloxone - Tiempo para uso de la Naloxona - Tempo di trattamento per il Naloxone - Czas na wstrzyknięcie Naloksonu - Tempo de uso de Naloxona - Время обработки Налоксоном - Anwendungszeit für Naloxon - 날록손으로 치료하는 시간 - ナロキソンの所要時間 - 納洛酮的治療時間 - 纳洛酮的治疗时间 - Naloksonin hoitoaika - Behandeltijd van Naloxone + + Vial: Calcium Gluconate - - Treatment time for Nitroglycerin - Doba léčby Nitroglycerinu - Temps de traitement de la Nitroglycérine - Tiempo para uso de la Nitroglicerina - Tempo di trattamento per la Nitroglicerina - Czas na wstrzyknięcie Nitrogliceryny - Tempo de uso de Nitroglicerina - Время обработки Нитроглицерином - Benötigter medizinischer Grad, für die Gabe von Nitroglycerin - 니트로글리세린으로 치료하는 시간 - ニトログリセリンの所要時間 - 硝酸甘油的治療時間 - 硝酸甘油的治疗时间 - Nitroglyseriinin hoitoaika - Behandeltijd van Nitroglycerine + + Used to manage calcium - - Treatment time for Norepinephrine - Doba léčby na Norepinefrin - Temps de traitement de la Noradrénaline - Tiempo para uso de la Norepinefrina - Tempo di trattamento per la Norepinefrina - Czas na wstrzyknięcie Noradrenaliny - Tempo de uso de Norepinefrina - Время обработки Норадреналином - Anwendungszeit für Norepinephrin - 노르에피네프린으로 치료하는 시간 - ノルアドレナリンの所要時間 - 去甲腎上腺素的治療時間 - 去甲肾上腺素的治疗时间 - Hoitoaika norepinefriinille - Behandeltijd van Noradrenaline + + Push 1g Calcium Gluconate - - Treatment time for Pervitin - Doba podání Pervitinu - Temps de traitement de la Pervitine - Tiempo de uso de la pervitina - Tempo di trattamento per il Pervitin - Czas na użycie Pervitinu - Tempo de uso de Pervitin - Время лечения Первитином - Anwendungszeit für Pervitin - 페르피틴으로 치료하는 시간 - ペルビチンの所要時間 - 柏飛汀(Pervitin)的治療時間 - 柏飞汀(Pervitin)的治疗时间 - Pervitiinin hoitoaika - Behandeltijd van Pervitin + + Pushing 1g Calcium Gluconate - - Treatment time for Phenylephrine - Doba léčby pro Fenylefrin - Temps de traitement de la Phényléphrine - Tiempo para uso de la Fenilefrina - Tempo di trattamento per la Fenilefrina - Czas na wstrzyknięcie Fenylefryny - Tempo de uso de Fenilefrina - Время обработки Фенилэфрином - Anwendungszeit für Phenylephrin - 페닐에프린으로 치료하는 시간 - フェニレフリンの所要時間 - 去氧腎上腺素的治療時間 - 苯肾上腺素的治疗时间 - Käsittelyaika fenyylille - Behandeltijd van Fenylefrine + + 5ml Syringe / 1g Calcium Gluconate - - Treatment time for reorientation - Doba léčby pro reorientaci - Temps de traitement pour réorienter - Tiempo para bofetada - Tempo di trattamento per riorientamento - Czas cucenia - Tempo de tratamento para reorientação - Время обработки для переориентации - Behandlungszeit für die Umorientierung - 뺨을 때리는 데 걸리는 시간 - 患者を刺激する所要時間 - 恢復體態的治療時間 - 恢复体态的治疗时间 - Hoitoaika uudelleensuuntautumiseen - Behandelingstijd voor heroriëntatie + + Give Hypertonic Saline (500ml) - - Treatment time for TXA - Doba léčby pro TXA - Temps de traitement de l'Acide Tranexamique - Tiempo para uso del ATX - Tempo di trattamento per TXA - Czas na wstrzyknięcie TXA - Tempo de uso de TXA - Время обработки для TXA - Anwendungszeit für TXA - TXA로 치료하는 시간 - TXAの所要時間 - 血栓素(TXA)的治療時間 - 血栓素(TXA)的治疗时间 - TXA:n hoitoaika - Behandeltijd van TXA + + Give Hypertonic Saline (250ml) - - %1 used %2 - %1 aplikoval %2 - %1 a utilisé un(e) %2 - %1 usó %2 - %1 ha usato %2 - %1 użył %2 - %1 usou %1 - %1 использует %2 - %1 nutzte %2 - %1 이(가) %2 에게 사용됨 - %1 が%2を使用した - %1 被施用了 %2 - %1 被施用了 %2 - % 1,% 2 eklendi - %1 käytetty %2 - %1 gebruikte %2 + + Give Hypertonic Saline (100ml) + + + Receiving Hypertonic Saline IV [%1ml] + + + Transfusing Hypertonic Saline... + + + Give Hextend (1000ml) + + + Give Hextend (500ml) + + + Give Hextend (250ml) + + + Receiving Hextend IV [%1ml] + + + Transfusing Hextend... + + + IV Site Leaking + + + IV Site Blown + + + Active Dialysis diff --git a/addons/pharma/ui/icon_AdenosineIV.paa b/addons/pharma/ui/icon_AdenosineIV.paa new file mode 100644 index 000000000..3d5d733ba Binary files /dev/null and b/addons/pharma/ui/icon_AdenosineIV.paa differ diff --git a/addons/pharma/ui/icon_Alteplase.paa b/addons/pharma/ui/icon_Alteplase.paa new file mode 100644 index 000000000..82914ba8f Binary files /dev/null and b/addons/pharma/ui/icon_Alteplase.paa differ diff --git a/addons/pharma/ui/icon_AtropineIV.paa b/addons/pharma/ui/icon_AtropineIV.paa new file mode 100644 index 000000000..82b6115fe Binary files /dev/null and b/addons/pharma/ui/icon_AtropineIV.paa differ diff --git a/addons/pharma/ui/icon_Bicarbonate.paa b/addons/pharma/ui/icon_Bicarbonate.paa new file mode 100644 index 000000000..e916ff505 Binary files /dev/null and b/addons/pharma/ui/icon_Bicarbonate.paa differ diff --git a/addons/pharma/ui/icon_CalciumChloride.paa b/addons/pharma/ui/icon_CalciumChloride.paa new file mode 100644 index 000000000..8699fa42c Binary files /dev/null and b/addons/pharma/ui/icon_CalciumChloride.paa differ diff --git a/addons/pharma/ui/icon_CalciumGluconate.paa b/addons/pharma/ui/icon_CalciumGluconate.paa new file mode 100644 index 000000000..a157c3ce5 Binary files /dev/null and b/addons/pharma/ui/icon_CalciumGluconate.paa differ diff --git a/addons/pharma/ui/icon_Diazepam.paa b/addons/pharma/ui/icon_Diazepam.paa new file mode 100644 index 000000000..0b5153386 Binary files /dev/null and b/addons/pharma/ui/icon_Diazepam.paa differ diff --git a/addons/pharma/ui/icon_Doxapram.paa b/addons/pharma/ui/icon_Doxapram.paa new file mode 100644 index 000000000..6e43bd7d7 Binary files /dev/null and b/addons/pharma/ui/icon_Doxapram.paa differ diff --git a/addons/pharma/ui/icon_EJV.paa b/addons/pharma/ui/icon_EJV.paa new file mode 100644 index 000000000..532b6b755 Binary files /dev/null and b/addons/pharma/ui/icon_EJV.paa differ diff --git a/addons/pharma/ui/icon_Metoprolol.paa b/addons/pharma/ui/icon_Metoprolol.paa new file mode 100644 index 000000000..10f718691 Binary files /dev/null and b/addons/pharma/ui/icon_Metoprolol.paa differ diff --git a/addons/pharma/ui/icon_MorphineIV.paa b/addons/pharma/ui/icon_MorphineIV.paa new file mode 100644 index 000000000..4aecda0d5 Binary files /dev/null and b/addons/pharma/ui/icon_MorphineIV.paa differ diff --git a/addons/pharma/ui/icon_Rocuronium.paa b/addons/pharma/ui/icon_Rocuronium.paa new file mode 100644 index 000000000..d6938b890 Binary files /dev/null and b/addons/pharma/ui/icon_Rocuronium.paa differ diff --git a/addons/pharma/ui/icon_Succinylcholine.paa b/addons/pharma/ui/icon_Succinylcholine.paa new file mode 100644 index 000000000..ebaee7a63 Binary files /dev/null and b/addons/pharma/ui/icon_Succinylcholine.paa differ diff --git a/addons/pharma/ui/icon_Sugammadex.paa b/addons/pharma/ui/icon_Sugammadex.paa new file mode 100644 index 000000000..2c3283ff8 Binary files /dev/null and b/addons/pharma/ui/icon_Sugammadex.paa differ diff --git a/addons/pharma/ui/icon_TXAAuto.paa b/addons/pharma/ui/icon_TXAAuto.paa new file mode 100644 index 000000000..398114104 Binary files /dev/null and b/addons/pharma/ui/icon_TXAAuto.paa differ diff --git a/addons/pharma/ui/icon_ez_io.paa b/addons/pharma/ui/icon_ez_io.paa new file mode 100644 index 000000000..de84ec3b0 Binary files /dev/null and b/addons/pharma/ui/icon_ez_io.paa differ diff --git a/addons/pharma/ui/icon_fentPatch.paa b/addons/pharma/ui/icon_fentPatch.paa new file mode 100644 index 000000000..1406f52f9 Binary files /dev/null and b/addons/pharma/ui/icon_fentPatch.paa differ diff --git a/addons/pharma/ui/pressureBag.paa b/addons/pharma/ui/pressureBag.paa new file mode 100644 index 000000000..62abf96f0 Binary files /dev/null and b/addons/pharma/ui/pressureBag.paa differ diff --git a/addons/pharma/ui/syringe.paa b/addons/pharma/ui/syringe.paa new file mode 100644 index 000000000..6a1ca193c Binary files /dev/null and b/addons/pharma/ui/syringe.paa differ diff --git a/addons/pharma/ui/syringe_item.paa b/addons/pharma/ui/syringe_item.paa new file mode 100644 index 000000000..a970fd4d8 Binary files /dev/null and b/addons/pharma/ui/syringe_item.paa differ diff --git a/addons/statemachine/$PBOPREFIX$ b/addons/statemachine/$PBOPREFIX$ new file mode 100644 index 000000000..467f97e45 --- /dev/null +++ b/addons/statemachine/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\statemachine diff --git a/addons/statemachine/CfgEventHandlers.hpp b/addons/statemachine/CfgEventHandlers.hpp new file mode 100644 index 000000000..58ac85323 --- /dev/null +++ b/addons/statemachine/CfgEventHandlers.hpp @@ -0,0 +1,29 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +// class Extended_PostInit_EventHandlers { +// class ADDON { +// init = QUOTE(call COMPILE_FILE(XEH_postInit)); +// }; +// }; + +class Extended_Respawn_EventHandlers { + class CAManBase { + class ADDON { + respawn = QUOTE(call ACEFUNC(medical_statemachine,resetStateDefault)); + exclude[] = {IGNORE_BASE_UAVPILOTS}; + }; + }; +}; + +class Extended_Local_EventHandlers { + class CAManBase { + class ADDON { + local = QUOTE(call ACEFUNC(medical_statemachine,localityChangedEH)); // TODO replace with kam function + exclude[] = {IGNORE_BASE_UAVPILOTS}; + }; + }; +}; diff --git a/addons/statemachine/CfgFunctions.hpp b/addons/statemachine/CfgFunctions.hpp new file mode 100644 index 000000000..fda86d338 --- /dev/null +++ b/addons/statemachine/CfgFunctions.hpp @@ -0,0 +1,13 @@ +class CfgFunctions { + class overwrite_ace_medical_statemachine { + tag = "ace_medical_statemachine"; + class ace_medical_statemachine { + class enteredStateCardiacArrest { + file = QPATHTOF(functions\fnc_enteredStateCardiacArrest.sqf); + }; + class handleStateCardiacArrest { + file = QPATHTOF(functions\fnc_handleStateCardiacArrest.sqf); + }; + }; + }; +}; diff --git a/addons/statemachine/Statemachine.hpp b/addons/statemachine/Statemachine.hpp new file mode 100644 index 000000000..319e1f23d --- /dev/null +++ b/addons/statemachine/Statemachine.hpp @@ -0,0 +1,21 @@ +// Overwrite for ACE_Medical_StateMachine +class ACE_Medical_StateMachine { + class Unconscious { + class DeathAI { + condition = QUOTE(call EFUNC(conversion,conversionCheck)); + }; + }; + class FatalInjury { + class SecondChance { + condition = QUOTE(call EFUNC(conversion,conversionKATConditionSecondChance)); + }; + }; + class CardiacArrest { + class DeathAI { + condition = QUOTE(call EFUNC(conversion,conversionCheck)); + }; + class Execution { + condition = QUOTE(call EFUNC(conversion,KATConditionExecutionDeath)); + }; + }; +}; diff --git a/addons/statemachine/XEH_PREP.hpp b/addons/statemachine/XEH_PREP.hpp new file mode 100644 index 000000000..9d2540545 --- /dev/null +++ b/addons/statemachine/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(enteredStateCardiacArrest); +PREP(handleStateCardiacArrest); \ No newline at end of file diff --git a/addons/statemachine/XEH_postInit.sqf b/addons/statemachine/XEH_postInit.sqf new file mode 100644 index 000000000..5e9e46dbc --- /dev/null +++ b/addons/statemachine/XEH_postInit.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" + +// ["ace_killed", { // global event +// params ["_unit"]; + +// // Prevent second ragdoll of uncon units when they're killed +// if ( +// IS_UNCONSCIOUS(_unit) && !isAwake _unit // uncon and not ragdolling +// && {isPlayer _unit || {_unit getVariable [QGVAR(AIUnconsciousness), GVAR(AIUnconsciousness)]}} +// ) then { +// _unit enableSimulation false; +// [{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute; +// }; +// }] call CBA_fnc_addEventHandler; diff --git a/addons/statemachine/XEH_preInit.sqf b/addons/statemachine/XEH_preInit.sqf new file mode 100644 index 000000000..db16e8cff --- /dev/null +++ b/addons/statemachine/XEH_preInit.sqf @@ -0,0 +1,41 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#define CBA_SETTINGS_CAT "KAT - ADV Medical: Advanced States" + +/*//Enable transitions to seizure state +[ + QGVAR(enableSeizure), + "CHECKBOX", + [LSTRING(enableSeizure_DisplayName), LSTRING(enableSeizure_Description)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Seizures)], + false, + true +] call CBA_fnc_addSetting; + +//Minimum duration of seizure +[ + QGVAR(Seizure_Min_Length), + "SLIDER", + [LSTRING(Seizure_Min_Length_DisplayName),LSTRING(Seizure_Min_Length_Description)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Seizures)], + [5, 180, 10, 0], + true +] call CBA_Settings_fnc_init; + +//Maximum duration of seizure +[ + QGVAR(Seizure_Max_Length), + "SLIDER", + [LSTRING(Seizure_Max_Length_DisplayName),LSTRING(Seizure_Max_Length_Description)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Seizures)], + [5, 180, 120, 0], + true +] call CBA_Settings_fnc_init;*/ + +ADDON = true; diff --git a/addons/statemachine/config.cpp b/addons/statemachine/config.cpp new file mode 100644 index 000000000..c55bfea92 --- /dev/null +++ b/addons/statemachine/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; + units[] = {}; + weapons[] = {}; + magazines[] = {}; + requiredAddons[] = { + "ace_medical", + "ace_medical_statemachine" + }; + author = "Mazinski"; + authors[] = {"Mazinski"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "Statemachine.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgFunctions.hpp" diff --git a/addons/statemachine/functions/fnc_enteredStateCardiacArrest.sqf b/addons/statemachine/functions/fnc_enteredStateCardiacArrest.sqf new file mode 100644 index 000000000..42eefd40f --- /dev/null +++ b/addons/statemachine/functions/fnc_enteredStateCardiacArrest.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut + * Handles a unit entering cardiac arrest (calls for a status update). + * Sets required variables for countdown timer until death. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * None + * + * Example: + * [player] call ace_medical_statemachine_fnc_enteredStateCardiacArrest + * + * Public: No + */ + +params ["_unit"]; +if (isNull _unit || {!isNil {_unit getVariable QACEGVAR(medical,causeOfDeath)}}) exitWith { + WARNING_1("enteredStateCardiacArrest: State transition on dead or null unit - %1",_unit); +}; + +// 10% possible variance in cardiac arrest time +private _time = ACEGVAR(medical_statemachine,cardiacArrestTime); +_time = _time + _time * random [-0.1, 0, 0.1]; + +_unit setVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLeft), _time]; +_unit setVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLastUpdate), CBA_missionTime]; + +TRACE_3("enteredStateCardiacArrest",_unit,_time,CBA_missionTime); + +// Update the unit status to reflect cardiac arrest +[_unit, true] call ACEFUNC(medical_status,setCardiacArrestState); \ No newline at end of file diff --git a/addons/statemachine/functions/fnc_handleStateCardiacArrest.sqf b/addons/statemachine/functions/fnc_handleStateCardiacArrest.sqf new file mode 100644 index 000000000..c41c90896 --- /dev/null +++ b/addons/statemachine/functions/fnc_handleStateCardiacArrest.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: BaerMitUmlaut + * Modified: Mazinski.H + * Handles Cardiac Arrest State + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call kat_statemachine_fnc_handleEnteredCardiacArrest + * + * Public: No + */ + + params ["_unit"]; + + // If the unit died the loop is finished + if (!alive _unit || {!local _unit}) exitWith {}; + + [_unit] call ACEFUNC(medical_vitals,handleUnitVitals); + + private _timeDiff = CBA_missionTime - (_unit getVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLastUpdate), 0]); + if ((_timeDiff >= 1) && !(EGVAR(brain,enable))) then { + _timeDiff = _timeDiff min 10; + _unit setVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLastUpdate), CBA_missionTime]; + private _recieveingCPR = alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull]); + private _timeLeft = _unit getVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLeft), -1]; + private _hypothermia = linearConversion [20, 35, (_unit getVariable [QEGVAR(hypothermia,unitTemperature), 37]), 0.2, 1, true]; + TRACE_5("cardiac arrest life tick",_unit,_recieveingCPR,_timeLeft,_hypothermia,_timeDiff); + if (_recieveingCPR) then { _timeDiff = _timeDiff * 0.5; }; // if being cpr'ed, then time decrease is reduced. + _timeLeft = _timeLeft - (_timeDiff * _hypothermia); // if patient is hypothermic, then time decrease is reduced, regardless of CPR + _unit setVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLeft), _timeLeft]; + }; diff --git a/addons/statemachine/script_component.hpp b/addons/statemachine/script_component.hpp new file mode 100644 index 000000000..2dc8e10ce --- /dev/null +++ b/addons/statemachine/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT statemachine +#define COMPONENT_BEAUTIFIED KAT - StateMachine +#include "\x\kat\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_STATEMACHINE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_STATEMACHINE + #define DEBUG_SETTINGS DEBUG_SETTINGS_STATEMACHINE +#endif + +#include "\x\kat\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/statemachine/stringtable.xml b/addons/statemachine/stringtable.xml new file mode 100644 index 000000000..0b1c5e4ab --- /dev/null +++ b/addons/statemachine/stringtable.xml @@ -0,0 +1,26 @@ + + + + + Seizures + + + Enable Seizures + + + Disabling this setting will prevent seizures from occuring + + + Minimum Seizure Duration + + + Avoid setting this higher than Max Duration or expect incorrect behaviour + + + Maximum Seizure Duration + + + Avoid setting this lower than Max Duration or expect incorrect behaviour + + + diff --git a/addons/stretcher/CfgVehicles.hpp b/addons/stretcher/CfgVehicles.hpp index de8275e1f..7e4383269 100644 --- a/addons/stretcher/CfgVehicles.hpp +++ b/addons/stretcher/CfgVehicles.hpp @@ -72,7 +72,6 @@ class CfgVehicles { maximumLoad = 0; transportMaxBackpacks = 0; transportMaxMagazines = 64; - class TransportItems; class Turrets {}; transportSoldier = 1; ACEGVAR(cargo,canLoad) = 1; diff --git a/addons/stretcher/functions/fnc_attachStretcher.sqf b/addons/stretcher/functions/fnc_attachStretcher.sqf index 3fa8bb147..8265ff8fd 100644 --- a/addons/stretcher/functions/fnc_attachStretcher.sqf +++ b/addons/stretcher/functions/fnc_attachStretcher.sqf @@ -33,8 +33,8 @@ private _actions = []; "", { params ["_target", "", "_parameter"]; - private _pos = getArray (configFile >> "CfgVehicles" >> typeOf (_parameter select 0) >> "kat_stretcherPos"); - private _vector = getArray (configFile >> "CfgVehicles" >> typeOf (_parameter select 0) >> "kat_stretcherVector"); + private _pos = getArray (configOf (_parameter select 0) >> "kat_stretcherPos"); + private _vector = getArray (configOf (_parameter select 0) >> "kat_stretcherVector"); _target attachTo [(_parameter select 0), _pos]; _target setVectorDirAndUp _vector; }, diff --git a/addons/stretcher/functions/fnc_canPackIntoBackpack.sqf b/addons/stretcher/functions/fnc_canPackIntoBackpack.sqf index f9b303d7e..0c6fb943c 100644 --- a/addons/stretcher/functions/fnc_canPackIntoBackpack.sqf +++ b/addons/stretcher/functions/fnc_canPackIntoBackpack.sqf @@ -17,4 +17,4 @@ params ["_target"]; -[true, false] select ((count crew _target > 0) || !(isNull attachedTo _target)) +[true, false] select ((crew _target isNotEqualTo []) || !(isNull attachedTo _target)) diff --git a/addons/stretcher/functions/fnc_retractHeliStretcher.sqf b/addons/stretcher/functions/fnc_retractHeliStretcher.sqf index 2b4149b3c..e388b09e7 100644 --- a/addons/stretcher/functions/fnc_retractHeliStretcher.sqf +++ b/addons/stretcher/functions/fnc_retractHeliStretcher.sqf @@ -33,7 +33,7 @@ private _ropes = _target getVariable [QGVAR(ropes), []]; params ["_target", "_stretcher", "_ropes"]; private _crew = crew _stretcher; - if (count _crew > 0) then { + if (_crew isNotEqualTo []) then { { _x leaveVehicle _stretcher; moveOut _x; diff --git a/addons/surgery/ACE_Medical_Treatment.hpp b/addons/surgery/ACE_Medical_Treatment.hpp deleted file mode 100644 index 0f789e710..000000000 --- a/addons/surgery/ACE_Medical_Treatment.hpp +++ /dev/null @@ -1,464 +0,0 @@ -class ACE_Medical_Treatment { - class Bandaging { - class FieldDressing {}; - class Dressing: FieldDressing { - class Abrasion { - effectiveness = 50; - reopeningChance = 0; - reopeningMinDelay = 120; - reopeningMaxDelay = 200; - }; - class AbrasionMinor: Abrasion {}; - class AbrasionMedium: Abrasion {}; - class AbrasionLarge: Abrasion {}; - - class Avulsion: Abrasion {}; - class AvulsionMinor: Avulsion {}; - class AvulsionMedium: Avulsion {}; - class AvulsionLarge: Avulsion {}; - - class Contusion: Abrasion {}; - class ContusionMinor: Contusion {}; - class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion {}; - - class Crush: Abrasion {}; - class CrushMinor: Crush {}; - class CrushMedium: Crush {}; - class CrushLarge: Crush {}; - - class Cut: Abrasion {}; - class CutMinor: Cut {}; - class CutMedium: Cut {}; - class CutLarge: Cut {}; - - class Laceration: Abrasion {}; - class LacerationMinor: Laceration {}; - class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration {}; - - class VelocityWound: Abrasion {}; - class VelocityWoundMinor: VelocityWound {}; - class VelocityWoundMedium: VelocityWound {}; - class VelocityWoundLarge: VelocityWound {}; - - class PunctureWound: Abrasion {}; - class PunctureWoundMinor: PunctureWound {}; - class PunctureWoundMedium: PunctureWound {}; - class PunctureWoundLarge: PunctureWound {}; - }; - - class BloodClotMinor: FieldDressing { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.4; - reopeningMinDelay = 150; - reopeningMaxDelay = 900; - }; - class AbrasionMinor: Abrasion { - effectiveness = 1; - }; - class AbrasionMedium: Abrasion { - }; - class AbrasionLarge: Abrasion { - }; - - class Avulsion: Abrasion {}; - class AvulsionMinor: AbrasionMinor { - effectiveness = 0.5; - }; - class AvulsionMedium: Avulsion {}; - class AvulsionLarge: Avulsion {}; - - class Contusion: Abrasion {}; - class ContusionMinor: AbrasionMinor { - effectiveness = 1; - }; - class ContusionMedium: Contusion {}; - class ContusionLarge: Contusion {}; - - class Crush: Abrasion {}; - class CrushMinor: AbrasionMinor { - effectiveness = 1; - }; - class CrushMedium: Crush {}; - class CrushLarge: Crush {}; - - class Cut: Abrasion {}; - class CutMinor: AbrasionMinor { - effectiveness = 0.5; - }; - class CutMedium: Cut {}; - class CutLarge: Cut {}; - - class Laceration: Abrasion {}; - class LacerationMinor: AbrasionMinor { - effectiveness = 0.5; - }; - class LacerationMedium: Laceration {}; - class LacerationLarge: Laceration {}; - - class VelocityWound: Abrasion {}; - class VelocityWoundMinor: AbrasionMinor { - effectiveness = 0.5; - }; - class VelocityWoundMedium: VelocityWound {}; - class VelocityWoundLarge: VelocityWound {}; - - class PunctureWound: Abrasion {}; - class PunctureWoundMinor: AbrasionMinor { - effectiveness = 0.5; - }; - class PunctureWoundMedium: PunctureWound {}; - class PunctureWoundLarge: PunctureWound {}; - }; - - class BloodClotMedium: FieldDressing { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.5; - reopeningMinDelay = 120; - reopeningMaxDelay = 600; - }; - class AbrasionMinor: Abrasion {}; - class AbrasionMedium: Abrasion { - effectiveness = 1; - }; - class AbrasionLarge: Abrasion {}; - - class Avulsion: Abrasion {}; - class AvulsionMinor: Avulsion {}; - class AvulsionMedium: AbrasionMedium { - effectiveness = 1; - }; - class AvulsionLarge: Avulsion {}; - - class Contusion: Abrasion {}; - class ContusionMinor: Contusion {}; - class ContusionMedium: AbrasionMedium { - effectiveness = 1; - }; - class ContusionLarge: Contusion {}; - - class Crush: Abrasion {}; - class CrushMinor: Crush {}; - class CrushMedium: AbrasionMedium { - effectiveness = 1; - }; - class CrushLarge: Crush {}; - - class Cut: Abrasion {}; - class CutMinor: Cut {}; - class CutMedium: AbrasionMedium { - effectiveness = 1; - }; - class CutLarge: Cut {}; - - class Laceration: Abrasion {}; - class LacerationMinor: Laceration {}; - class LacerationMedium: AbrasionMedium { - effectiveness = 1; - }; - class LacerationLarge: Laceration {}; - - class VelocityWound: Abrasion {}; - class VelocityWoundMinor: VelocityWound {}; - class VelocityWoundMedium: AbrasionMedium { - effectiveness = 1; - }; - class VelocityWoundLarge: VelocityWound {}; - - class PunctureWound: Abrasion {}; - class PunctureWoundMinor: PunctureWound {}; - class PunctureWoundMedium: AbrasionMedium { - effectiveness = 1; - }; - class PunctureWoundLarge: PunctureWound {}; - }; - - class BloodClotLarge: FieldDressing { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.7; - reopeningMinDelay = 90; - reopeningMaxDelay = 600; - }; - class AbrasionMinor: Abrasion {}; - class AbrasionMedium: Abrasion{}; - class AbrasionLarge: Abrasion { - effectiveness = 1; - }; - - class Avulsion: Abrasion {}; - class AvulsionMinor: Avulsion {}; - class AvulsionMedium: Avulsion {}; - class AvulsionLarge: AbrasionLarge { - effectiveness = 0.5; - }; - - class Contusion: Abrasion {}; - class ContusionMinor: Contusion {}; - class ContusionMedium: Contusion {}; - class ContusionLarge: AbrasionLarge { - effectiveness = 1; - }; - - class Crush: Abrasion {}; - class CrushMinor: Crush {}; - class CrushMedium: Crush {}; - class CrushLarge: AbrasionLarge { - effectiveness = 1; - }; - - class Cut: Abrasion {}; - class CutMinor: Cut {}; - class CutMedium: Cut {}; - class CutLarge: AbrasionLarge { - effectiveness = 0.5; - }; - - class Laceration: Abrasion {}; - class LacerationMinor: Laceration {}; - class LacerationMedium: Laceration {}; - class LacerationLarge: AbrasionLarge { - effectiveness = 0.5; - }; - - class VelocityWound: Abrasion {}; - class VelocityWoundMinor: VelocityWound {}; - class VelocityWoundMedium: VelocityWound {}; - class VelocityWoundLarge: AbrasionLarge { - effectiveness = 0.5; - }; - - class PunctureWound: Abrasion {}; - class PunctureWoundMinor: PunctureWound {}; - class PunctureWoundMedium: PunctureWound {}; - class PunctureWoundLarge: AbrasionLarge { - effectiveness = 1; - }; - }; - - class BloodClotMinorTXA: BloodClotMinor { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.3; - reopeningMinDelay = 300; - reopeningMaxDelay = 600; - }; - class AbrasionMinor: Abrasion { - effectiveness = 2; - }; - class AvulsionMinor: AbrasionMinor { - effectiveness = 1; - }; - class ContusionMinor: AbrasionMinor { - effectiveness = 2; - }; - class CrushMinor: AbrasionMinor { - effectiveness = 1; - }; - class CutMinor: AbrasionMinor { - effectiveness = 1; - }; - class LacerationMinor: AbrasionMinor { - effectiveness = 1; - }; - class VelocityWoundMinor: AbrasionMinor { - effectiveness = 1; - }; - class PunctureWoundMinor: AbrasionMinor { - effectiveness = 1; - }; - }; - - class BloodClotMediumTXA: BloodClotMedium { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.3; - reopeningMinDelay = 300; - reopeningMaxDelay = 600; - }; - class AbrasionMedium: Abrasion { - effectiveness = 2; - }; - class AvulsionMedium: AbrasionMedium { - effectiveness = 0.5; - }; - class ContusionMedium: AbrasionMedium { - effectiveness = 1; - }; - class CrushMedium: AbrasionMedium { - effectiveness = 1; - }; - class CutMedium: AbrasionMedium { - effectiveness = 0.5; - }; - class LacerationMedium: AbrasionMedium { - effectiveness = 0.5; - }; - class VelocityWoundMedium: AbrasionMedium { - effectiveness = 0.5; - }; - class PunctureWoundMedium: AbrasionMedium { - effectiveness = 0.5; - }; - }; - - class BloodClotLargeTXA: BloodClotLarge { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.3; - reopeningMinDelay = 300; - reopeningMaxDelay = 600; - }; - class AbrasionLarge: Abrasion { - effectiveness = 2; - }; - class AvulsionLarge: AbrasionLarge { - effectiveness = 0.5; - }; - class ContusionLarge: AbrasionLarge { - effectiveness = 1; - }; - class CrushLarge: AbrasionLarge { - effectiveness = 1; - }; - class CutLarge: AbrasionLarge { - effectiveness = 0.5; - }; - class LacerationLarge: AbrasionLarge { - effectiveness = 0.5; - }; - class VelocityWoundLarge: AbrasionLarge { - effectiveness = 0.5; - }; - class PunctureWoundLarge: AbrasionLarge { - effectiveness = 0.5; - }; - }; - - class BloodClotMinorEACA: BloodClotMinor { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.1; - reopeningMinDelay = 600; - reopeningMaxDelay = 1200; - }; - class AbrasionMinor: Abrasion { - effectiveness = 2; - reopeningChance = 0; - }; - class AvulsionMinor: AbrasionMinor { - effectiveness = 1; - reopeningChance = 0.1; - }; - class ContusionMinor: AbrasionMinor { - effectiveness = 2; - reopeningChance = 0.1; - }; - class CrushMinor: AbrasionMinor { - effectiveness = 2; - reopeningChance = 0.1; - }; - class CutMinor: AbrasionMinor { - effectiveness = 1; - reopeningChance = 0.1; - }; - class LacerationMinor: AbrasionMinor { - effectiveness = 1; - reopeningChance = 0.1; - }; - class VelocityWoundMinor: AbrasionMinor { - effectiveness = 1; - reopeningChance = 0.1; - }; - class PunctureWoundMinor: AbrasionMinor { - effectiveness = 2; - reopeningChance = 0.1; - }; - }; - - class BloodClotMediumEACA: BloodClotMedium { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.1; - reopeningMinDelay = 600; - reopeningMaxDelay = 1200; - }; - class AbrasionMedium: Abrasion { - effectiveness = 2; - reopeningChance = 0; - }; - class AvulsionMedium: AbrasionMedium { - effectiveness = 1; - reopeningChance = 0.1; - }; - class ContusionMedium: AbrasionMedium { - effectiveness = 2; - reopeningChance = 0.1; - }; - class CrushMedium: AbrasionMedium { - effectiveness = 2; - reopeningChance = 0.1; - }; - class CutMedium: AbrasionMedium { - effectiveness = 1; - reopeningChance = 0.1; - }; - class LacerationMedium: AbrasionMedium { - effectiveness = 1; - reopeningChance = 0.1; - }; - class VelocityWoundMedium: AbrasionMedium { - effectiveness = 1; - reopeningChance = 0.1; - }; - class PunctureWoundMedium: AbrasionMedium { - effectiveness = 2; - reopeningChance = 0.1; - }; - }; - - class BloodClotLargeEACA: BloodClotLarge { - class Abrasion { - effectiveness = 0; - reopeningChance = 0.1; - reopeningMinDelay = 600; - reopeningMaxDelay = 1200; - }; - class AbrasionLarge: Abrasion { - effectiveness = 2; - reopeningChance = 0; - }; - class AvulsionLarge: AbrasionLarge { - effectiveness = 1; - reopeningChance = 0.1; - }; - class ContusionLarge: AbrasionLarge { - effectiveness = 2; - reopeningChance = 0.1; - }; - class CrushLarge: AbrasionLarge { - effectiveness = 2; - reopeningChance = 0.1; - }; - class CutLarge: AbrasionLarge { - effectiveness = 1; - reopeningChance = 0.1; - }; - class LacerationLarge: AbrasionLarge { - effectiveness = 1; - reopeningChance = 0.1; - }; - class VelocityWoundLarge: AbrasionLarge { - effectiveness = 1; - reopeningChance = 0.1; - }; - class PunctureWoundLarge: AbrasionLarge { - effectiveness = 2; - reopeningChance = 0.1; - }; - }; - }; -}; diff --git a/addons/surgery/ACE_Medical_Treatment_Actions.hpp b/addons/surgery/ACE_Medical_Treatment_Actions.hpp index da72a3a70..7d574edff 100644 --- a/addons/surgery/ACE_Medical_Treatment_Actions.hpp +++ b/addons/surgery/ACE_Medical_Treatment_Actions.hpp @@ -1,9 +1,7 @@ class ACE_Medical_Treatment_Actions { class BasicBandage; class CheckPulse; - class ApplyTourniquet: BasicBandage { - condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) && ([ARR_2(_patient,_bodyPart)] call FUNC(hasAdditionalTourniquetAppliedTo))); - }; + class ApplyTourniquet; class RemoveTourniquet: ApplyTourniquet { condition = QUOTE(([ARR_2(_patient,_bodyPart)] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) && ([ARR_2(_patient,_bodyPart)] call FUNC(hasAdditionalTourniquetAppliedTo))); }; @@ -12,7 +10,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(fracture_checking); category = "examine"; treatmentLocations = 0; - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = QGVAR(enable_selfCheckFracture); medicRequired = QGVAR(fractureCheck_MedLevel); treatmentTime = QGVAR(fractureCheck_Time); @@ -25,7 +23,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(perform); category = "surgery"; treatmentLocations = QGVAR(closedLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(closedReduction_MedLevel); treatmentTime = QGVAR(closedTime); @@ -38,27 +36,27 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(perform); category = "surgery"; treatmentLocations = QGVAR(surgicalLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(surgicalAction_MedLevel); treatmentTime = QGVAR(openTime); items[] = {"kat_plate"}; consumeItem = 1; - condition = QUOTE([ARR_4(_medic,_patient,_bodyPart,3.5)] call FUNC(openReductionCheck)); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,false)] call FUNC(openReduction)); + condition = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.5)] call FUNC(openReductionCheck)); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.5)] call FUNC(openReductionProgress)); }; class Expose: BasicBandage { displayName = CSTRING(Retractor_Use); displayNameProgress = CSTRING(Retractor_Action); category = "surgery"; treatmentLocations = QGVAR(surgicalLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(surgicalAction_MedLevel); treatmentTime = QGVAR(intermediateTime); items[] = {"kat_retractor"}; condition = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.1)] call FUNC(openReductionCheck)); - consumeItem = 0; + consumeItem = 1; callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.1)] call FUNC(openReductionProgress)); }; class Incision: BasicBandage { @@ -66,7 +64,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(perform); category = "surgery"; treatmentLocations = QGVAR(surgicalLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(surgicalAction_MedLevel); treatmentTime = QGVAR(incisionTime); @@ -79,13 +77,13 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Clamp_Action); category = "surgery"; treatmentLocations = QGVAR(surgicalLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(surgicalAction_MedLevel); treatmentTime = QGVAR(intermediateTime); items[] = {"kat_clamp"}; condition = QUOTE([ARR_4(_medic,_patient,_bodyPart,3.3)] call FUNC(openReductionCheck)); - consumeItem = 0; + consumeItem = 1; callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,3.3)] call FUNC(openReductionProgress)); }; class Irrigate: BasicBandage { @@ -93,25 +91,39 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Irrigate_Action); category = "surgery"; treatmentLocations = QGVAR(surgicalLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(surgicalAction_MedLevel); treatmentTime = QGVAR(intermediateTime); - items[] = {"ACE_salineIV_250"}; + items[] = {"ACE_salineIV_250", "kat_salineIV100"}; condition = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.3)] call FUNC(openReductionCheck)); callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.3)] call FUNC(openReductionProgress)); }; + class CloseIncision: CheckFracture { + displayName = CSTRING(fracture_Close); + displayNameProgress = CSTRING(perform); + category = "surgery"; + treatmentLocations = QGVAR(surgicalLocation); + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(surgicalAction_MedLevel); + treatmentTime = QGVAR(openTime); + items[] = {"kat_stitchKit"}; + consumeItem = 1; + condition = QUOTE([ARR_4(_medic,_patient,_bodyPart,2.7)] call FUNC(openReductionCheck)); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,false)] call FUNC(openReduction)); + }; class ResetSurgery: CheckFracture { displayName = CSTRING(Reset_Surgery); displayNameProgress = CSTRING(perform); category = "surgery"; treatmentLocations = QGVAR(surgicalLocation); - allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; + allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg", "UpperLeftArm", "UpperRightArm", "UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(surgicalAction_MedLevel); treatmentTime = QGVAR(openTime); - items[] = {"ACE_surgicalKit"}; - consumeItem = 1; + items[] = {"kat_stitchKit"}; + consumeItem = 0; condition = QUOTE(([ARR_4(_medic,_patient,_bodyPart,2)] call FUNC(openReductionCheck)) && (GVAR(enable_fracture))); callbackSuccess = QUOTE([ARR_4(_medic,_patient,_bodyPart,true)] call FUNC(openReduction)); }; @@ -136,7 +148,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Ultra_Action); category = "surgery"; treatmentLocations = QGVAR(ultrasoundLocation); - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = 0; medicRequired = QGVAR(ultrasoundAction_MedLevel); treatmentTime = QGVAR(ultrasoundTime); @@ -150,7 +162,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Reboa_Action); category = "surgery"; treatmentLocations = QGVAR(reboaLocation); - allowedSelections[] = {"LeftLeg", "RightLeg"}; + allowedSelections[] = {"UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(reboa_MedLevel); treatmentTime = QGVAR(reboaTime); @@ -164,7 +176,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Reboa_Deep_Action); category = "surgery"; treatmentLocations = QGVAR(reboaLocation); - allowedSelections[] = {"LeftLeg", "RightLeg"}; + allowedSelections[] = {"UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(reboa_MedLevel); treatmentTime = QGVAR(reboaTime); @@ -178,7 +190,7 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Reboa_Remove_Action); category = "surgery"; treatmentLocations = QGVAR(reboaLocation); - allowedSelections[] = {"LeftLeg", "RightLeg"}; + allowedSelections[] = {"UpperLeftLeg", "UpperRightLeg"}; allowSelfTreatment = 0; medicRequired = QGVAR(reboa_MedLevel); treatmentTime = QGVAR(reboaTime); @@ -192,13 +204,27 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Pericardial_Tap_Action); category = "surgery"; treatmentLocations = QGVAR(pericardialtapLocation); - allowedSelections[] = {"Body"}; + allowedSelections[] = {"Chest"}; allowSelfTreatment = 0; medicRequired = QGVAR(pericardialtapAction_MedLevel); treatmentTime = QGVAR(pericardialtapTime); - items[] = {"kat_ultrasound"}; + items[] = {"kat_10ml_syringe", "kat_5ml_syringe"}; condition = QUOTE(_patient getVariable [ARR_2(QQGVAR(imaging),false)]); consumeItem = 0; callbackSuccess = QFUNC(pericardialTap); }; + class OpenFractureKit: CheckPulse { + displayName = CSTRING(Open_Fracture_Kit); + displayNameProgress = CSTRING(Open_Fracture_Kit_Action); + category = "surgery"; + treatmentLocations = QGVAR(surgicalLocation); + allowedSelections[] = {"All"}; + allowSelfTreatment = 1; + medicRequired = QGVAR(surgicalAction_MedLevel); + treatmentTime = 5; + items[] = {"kat_fractureKit"}; + consumeItem = 1; + callbackSuccess = QFUNC(fractureKit); + condition = "true"; + }; }; diff --git a/addons/surgery/CfgVehicles.hpp b/addons/surgery/CfgVehicles.hpp index a356f8481..d0fc2dd96 100644 --- a/addons/surgery/CfgVehicles.hpp +++ b/addons/surgery/CfgVehicles.hpp @@ -1,10 +1,6 @@ #define QQPATHTOF(var1) QUOTE(QPATHTOF(var1)) class CfgVehicles { - class Item_Base_F; - class Items_base_F; - class WeaponHolder_Single_limited_item_F; - class ACE_medicalSupplyCrate; class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate { class TransportItems { diff --git a/addons/surgery/CfgWeapons.hpp b/addons/surgery/CfgWeapons.hpp index d16f73d24..c0214ae2e 100644 --- a/addons/surgery/CfgWeapons.hpp +++ b/addons/surgery/CfgWeapons.hpp @@ -3,7 +3,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class kat_scalpel: ACE_ItemCore { - scope = 2; + scope = 1; displayName = CSTRING(Scalpel_displayName); picture = QPATHTOF(ui\scalpel.paa); model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; @@ -14,7 +14,7 @@ class CfgWeapons { }; }; class kat_retractor: ACE_ItemCore { - scope = 2; + scope = 1; displayName = CSTRING(Retractor_displayName); picture = QPATHTOF(ui\retractor.paa); model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; @@ -25,7 +25,7 @@ class CfgWeapons { }; }; class kat_clamp: ACE_ItemCore { - scope = 2; + scope = 1; displayName = CSTRING(Clamp_displayName); picture = QPATHTOF(ui\clamp.paa); model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; @@ -36,7 +36,7 @@ class CfgWeapons { }; }; class kat_plate: ACE_ItemCore { - scope = 2; + scope = 1; displayName = CSTRING(Plate_Display); picture = QPATHTOF(ui\plate.paa); model = "\A3\Structures_F_EPA\Items\Medical\Painkillers_F.p3d"; @@ -76,4 +76,24 @@ class CfgWeapons { mass = 1; }; }; + class kat_fractureKit: ACE_ItemCore { + scope = 2; + displayName= CSTRING(fractureKit_Display); + descriptionShort = CSTRING(fractureKit_Desc_Short); + picture = QPATHTOF(ui\fractureKit.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 2; + }; + }; + class kat_stitchKit: ACE_ItemCore { + scope = 2; + displayName= CSTRING(stitchKit_Display); + descriptionShort = CSTRING(stitchKit_Desc_Short); + picture = QPATHTOF(ui\sutureKit.paa); + ACE_isMedicalItem = 1; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0.5; + }; + }; }; diff --git a/addons/surgery/XEH_PREP.hpp b/addons/surgery/XEH_PREP.hpp index 4b5e18489..e5ddf1cf3 100644 --- a/addons/surgery/XEH_PREP.hpp +++ b/addons/surgery/XEH_PREP.hpp @@ -2,6 +2,7 @@ PREP(canNPWT); PREP(closedReduction); PREP(closedReductionLocal); PREP(fractureCheck); +PREP(fractureKit); PREP(fractureSelect); PREP(fractureSelectLocal); PREP(fullHealLocal); diff --git a/addons/surgery/config.cpp b/addons/surgery/config.cpp index 9e9b19310..d2cb55c69 100644 --- a/addons/surgery/config.cpp +++ b/addons/surgery/config.cpp @@ -13,7 +13,9 @@ class CfgPatches { "kat_vacuum", "kat_plate", "kat_ultrasound", - "kat_reboa" + "kat_reboa", + "kat_fractureKit", + "kat_stitchKit" }; magazines[] = { }; requiredAddons[] = { @@ -42,5 +44,4 @@ class CfgPatches { #include "CfgSounds.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" -#include "ACE_Medical_Treatment.hpp" #include "ACE_Medical_Treatment_Actions.hpp" \ No newline at end of file diff --git a/addons/surgery/functions/fnc_canNPWT.sqf b/addons/surgery/functions/fnc_canNPWT.sqf index 651f40f4a..a9ddf4154 100644 --- a/addons/surgery/functions/fnc_canNPWT.sqf +++ b/addons/surgery/functions/fnc_canNPWT.sqf @@ -24,13 +24,29 @@ private _openWounds = GET_OPEN_WOUNDS(_patient) getOrDefault [_bodyPart, []]; private _isBleeding = false; if (_openWounds isNotEqualTo []) then { - { // ace_medical_treatment_fnc_canBandage - _x params ["", "_amountOf", "_bleeding"]; - - if (_amountOf * _bleeding > 0) exitWith { + { // ace_medical_treatment_fnc_canBandage + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_amountOf * _bleeding > 0 && !(_classname in ["InternalBleeding"])) exitWith { _isBleeding = true; }; } forEach _openWounds; }; -(_isBleeding || (GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []] isNotEqualTo [])); \ No newline at end of file +private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient) getOrDefault [_bodyPart, []]; + +private _isNotInternal = false; + +if (_bandagedWounds isNotEqualTo []) then { + { // ace_medical_treatment_fnc_canBandage + _x params ["_woundClassID"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if !(_classname in ["InternalBleeding"]) exitWith { + _isNotInternal = true; + }; + } forEach _bandagedWounds; +}; + +(_isBleeding || _isNotInternal); \ No newline at end of file diff --git a/addons/surgery/functions/fnc_closedReductionLocal.sqf b/addons/surgery/functions/fnc_closedReductionLocal.sqf index d9d448037..20931e3be 100644 --- a/addons/surgery/functions/fnc_closedReductionLocal.sqf +++ b/addons/surgery/functions/fnc_closedReductionLocal.sqf @@ -21,14 +21,14 @@ params ["_medic", "_patient", "_bodyPart"]; private _part = ALL_BODY_PARTS find toLower _bodyPart; private _activeFracture = GET_FRACTURES(_patient); -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; -private _medStack = _patient call ACEFUNC(medical_treatment,getAllMedicationCount); -private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine", "lidocaine"]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _medStack = _patient call ACEFUNC(medical_status,getAllMedicationCount); +private _medsToCheck = ["fentanyl", "ketamine", "nalbuphine", "morphine"]; private _fentanylEffectiveness = 0; private _ketamineEffectiveness = 0; private _nalbuphineEffectiveness = 0; private _morphineEffectiveness = 0; -private _lidocaineEffectiveness = 0; +private _localAnesthesia = (_patient getVariable [QEGVAR(pharma,localAnesthesia), [0,0,0,0,0,0,0,0,0,0,0,0]]) select 2; { private _medName = toLower (_x select 0); private _effectiveness = _x select 2; @@ -44,19 +44,16 @@ private _lidocaineEffectiveness = 0; if ("morphine" in _medName) then { _morphineEffectiveness = _morphineEffectiveness max _effectiveness; }; - if ("lidocaine" in _medName) then { - _lidocaineEffectiveness = _lidocaineEffectiveness max _effectiveness; - }; - } forEach _medStack; - if ( - _fentanylEffectiveness <= 0.8 && - _ketamineEffectiveness <= 0.8 && - _nalbuphineEffectiveness <= 0.8 && - _lidocaineEffectiveness <= 0.8 && - _morphineEffectiveness <= 0.8 - ) then { - [_patient, [0.7, 0.8, 0.9] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); - }; +} forEach _medStack; +if ( + _fentanylEffectiveness <= 0.8 && + _ketamineEffectiveness <= 0.8 && + _nalbuphineEffectiveness <= 0.8 && + _morphineEffectiveness <= 0.8 && + (_localAnesthesia <= 0.8) +) then { + [_patient, [0.6, 0.7, 0.8] select (floor random 3)] call ACEFUNC(medical_status,adjustPainLevel); +}; playSound3D [QPATHTOF_SOUND(sounds\reduction.wav), _patient, false, getPosASL _patient, 8, 1, 15]; @@ -64,12 +61,32 @@ if (random 100 < GVAR(closedReductionFailChance)) exitWith { private _output = LLSTRING(fracture_fail); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; + private _delay = (random [120, 200, 240]) * GVAR(penaltyMult); + if (_delay > 15) then { + _activeFracture set [_part, -3]; + _fractureArray set [_part, 0]; + [{ + params ["_patient", "_activeFracture", "_part"]; + _activeFracture set [_part, 0]; + _patient setVariable [VAR_FRACTURES, _activeFracture, true]; + [_patient] call EFUNC(misc,updateDamageEffects); + }, [_patient, _activeFracture, _part], _delay] call CBA_fnc_waitAndExecute; + _patient setVariable [QGVAR(fractures), _fractureArray, true]; + _patient setVariable [VAR_FRACTURES, _activeFracture, true]; + [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); + [_patient] call EFUNC(misc,updateDamageEffects); -_activeFracture set [_part, 0]; -_fractureArray set [_part, 0]; + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); -_patient setVariable [QGVAR(fractures), _fractureArray, true]; -_patient setVariable [VAR_FRACTURES, _activeFracture, true]; -_patient setVariable [QACEGVAR(medical,isLimping), false, true]; -[_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); -[_patient] call ACEFUNC(medical_engine,updateDamageEffects); + } else { + _activeFracture set [_part, 0]; + _fractureArray set [_part, 0]; + _patient setVariable [QGVAR(fractures), _fractureArray, true]; + _patient setVariable [VAR_FRACTURES, _activeFracture, true]; + [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); + [_patient] call EFUNC(misc,updateDamageEffects); + + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); + }; diff --git a/addons/surgery/functions/fnc_fractureCheck.sqf b/addons/surgery/functions/fnc_fractureCheck.sqf index 9dda9d942..3333e72f8 100644 --- a/addons/surgery/functions/fnc_fractureCheck.sqf +++ b/addons/surgery/functions/fnc_fractureCheck.sqf @@ -25,7 +25,7 @@ private _activeFracture = GET_FRACTURES(_patient); if (_number == 5 && (_activeFracture select _part) != 0) exitWith {true}; -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; if ((_liveFracture == 1) && (_number == 1)) exitWith {true}; diff --git a/addons/surgery/functions/fnc_fractureKit.sqf b/addons/surgery/functions/fnc_fractureKit.sqf new file mode 100644 index 000000000..20802c22e --- /dev/null +++ b/addons/surgery/functions/fnc_fractureKit.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Ends the treatment cycle for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call ka__breathing_treatmentAdvanced_chestTube + + * Public: No + */ + +params ["_medic", "_patient"]; + +[_medic, "kat_scalpel"] call ACEFUNC(common,addToInventory); +[_medic, "kat_clamp"] call ACEFUNC(common,addToInventory); +[_medic, "kat_retractor"] call ACEFUNC(common,addToInventory); +[_medic, "kat_plate"] call ACEFUNC(common,addToInventory); +[_medic, "kat_stitchKit"] call ACEFUNC(common,addToInventory); diff --git a/addons/surgery/functions/fnc_fractureSelectLocal.sqf b/addons/surgery/functions/fnc_fractureSelectLocal.sqf index 6911a0d67..9619f96d7 100644 --- a/addons/surgery/functions/fnc_fractureSelectLocal.sqf +++ b/addons/surgery/functions/fnc_fractureSelectLocal.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient", "_bodyPart"]; private _part = ALL_BODY_PARTS find toLower _bodyPart; -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; private _fractureString = ""; diff --git a/addons/surgery/functions/fnc_fullHealLocal.sqf b/addons/surgery/functions/fnc_fullHealLocal.sqf index b983c0dfe..7da29890b 100644 --- a/addons/surgery/functions/fnc_fullHealLocal.sqf +++ b/addons/surgery/functions/fnc_fullHealLocal.sqf @@ -29,10 +29,10 @@ TRACE_1("fullHealLocal",_patient); * 3.5 = Clamped Fracture */ -_patient setVariable [QGVAR(fractures), [0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0], true]; _patient setVariable [QGVAR(lidocaine), false, true]; _patient setVariable [QGVAR(etomidate), false, true]; -_patient setVariable [QGVAR(sedated), false, true]; +_patient setVariable [QGVAR(sedated), 0, true]; _patient setVariable [QGVAR(imaging), false, true]; _patient setVariable [QGVAR(reboa), false, true]; -_patient setVariable [QGVAR(surgicalBlock), [0,0,0,0,0,0], true]; +_patient setVariable [QGVAR(surgicalBlock), [0,0,0,0,0,0,0,0,0,0,0,0], true]; diff --git a/addons/surgery/functions/fnc_getNPWTTime.sqf b/addons/surgery/functions/fnc_getNPWTTime.sqf index b31387eaa..ba4d33eee 100644 --- a/addons/surgery/functions/fnc_getNPWTTime.sqf +++ b/addons/surgery/functions/fnc_getNPWTTime.sqf @@ -21,9 +21,10 @@ params ["", "_patient", "_bodyPart"]; private _woundCount = 0; { // ace_medical_treatment_fnc_canBandage - _x params ["_id", "_amountOf", "_bleeding"]; - - if (_amountOf * _bleeding > 0) then { + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_amountOf * _bleeding > 0 && !(_classname in ["InternalBleeding"])) then { _woundCount = _woundCount + 1; }; } forEach ((GET_OPEN_WOUNDS(_patient)) getOrDefault [_bodyPart, []]); diff --git a/addons/surgery/functions/fnc_gui_updateInjuryListPart.sqf b/addons/surgery/functions/fnc_gui_updateInjuryListPart.sqf index 528ea6a1b..8bda75d29 100644 --- a/addons/surgery/functions/fnc_gui_updateInjuryListPart.sqf +++ b/addons/surgery/functions/fnc_gui_updateInjuryListPart.sqf @@ -23,3 +23,33 @@ params ["_ctrl", "_target", "_selectionN", "_entries"]; if (GET_SURGICAL_TOURNIQUETS(_target) select _selectionN != 0) then { _entries pushBack [LLSTRING(Reboa_Status), [0.77, 0.20, 0.08, 1]]; }; + +if ((_target getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _selectionN != 0) then { + switch ((_target getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _selectionN) do { + case 2.1: { + _entries pushBack [LLSTRING(Incision), [0.3, 0.8, 0.8, 1]]; + }; + case 3.1: { + _entries pushBack [LLSTRING(Incision), [0.3, 0.8, 0.8, 1]]; + }; + case 2.3: { + _entries pushBack [LLSTRING(Exposed), [0.3, 0.8, 0.8, 1]]; + }; + case 3.3: { + _entries pushBack [LLSTRING(Exposed), [0.3, 0.8, 0.8, 1]]; + }; + case 2.5: { + _entries pushBack [LLSTRING(Irrigated), [0.3, 0.8, 0.8, 1]]; + }; + case 3.5: { + _entries pushBack [LLSTRING(Clamped), [0.3, 0.8, 0.8, 1]]; + }; + case 2.7: { + _entries pushBack [LLSTRING(Plated), [0.3, 0.8, 0.8, 1]]; + }; + case 3.7: { + _entries pushBack [LLSTRING(Plated), [0.3, 0.8, 0.8, 1]]; + }; + default {}; + }; +}; diff --git a/addons/surgery/functions/fnc_incisionLocal.sqf b/addons/surgery/functions/fnc_incisionLocal.sqf index f853419f7..f42d525ea 100644 --- a/addons/surgery/functions/fnc_incisionLocal.sqf +++ b/addons/surgery/functions/fnc_incisionLocal.sqf @@ -23,9 +23,26 @@ if (GVAR(Surgery_ConsciousnessRequirement) == 1 && !(IS_UNCONSCIOUS(_patient))) private _output = LLSTRING(fracture_fail); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; - +private _openWounds = GET_OPEN_WOUNDS(_patient); +private _existingWounds = _openWounds getOrDefault [_bodyPart, [], true]; +private _bodyPartDamage = GET_BODYPART_DAMAGE(_patient); +private _woundTypeToAdd = "Cut"; +TRACE_4("create_Incision1",_openWounds,_existingWounds,_bodyPartDamage,_woundTypeToAdd); +private _woundClassIDToAdd = ACEGVAR(medical_damage,woundClassNames) find _woundTypeToAdd; +private _injuryBleedingRate = random [0.06, 0.1, 0.13]; +private _bleedMultiplier = random [0.8, 1, 1.2]; +private _woundSize = 2; +private _bleeding = _woundSize * _bleedMultiplier * _injuryBleedingRate; +private _classComplex = 10 * _woundClassIDToAdd + _woundSize; +// Create a new injury. Format [0:classComplex, 1:amountOf, 2:bleedingRate, 3:woundDamage] +private _injury = [_classComplex, 1, _bleeding, 1]; +TRACE_1("adding new wound",_injury); +_existingWounds pushBack _injury; +_patient setVariable [VAR_OPEN_WOUNDS, _openWounds, true]; +_patient setVariable [VAR_BODYPART_DAMAGE, _bodyPartDamage, true]; +[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); private _part = ALL_BODY_PARTS find toLower _bodyPart; -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; _liveFracture = _liveFracture + 0.1; @@ -41,9 +58,10 @@ _patient setVariable [QGVAR(fractures), _fractureArray, true]; params ["_args", "_idPFH"]; _args params ["_patient", "_part"]; - private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; + private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; - private _count = ([_patient, "Etomidate", true] call ACEFUNC(medical_status,getMedicationCount)) select 1; + private _count = ([_patient, "Etomidate", false] call ACEFUNC(medical_status,getMedicationCount)) select 1; + _activeLoadingDose = _patient getVariable [QEGVAR(pharma,activeEtomidateLoadingDose), false]; private _alive = alive _patient; @@ -52,14 +70,14 @@ _patient setVariable [QGVAR(fractures), _fractureArray, true]; _patient setVariable [QGVAR(etomidate_Pain), false] }; - if (((GVAR(Surgery_ConsciousnessRequirement) in [0,1]) && (!(IS_UNCONSCIOUS(_patient))) && (_count <= 0.2)) || (GVAR(Surgery_ConsciousnessRequirement) == 3 && _count <= 0.2)) exitWith { + if (((GVAR(Surgery_ConsciousnessRequirement) in [0,1]) && (!(IS_UNCONSCIOUS(_patient))) && (_count <= 0.2) && (_activeLoadingDose)) || (GVAR(Surgery_ConsciousnessRequirement) == 3 && _count <= 0.2 && (_activeLoadingDose))) exitWith { if !(_patient getVariable [QGVAR(etomidate_Pain), false]) then { [_patient, "Pain", 2, 10, 120, 0.8, 40] call ACEFUNC(medical_status,addMedicationAdjustment); _patient setVariable [QGVAR(etomidate_Pain), true]}; [_patient, true] call ACEFUNC(medical,setUnconscious); }; - if (GVAR(Surgery_ConsciousnessRequirement) == 2 && _count <= 0.2) then { + if (GVAR(Surgery_ConsciousnessRequirement) == 2 && _count <= 0.2 && (_activeLoadingDose)) then { if !(_patient getVariable [QGVAR(etomidate_Pain), false]) then { [_patient, "Pain", 2, 10, 120, 0.8, 40] call ACEFUNC(medical_status,addMedicationAdjustment); _patient setVariable [QGVAR(etomidate_Pain), true] diff --git a/addons/surgery/functions/fnc_npwtTreatmentProgress.sqf b/addons/surgery/functions/fnc_npwtTreatmentProgress.sqf index d1e56a606..a713dd0da 100644 --- a/addons/surgery/functions/fnc_npwtTreatmentProgress.sqf +++ b/addons/surgery/functions/fnc_npwtTreatmentProgress.sqf @@ -21,9 +21,10 @@ _args params ["_medic", "_patient", "_bodyPart"]; private _isBleeding = false; { // ace_medical_treatment_fnc_canBandage - _x params ["", "_amountOf", "_bleeding"]; - - if (_amountOf * _bleeding > 0) exitWith { + _x params ["_woundClassID", "_amountOf", "_bleeding"]; + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if (_amountOf * _bleeding > 0 && !(_classname in ["InternalBleeding"])) exitWith { _isBleeding = true; }; } forEach ((GET_OPEN_WOUNDS(_patient)) getOrDefault [_bodyPart, []]); @@ -42,8 +43,26 @@ private _bandagedWoundsOnPart = _bandagedWounds get _bodyPart; if (_bandagedWoundsOnPart isEqualTo []) exitWith {false}; +if (_bodypart isEqualTo "Body" && (EGVAR(hitpoints,EviscerationChance) > 0)) then { + _patient setVariable [QGVAR(evisceration), 0, true]; + _patient setVariable [QGVAR(activeWoundPack), 2, true]; +}; + // Remove the first stitchable wound from the bandaged wounds -private _treatedWound = _bandagedWoundsOnPart deleteAt (count _bandagedWoundsOnPart - 1); +private _treatedWound = []; +private _woundCount = count _bandagedWoundsOnPart; + +for "_i" from (_woundCount - 1) to 0 step -1 do { + private _wound = _bandagedWoundsOnPart select _i; + private _treatedID = _wound select 0; + private _classIndex = _treatedID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if !(_className in ["InternalBleeding"]) then { + _treatedWound = _bandagedWoundsOnPart deleteAt _i; + break; + }; +}; + _treatedWound params ["_treatedID", "_treatedAmountOf", "", "_treatedDamageOf"]; // Check if we need to add a new stitched wound or increase the amount of an existing one @@ -66,8 +85,9 @@ _patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; _patient setVariable [VAR_STITCHED_WOUNDS, _stitchedWounds, true]; private _partIndex = ALL_BODY_PARTS find _bodyPart; -private _bodyPartDamage = _patient getVariable [QACEGVAR(medical,bodyPartDamage), []]; +private _bodyPartDamage = GET_BODYPART_DAMAGE(_patient); private _damage = (_bodyPartDamage select _partIndex) - (_treatedDamageOf * _treatedAmountOf); +TRACE_5("_treatedWound",_treatedWound,_bodyPartDamage,_partIndex,_treatedDamageOf,_treatedAmountOf); if (_damage < 0.05) then { _bodyPartDamage set [_partIndex, 0]; } else { @@ -84,4 +104,4 @@ switch (_bodyPart) do { }; [_patient] call ACEFUNC(medical_engine,updateDamageEffects); -[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); +[_patient] call ACEFUNC(medical_status,updateWoundBloodLoss); \ No newline at end of file diff --git a/addons/surgery/functions/fnc_openReductionCheck.sqf b/addons/surgery/functions/fnc_openReductionCheck.sqf index c6d62deae..5ebe49486 100644 --- a/addons/surgery/functions/fnc_openReductionCheck.sqf +++ b/addons/surgery/functions/fnc_openReductionCheck.sqf @@ -21,7 +21,7 @@ params ["_medic", "_patient", "_bodyPart", "_number"]; private _part = ALL_BODY_PARTS find toLower _bodyPart; -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; if (_liveFracture > 3) then { diff --git a/addons/surgery/functions/fnc_openReductionLocal.sqf b/addons/surgery/functions/fnc_openReductionLocal.sqf index 13f72e9f4..9983d0bd6 100644 --- a/addons/surgery/functions/fnc_openReductionLocal.sqf +++ b/addons/surgery/functions/fnc_openReductionLocal.sqf @@ -21,11 +21,11 @@ params ["_medic", "_patient", "_bodyPart", "_exit"]; private _part = ALL_BODY_PARTS find toLower _bodyPart; private _activeFracture = GET_FRACTURES(_patient); -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; if (_exit) exitWith { - if (_liveFracture < 2.5) then { + if (_liveFracture < 2.7) then { _liveFracture = 2; } else { _liveFracture = 3; @@ -38,20 +38,38 @@ if (_exit) exitWith { [_patient, true] call ACEFUNC(dragging,setDraggable); }; -if ((_liveFracture == 2.5) || (_liveFracture == 3.5)) exitWith { +if ((_liveFracture == 2.7) || (_liveFracture == 3.7)) exitWith { _liveFracture = 0; + private _delayMult = missionNamespace getVariable [QGVAR(penaltyMult),0.5]; + private _delay = (random [120, 200, 240]) * _delayMult; + if (_delay > 15) then { + _activeFracture set [_part, -3]; + _fractureArray set [_part, _liveFracture]; + [{ + params ["_patient", "_activeFracture", "_part"]; + _activeFracture set [_part, 0]; + _patient setVariable [VAR_FRACTURES, _activeFracture, true]; + [_patient] call EFUNC(misc,updateDamageEffects); + }, [_patient, _activeFracture, _part], _delay] call CBA_fnc_waitAndExecute; + _patient setVariable [QGVAR(fractures), _fractureArray, true]; + _patient setVariable [VAR_FRACTURES, _activeFracture, true]; + [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); + [_patient] call EFUNC(misc,updateDamageEffects); + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); - _activeFracture set [_part, _liveFracture]; - _fractureArray set [_part, _liveFracture]; - _patient setVariable [QGVAR(fractures), _fractureArray, true]; - _patient setVariable [VAR_FRACTURES, _activeFracture, true]; - _patient setVariable [QACEGVAR(medical,isLimping), false, true]; - [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); - [_patient] call ACEFUNC(medical_engine,updateDamageEffects); + } else { + _activeFracture set [_part, 0]; + _fractureArray set [_part, _liveFracture]; + _patient setVariable [QGVAR(fractures), _fractureArray, true]; + _patient setVariable [VAR_FRACTURES, _activeFracture, true]; + [_patient, "blockSprint", QACEGVAR(medical,fracture), false] call ACEFUNC(common,statusEffect_set); + [_patient] call EFUNC(misc,updateDamageEffects); - [_patient, true] call ACEFUNC(dragging,setCarryable); - [_patient, true] call ACEFUNC(dragging,setDraggable); + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); + }; }; private _output = LLSTRING(fracture_fail); diff --git a/addons/surgery/functions/fnc_openReductionProgressLocal.sqf b/addons/surgery/functions/fnc_openReductionProgressLocal.sqf index 6b10dd5c2..60124fd66 100644 --- a/addons/surgery/functions/fnc_openReductionProgressLocal.sqf +++ b/addons/surgery/functions/fnc_openReductionProgressLocal.sqf @@ -26,7 +26,7 @@ if (GVAR(Surgery_ConsciousnessRequirement) == 1 && !(IS_UNCONSCIOUS(_patient))) }; private _part = ALL_BODY_PARTS find toLower _bodyPart; -private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; +private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; private _liveFracture = _fractureArray select _part; private _surgeryString = ""; private _number = _entry; @@ -59,6 +59,9 @@ if (_number == _liveFracture) exitWith { case (3.3):{ _surgeryString = LSTRING(CLAMPED); }; + case (2.5):{ + _surgeryString = LSTRING(PLATED); + }; }; [_patient, "quick_view", LSTRING(surgery_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select _part]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/surgery/functions/fnc_reboaApplyLocal.sqf b/addons/surgery/functions/fnc_reboaApplyLocal.sqf index 61058c269..5a3827366 100644 --- a/addons/surgery/functions/fnc_reboaApplyLocal.sqf +++ b/addons/surgery/functions/fnc_reboaApplyLocal.sqf @@ -21,12 +21,12 @@ params ["_medic", "_patient"]; private _tourniquets = GET_TOURNIQUETS(_patient); private _surgicalBlock = GET_SURGICAL_TOURNIQUETS(_patient); -_tourniquets set [4, CBA_missionTime]; -_tourniquets set [5, CBA_missionTime]; +_tourniquets set [9, CBA_missionTime]; +_tourniquets set [11, CBA_missionTime]; _patient setVariable [VAR_TOURNIQUET, _tourniquets, true]; -_surgicalBlock set [4, 1]; -_surgicalBlock set [5, 1]; +_surgicalBlock set [9, 1]; +_surgicalBlock set [11, 1]; _patient setVariable [QGVAR(surgicalBlock), _surgicalBlock, true]; _patient setVariable [QGVAR(reboa), true, true]; diff --git a/addons/surgery/functions/fnc_reboaDeepApplyLocal.sqf b/addons/surgery/functions/fnc_reboaDeepApplyLocal.sqf index 3a7b01640..72d3d33d1 100644 --- a/addons/surgery/functions/fnc_reboaDeepApplyLocal.sqf +++ b/addons/surgery/functions/fnc_reboaDeepApplyLocal.sqf @@ -21,10 +21,10 @@ params ["_medic", "_patient"]; private _tourniquets = GET_TOURNIQUETS(_patient); private _surgicalBlock = GET_SURGICAL_TOURNIQUETS(_patient); -_tourniquets set [1, CBA_missionTime]; +_tourniquets set [3, CBA_missionTime]; _patient setVariable [VAR_TOURNIQUET, _tourniquets, true]; -_surgicalBlock set [1, 1]; +_surgicalBlock set [3, 1]; _patient setVariable [QGVAR(surgicalBlock), _surgicalBlock, true]; _patient setVariable [QGVAR(imaging), false, true]; diff --git a/addons/surgery/functions/fnc_reboaRemoveLocal.sqf b/addons/surgery/functions/fnc_reboaRemoveLocal.sqf index 35fa52381..441fbd22c 100644 --- a/addons/surgery/functions/fnc_reboaRemoveLocal.sqf +++ b/addons/surgery/functions/fnc_reboaRemoveLocal.sqf @@ -47,11 +47,13 @@ TRACE_1("clearConditionCaches: tourniquetRemove",_nearPlayers); private _occludedMedications = _patient getVariable [QACEGVAR(medical,occludedMedications), []]; private _arrayModified = false; -if (((_patient getVariable [QEGVAR(pharma,IV), [0,0,0,0,0,0]]) select _partIndex) isNotEqualTo 3) then { +if (((_patient getVariable [QEGVAR(pharma,IV), [0,0,0,0,0,0,0,0,0,0,0,0]]) select _partIndex) isNotEqualTo 3) then { { - _x params ["_bodyPartN", "_medication"]; + _x params ["_bodyPartN", "_medication", "_unit"]; - if (_partIndex == _bodyPartN) then { + private _isStillOccluded = [_unit, _bodyPartN] call EFUNC(pharma,occlusionCheck); + TRACE_1("delayed medication call after tourniquet removal",_isStillOccluded); + if (!_isStillOccluded) then { TRACE_1("delayed medication call after tourniquet removal",_x); [QEGVAR(pharma,medicationLocal), [_patient, _bodyPart, _medication], _patient] call CBA_fnc_targetEvent; _occludedMedications set [_forEachIndex, []]; diff --git a/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf b/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf index 946bd0abb..57951ae91 100644 --- a/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf +++ b/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf @@ -22,31 +22,49 @@ params ["_medic", "_patient", "_bodyPart"]; private _airway = LSTRING(Ultra_Airway_Normal); private _cardiac = LSTRING(Ultra_Airway_Normal); private _thorasic = LSTRING(Ultra_Airway_Normal); +private _thorasicRight = LSTRING(Ultra_Airway_Normal); +private _lungStatus = LSTRING(Ultra_Airway_Normal); +private _occlusion = ((_patient getVariable [QEGVAR(airway,occlusion), [0, 0, 0]]) findIf { _x > 2 }) != -1; +private _obstruction = ((_patient getVariable [QEGVAR(airway,obstruction), [0, 0, 0]]) findIf { _x != 0 }) != -1; +private _catastrophicState = _patient getVariable [QEGVAR(airway,catastrophicAirway), [false, false]]; +private _hasCatastrophicAirway = (_catastrophicState select 0) || (_catastrophicState select 1); _patient setVariable [QGVAR(imaging), true, true]; -if ((_patient getVariable [QEGVAR(airway,occluded), false]) || (_patient getVariable [QEGVAR(airway,obstruction), false])) then { +if ((_occlusion) || (_obstruction) || (_hasCatastrophicAirway)) then { _airway = LSTRING(Ultra_Airway_Compromise); }; //Reads Thorasic Condition -if ((_patient getVariable [QEGVAR(breathing,pneumothorax), 0]) != 0) then { +if (_patient getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 0 > 0.2) then { _thorasic = LSTRING(Ultra_Thorasic_PTX); }; -if (_patient getVariable [QEGVAR(breathing,hemopneumothorax), false]) then { +if (_patient getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 1 > 0.2) then { + _thorasicRight = LSTRING(Ultra_Thorasic_Right_PTX); +}; + +if (_patient getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]] select 1 > 0.2) then { _thorasic = LSTRING(Ultra_Thorasic_Hemo); }; -if (_patient getVariable [QEGVAR(breathing,tensionpneumothorax), false]) then { +if (_patient getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]] select 1 > 0.2) then { + _thorasicRight = LSTRING(Ultra_Thorasic_Right_Hemo); +}; + +if (_patient getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 0) then { _thorasic = LSTRING(Ultra_Thorasic_Tension); }; +if (_patient getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 1) then { + _thorasicRight = LSTRING(Ultra_Thorasic_Right_Tension); +}; + //Reads Cardiac Arrest Type, 4 and 3 are VT/VF and are output as "Shockable", 2 and 1 are PEA/Asystole and output as "Not Shockable", 0 is No Arrest switch (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0]) do { case 4: { - _cardiac = LSTRING(Ultra_Cardiac_Shockable); + _cardiac = LSTRING(Ultra_Cardiac_Shockable); }; case 3: { _cardiac = LSTRING(Ultra_Cardiac_Shockable); @@ -61,6 +79,24 @@ switch (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0]) do { _cardiac = LSTRING(Ultra_Airway_Normal); }; }; +private _lungVolume = GET_KAT_SURFACE_AREA(_patient); +switch (true) do { + case (_lungVolume < 350): { + _lungStatus = LSTRING(Ultra_Lung_Status_1); + }; + case (_lungVolume < 300): { + _lungStatus = LSTRING(Ultra_Lung_Status_2); + }; + case (_lungVolume < 250): { + _lungStatus = LSTRING(Ultra_Lung_Status_3); + }; + case (_lungVolume < 200): { + _lungStatus = LSTRING(Ultra_Lung_Status_4); + }; + default { + _lungStatus = LSTRING(Ultra_Lung_Status_0); + }; +}; if (_patient getVariable [QEGVAR(circulation,effusion), 0] > 0) then { _cardiac = LSTRING(Ultra_Cardiac_Tamponade); @@ -69,9 +105,19 @@ if (_patient getVariable [QEGVAR(circulation,effusion), 0] > 0) then { if !(alive _patient) then { _cardiac = LSTRING(Ultra_Cardiac_Unshockable); _thorasic = LSTRING(Ultra_Thorasic_NoActivity); + _thorasicRight = LSTRING(Ultra_Thorasic_NoActivity); _airway = LSTRING(Ultra_Airway_NoActivity); }; +[_patient, "quick_view", LSTRING(Ultra_Airway)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(Ultra_Cardiac)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(Ultra_Thorasic)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(Ultra_ThorasicRight)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(Ultra_LungStatus)] call EFUNC(circulation,removeLog); + + [_patient, "quick_view", LSTRING(Ultra_Airway), [_airway]] call ACEFUNC(medical_treatment,addToLog); [_patient, "quick_view", LSTRING(Ultra_Cardiac), [_cardiac]] call ACEFUNC(medical_treatment,addToLog); [_patient, "quick_view", LSTRING(Ultra_Thorasic), [_thorasic]] call ACEFUNC(medical_treatment,addToLog); +[_patient, "quick_view", LSTRING(Ultra_ThorasicRight), [_thorasicRight]] call ACEFUNC(medical_treatment,addToLog); +[_patient, "quick_view", LSTRING(Ultra_LungStatus), [_lungStatus]] call ACEFUNC(medical_treatment,addToLog); \ No newline at end of file diff --git a/addons/surgery/initSettings.inc.sqf b/addons/surgery/initSettings.inc.sqf index 94c7c50b0..7dbdc0350 100644 --- a/addons/surgery/initSettings.inc.sqf +++ b/addons/surgery/initSettings.inc.sqf @@ -53,6 +53,15 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(penaltyMult), + "SLIDER", + [LLSTRING(PENALTY_MULT_DISPLAY),LLSTRING(PENALTY_MULT_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_Fractures)], + [0,4,0.5,1], + true +] call CBA_fnc_addSetting; + [ QGVAR(closedTime), "SLIDER", diff --git a/addons/surgery/stringtable.xml b/addons/surgery/stringtable.xml index 67fe4851a..a7f89b9da 100644 --- a/addons/surgery/stringtable.xml +++ b/addons/surgery/stringtable.xml @@ -753,16 +753,7 @@ Plaats REBOA eenheid - Close Incision - Uzavřít řez - Fermer l'incision - Cerrar Incisión - Chiudere incisione - Schnitt schließen - 切開口を閉じる - 封閉切口 - 闭合切口 - Sluit incisie + Reset Surgery Exposing @@ -1222,6 +1213,12 @@ 气道状态:%1 Luchtwegstatus: %1 + + Left Lung Status: %1 + + + Right Lung Status: %1 + Compromised Ohrožený @@ -1238,6 +1235,31 @@ Keine Aktivität 活動なし + + Left Side Pneumothorax + + + Right Side Pneumothorax + + + Left Side Hemopneumothorax + + + Right Side Hemopneumothorax + + + Left Side Tension Pneumothorax + + + Right Side Tension Pneumothorax + + + No Activity + Žádná činnost + Aucune activité + 活動なし + 無活動 + Normal Normální @@ -1336,71 +1358,6 @@ 手持式超声 Mobiele echograaf - - Lung Status: %1 - Stav plic: %1 - Statut des poumons :%1 - Estado de Pulmones: %1 - Stato dei polmoni: %1 - Estado do pulmão: %1 - Лёгкие: %1 - Lungenstatus: %1 - 肺の状態: %1 - 肺部狀態:%1 - 肺部状态:%1 - Longstatus: %1 - - - Hemopneumothorax - Hemotorax - Hémopneumothorax - Hemopneumotórax - Emopneumotorace - Hemotórax - Гемоторакс - Hämopneumothorax - 血気胸 - 血氣胸 - 血气胸 - Hemopneumothorax - - - No Activity - Žádná činnost - Aucune activité - Nessuna attività - Keine Aktivität - 活動なし - 無活動 - - - Pneumothorax - Pneumotorax - Pneumothorax - Pneumotórax - Pneumotorace - Pneumotórax - Пневмоторакс - Pneumothorax - 気胸 - 氣胸 - 气胸 - Pneumothorax - - - Tension Pneumothorax - Tenzní pneumotorax - Pneumothorax sous tension - Tensión de Pneumotórax - Pneumotorace Iperteso - Pneumotórax Hipertensivo - Напряженный пневмоторакс - Spannungspneumothorax - 緊張性気胸 - 張力性氣胸 - 张力性气胸 - Tensiepneumothorax - Conduct Ultrasound Assessment Provést Ultrazvukové Vyšetření @@ -1660,5 +1617,68 @@ %1 %2 murtuma %3 %1 %2 de breuk op %3 + + Open Fracture Kit + + + Opening Fracture Kit + + + Fracture Kit + + + Contains equipment for Fracture Care + + + Time Delay for full repair + + + Multiplier for the delay (120-200 seconds) before a fracture is fully healed after surgery (no limping), 0 to disable + + + Lung Volume Status: %1 + + + Normal + + + Slight Volume Loss + + + Moderate Volume Loss + + + Significant Volume Loss + + + Catastrophic Volume Loss + + + Suture Kit + + + Contains equipment to close one surgical wound + + + Close Incision + Uzavřít řez + Fermer l'incision + Cerrar Incisión + Chiudere incisione + Schnitt schließen + 切開口を閉じる + 封閉切口 + 闭合切口 + Sluit incisie + + + Plated + + + Incision Made + + + If you are reading this, something broke + diff --git a/addons/surgery/ui/fractureKit.paa b/addons/surgery/ui/fractureKit.paa new file mode 100644 index 000000000..ff4f92aee Binary files /dev/null and b/addons/surgery/ui/fractureKit.paa differ diff --git a/addons/surgery/ui/sutureKit.paa b/addons/surgery/ui/sutureKit.paa new file mode 100644 index 000000000..5fd859691 Binary files /dev/null and b/addons/surgery/ui/sutureKit.paa differ diff --git a/addons/vehicleMedical/LICENSE b/addons/vehicleMedical/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/addons/vehicleMedical/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/addons/vehicleMedical/README.md b/addons/vehicleMedical/README.md new file mode 100644 index 000000000..c7a94c85f --- /dev/null +++ b/addons/vehicleMedical/README.md @@ -0,0 +1,78 @@ +# ACE Vehicle Medical [Steam Workshop Download](https://steamcommunity.com/sharedfiles/filedetails/?id=1911374016) + +[![AVM Example Header](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/avm_example_1.gif)](https://steamcommunity.com/sharedfiles/filedetails/?id=1911374016) + +## Features + +- Dynamically adds itself to anything inheriting from: `Car, Tank, Helicopter, Ship, Plane`, using `ace_interact_menu_newControllableObject` for performance. +- Provides a main interact while inside vehicle, which splits into two subcategories. + - Stable + - Unstable +- Filters by severity, with rapidly degrading status effects being listed in Unstable, and more minor afflictions placing the unit under Stable. +- Tracks deceased members inside a vehicle to easily see if you're working on someone who has passed on. +- Icons to more easily identify a situation and triage patients quickly - get to those who need it most. +- Easily access the Ace Medical Menu by selecting either the patient's name, or one of their afflictions. +- Dynamic Updates + +## Integrations + +Integrations are not required, and will be detected automatically by AVM on startup. The option to disable an integration will be shown in the menu only if AVM detects it, otherwise it is disabled by default. + +### [KAT Advanced Medical Integration](https://github.com/Tomcat-SG/KAM) + +Basic integration that keeps track of the bare minimums: + +- SpO2 % < 85% +- Pneumothorax +- Airway Blocked + +![Animation of KAT Advanced Medical Interactions](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/avm_example_kat_1.gif) + +### Configurability + +CBA Settings are provided and can be accessed under Configure Addons -> ACE Vehicle Medical + +- Enable/Disable tracking of most states +- Apply your own thresholds for 'low' heartrate/blood pressure. (Medics only) +- Enable/Disable dead people being listed as unstable +- Enable/Disable warning popups for viewing dead members + +[![Animation of Configuration Menu](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/avm_cbasettings_0.gif)](https://steamcommunity.com/sharedfiles/filedetails/?id=1911374016) + +## Icons + +### Stable + +This category is for most non varying conditions such as: + +- ![Bandage Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/bandage.png) Bandaging required on a tourinquetted limb +- ![Stitch Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/stitch.png) Stitching of bandaged wounds +- ![Low Blood Pressure Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/low_blood_pressure.png) Low Blood Pressure (Although not yet in cardiac arrest) +- ![Low Heart Rate Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/low_heart_rate.png) Low Heart Rate (Although not yet in cardiac arrest) +- ![Fracture Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/fracture.png) Arm Fractures +- ![Splinted Fracture Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/splint.png) Splinted Fractures +- ![Tourniquet Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/tourniquet.png) Applied Tourniquets + +### Unstable + +This is for conditions which may quickly lead to the patient dying, or significantly reduce their effectiveness + +- ![Dead Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/dead.png) Deceased +- ![Cardiac Arrest Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/cardiac_arrest.png) Cardiac Arrest +- ![Unconscious Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/unconscious.png) Unconscious +- ![Bleeding Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/bleeding.png) Bleeding +- ![Fracture Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/fracture.png) Leg Fractures +- ![Splint Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/splint.png) Splinted Leg Fractures +- ![SpO2 Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/kat_spo2.png) SpO2 [With [KAM](https://github.com/Tomcat-SG/KAM)] +- ![Pneumothorax Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/kat_pneumothroax.png) Pneumothorax [With [KAM](https://github.com/Tomcat-SG/KAM)] +- ![Airway Blocked Icon](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/kat_blocked_airways.png) Airway Blocked [With [KAM](https://github.com/Tomcat-SG/KAM)] + +## Translations + +- English | [m3ales](https://github.com/M3ales) +- Simplified Chinese | [GoldJohnKing](https://github.com/GoldJohnKing) +- Italian, French, and Spanish | [BSM] PRODIGY + +I am accepting translation PRs. + +![Effective MASCAS Management](https://raw.githubusercontent.com/M3ales/MIRA_Vehicle_Medical/master/Source/pr/dynamic_icon_updates.gif) diff --git a/addons/vehicleMedical/XEH_postInit.sqf b/addons/vehicleMedical/XEH_postInit.sqf new file mode 100644 index 000000000..e7072d152 --- /dev/null +++ b/addons/vehicleMedical/XEH_postInit.sqf @@ -0,0 +1,109 @@ +#include "script_component.hpp" +["ace_interact_menu_newControllableObject", { + params ["_type"]; // string of the object's classname + private _validTypes = []; + + if(GVAR(Vehicles_EnableHelicopter)) then { + _validTypes pushBackUnique "Helicopter"; + }; + if(GVAR(Vehicles_EnableCar)) then { + _validTypes pushBackUnique "Car"; + }; + if(GVAR(Vehicles_EnableTank)) then { + _validTypes pushBackUnique "Tank"; + }; + if(GVAR(Vehicles_EnablePlane)) then { + _validTypes pushBackUnique "Plane"; + }; + if(GVAR(Vehicles_EnableShip)) then { + _validTypes pushBackUnique "Ship"; + }; + + if (_validTypes findIf { _type isKindOf (_x) } == -1) exitWith {}; + private _action = + [ + "MIRA_Medical", + [LOC(Interaction,Medical)] call FUNC(cachedLocalisationCall), + "", + { if(true) exitWith{} }, + { GVAR(EnableAVM) } + ] call ace_interact_menu_fnc_createAction; + [_type, 1, ["ACE_SelfActions"], _action, false] call ace_interact_menu_fnc_addActionToClass; + _action = + [ + "MIRA_Stable", + [LOC(Interaction,Stable)] call FUNC(cachedLocalisationCall), + "", + { }, + { + params["_vehicle"]; + private _count = [_vehicle] call FUNC(countStable); + GVAR(EnableStable) && _count > 0 + }, + { [QUOTE(GVAR(StableCache)),_this, FUNC(buildStablePassengerActions)] call FUNC(cachedResult) }, + [], + [0,0,0], + 10, + nil, + { + params ["_target", "_player", "_params", "_actionData"]; + if(!GVAR(Stable_ShowCount)) exitWith {}; + private _name = _actionData select 1; + _name = format[_name + " (%1)", [_target] call FUNC(countStable)]; + _actionData set [1, _name]; + } + ] call ace_interact_menu_fnc_createAction; + [_type, 1, ["ACE_SelfActions", "MIRA_Medical"], _action, false] call ace_interact_menu_fnc_addActionToClass; + _action = + [ + "MIRA_Unstable", + [LOC(Interaction,Unstable)] call FUNC(cachedLocalisationCall), + "", + { }, + { + params["_vehicle"]; + private _count = [_vehicle] call FUNC(countUnstable); + GVAR(EnableUnstable) && _count > 0 + }, + { [QUOTE(GVAR(UnstableCache)), _this, FUNC(buildUnstablePassengerActions)] call FUNC(cachedResult) }, + [], + [0,0,0], + 10, + nil, + { + params ["_target", "_player", "_params", "_actionData"]; + if(!GVAR(Unstable_ShowCount)) exitWith {}; + private _name = _actionData select 1; + _name = format[_name + " (%1)", [_target] call FUNC(countUnstable)]; + _actionData set [1, _name]; + } + ] call ace_interact_menu_fnc_createAction; + [_type, 1, ["ACE_SelfActions", "MIRA_Medical"], _action, false] call ace_interact_menu_fnc_addActionToClass; + _action = + [ + "MIRA_Incapacitated", + [LOC(Interaction,Incapacitated)] call FUNC(cachedLocalisationCall), + "", + { }, + { + params["_vehicle"]; + private _count = [_vehicle] call FUNC(countIncapacitated); + GVAR(EnableIncapacitated) && _count > 0 + }, + { [QUOTE(GVAR(IncapacitatedCache)), _this, FUNC(buildIncapacitatedPassengerActions)] call FUNC(cachedResult) }, + [], + [0,0,0], + 10, + nil, + { + params ["_target", "_player", "_params", "_actionData"]; + if(!GVAR(Incapacitated_ShowCount)) exitWith {}; + private _name = _actionData select 1; + _name = format[_name + " (%1)", [_target] call FUNC(countIncapacitated)]; + _actionData set [1, _name]; + } + ] call ace_interact_menu_fnc_createAction; + [_type, 1, ["ACE_SelfActions", "MIRA_Medical"], _action, false] call ace_interact_menu_fnc_addActionToClass; +}] call CBA_fnc_addEventHandler; + +[QUOTE(GVAR(UnloadPatientForce)), { _this call FUNC(unloadPatientForceHandler) }] call cba_fnc_addEventHandler; \ No newline at end of file diff --git a/addons/vehicleMedical/XEH_preInit.sqf b/addons/vehicleMedical/XEH_preInit.sqf new file mode 100644 index 000000000..f6d1b47ff --- /dev/null +++ b/addons/vehicleMedical/XEH_preInit.sqf @@ -0,0 +1,60 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#define CBA_SETTINGS_CAT LSTRING(cba_name) +//#include "initSettings.inc.sqf" + +// General +private _generalCategory = [LOC(Settings,Addon_Name), LOC(Settings_General,Category)]; +[QUOTE(GVAR(EnableAVM)), "CHECKBOX", [LOC(Settings_General,Enable), LOC(Settings_General,Enable_Tooltip)], _generalCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(WarnViewingDead)), "CHECKBOX", [LOC(Settings_General,Warn_Selecting_Dead)], _generalCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(CacheInterval)), "SLIDER", [LOC(Settings_General,Cache_Interval), LOC(Settings_General,Cache_Interval_Tooltip)], _generalCategory, [0, 10, 0.4, 1], 0, {}] call CBA_fnc_addSetting; + +// Incapacitated +private _incapacitatedCategory = [LOC(Settings,Addon_Name), LOC(Settings_Incapacitated,Category)]; +[QUOTE(GVAR(EnableIncapacitated)), "CHECKBOX", [LOC(Settings_Incapacitated,Enable), LOC(Settings_Incapacitated,Enable_Tooltip)], _incapacitatedCategory, false, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Incapacitated_ShowCount)), "CHECKBOX", [LOC(Settings_Incapacitated,Show_Count), LOC(Settings_Incapacitated,Show_Count_Tooltip)], _incapacitatedCategory, false, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Incapacitated_CanUnloadAll)), "CHECKBOX", [LOC(Settings_Incapacitated,Allow_Unload_All), LOC(Settings_Incapacitated,Allow_Unload_All_Tooltip)], _incapacitatedCategory, true, 0, {}] call CBA_fnc_addSetting; + +// Unstable +private _unstableCategory = [LOC(Settings,Addon_Name), LOC(Settings_Unstable,Category)]; +[QUOTE(GVAR(EnableUnstable)), "CHECKBOX", [LOC(Settings_Unstable,Enable), LOC(Settings_Unstable,Enable_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_ShowCount)), "CHECKBOX", [LOC(Settings_Unstable,Show_Count), LOC(Settings_Unstable,Show_Count_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackCardiacArrest)), "CHECKBOX", [LOC(Settings_Unstable,Track_Cardiac_Arrest), LOC(Settings_Unstable,Track_Cardiac_Arrest)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackBleeding)), "CHECKBOX", [LOC(Settings_Unstable,Track_Bleeding), LOC(Settings_Unstable,Track_Bleeding_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackUnconscious)), "CHECKBOX", [LOC(Settings_Unstable,Track_Unconscious), LOC(Settings_Unstable,Track_Unconscious_Tooltip)] ,_unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackLowBP)), "CHECKBOX", [LOC(Settings_Unstable,Track_Low_Blood_Pressure), LOC(Settings_Unstable,Track_Low_Blood_Pressure_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackLowHR)), "CHECKBOX", [LOC(Settings_Unstable,Track_Low_Heart_Rate), LOC(Settings_Unstable,Track_Low_Heart_Rate_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackSpO2)), "CHECKBOX", [LOC(Settings_Unstable_KAT,Track_SpO2), LOC(Settings_Unstable_KAT,Track_SpO2_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackDead)), "CHECKBOX", [LOC(Settings_Unstable,Track_Dead), LOC(Settings_Unstable,Track_Dead_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TakeDogtags)), "CHECKBOX", [LOC(Settings_Unstable,Take_Dogtags), LOC(Settings_Unstable,Take_Dogtags_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_DogtagsDeadOnly)), "CHECKBOX", [LOC(Settings_Unstable,Take_Dogtags_Dead_Only), LOC(Settings_Unstable,Take_Dogtags_Dead_Only_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_AllowUnload)), "CHECKBOX", [LOC(Settings_Unstable,Allow_Unload), LOC(Settings_Unstable,Allow_Unload_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; + +// Stable +private _stableCategory = [LOC(Settings,Addon_Name), LOC(Settings_Stable,Category)]; +[QUOTE(GVAR(EnableStable)), "CHECKBOX", [LOC(Settings_Stable,Enable),LOC(Settings_Stable,Enable_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_ShowCount)), "CHECKBOX", [LOC(Settings_Stable,Show_Count), LOC(Settings_Stable,Show_Count_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_TrackNeedsBandage)), "CHECKBOX", [LOC(Settings_Stable,Track_Open_Wounds),LOC(Settings_Stable,Track_Open_Wounds_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_TrackLowBP)), "CHECKBOX", [LOC(Settings_Stable,Track_Low_Blood_Pressure),LOC(Settings_Stable,Track_Low_Blood_Pressure_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_TrackLowHR)), "CHECKBOX", [LOC(Settings_Stable,Track_Low_Heart_Rate),LOC(Settings_Stable,Track_Low_Heart_Rate_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_TrackFractures)), "CHECKBOX", [LOC(Settings_Stable,Track_Arm_Fractures),LOC(Settings_Stable,Track_Arm_Fractures_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_TrackSplints)), "CHECKBOX", [LOC(Settings_Stable,Track_Arm_Splints),LOC(Settings_Stable,Track_Arm_Splints_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; +[QUOTE(GVAR(Stable_TrackTourniquets)), "CHECKBOX", [LOC(Settings_Stable,Track_Tourniquets),LOC(Settings_Stable,Track_Tourniquets_Tooltip)], _stableCategory, true, 0, {}] call CBA_fnc_addSetting; + +// Vehicles +private _vehicleCategory = [LOC(Settings,Addon_Name), LOC(Settings_Vehicles,Category)]; + +[QUOTE(GVAR(Vehicles_EnableCar)), "CHECKBOX", [LOC(Settings_Vehicles,Car), LOC(Settings_Vehicles,Car_Tooltip)], _vehicleCategory, true, 0, {}, true] call CBA_fnc_addSetting; +[QUOTE(GVAR(Vehicles_EnableHelicopter)), "CHECKBOX", [LOC(Settings_Vehicles,Helicopter), LOC(Settings_Vehicles,Helicopter_Tooltip)], _vehicleCategory, true, 0, {}, true] call CBA_fnc_addSetting; +[QUOTE(GVAR(Vehicles_EnablePlane)), "CHECKBOX", [LOC(Settings_Vehicles,Plane), LOC(Settings_Vehicles,Plane_Tooltip)], _vehicleCategory, true, 0, {}, true] call CBA_fnc_addSetting; +[QUOTE(GVAR(Vehicles_EnableShip)), "CHECKBOX", [LOC(Settings_Vehicles,Ship), LOC(Settings_Vehicles,Ship_Tooltip)], _vehicleCategory, true, 0, {}, true] call CBA_fnc_addSetting; +[QUOTE(GVAR(Vehicles_EnableTank)), "CHECKBOX", [LOC(Settings_Vehicles,Tank), LOC(Settings_Vehicles,Tank_Tooltip)], _vehicleCategory, true, 0, {}, true] call CBA_fnc_addSetting; +[QUOTE(GVAR(Unstable_TrackSpO2)), "CHECKBOX", [LOC(Settings_Unstable_KAT,Track_SpO2), LOC(Settings_Unstable_KAT,Track_SpO2_Tooltip)], _unstableCategory, true, 0, {}] call CBA_fnc_addSetting; + +ADDON = true; diff --git a/addons/vehicleMedical/config.cpp b/addons/vehicleMedical/config.cpp new file mode 100644 index 000000000..e796d0784 --- /dev/null +++ b/addons/vehicleMedical/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + requiredVersion = REQUIRED_VERSION; + units[] = {}; + weapons[] = {}; + magazines[] = {}; + requiredAddons[] = {"ace_interact_menu", "ace_medical", "ace_medical_treatment", "cba_settings", "kat_main"}; + author = "M3ales Cplhardcore"; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; +#include "CfgEventHandlers.hpp" diff --git a/addons/vehicleMedical/script_component.hpp b/addons/vehicleMedical/script_component.hpp new file mode 100644 index 000000000..47e2f1ddf --- /dev/null +++ b/addons/vehicleMedical/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT vehiclemedical +#define COMPONENT_BEAUTIFIED KAT Vehicle Medical +#include "\x\kat\addons\main\script_mod.hpp" +#include "\x\kat\addons\gui\gui_defines.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_Vehicle + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_Vehicle + #define DEBUG_SETTINGS DEBUG_SETTINGS_Vehicle +#endif + +#include "\x\kat\addons\main\script_macros.hpp" diff --git a/addons/vehicleMedical/stringtable.xml b/addons/vehicleMedical/stringtable.xml new file mode 100644 index 000000000..f6408dcb3 --- /dev/null +++ b/addons/vehicleMedical/stringtable.xml @@ -0,0 +1,858 @@ + + + + + Medical + 医疗 + Medico + Médical + Médico + + + Stable + 伤势稳定 + Stabile + Stable + Estable + + + Unstable + 需要救治 + Instabile + Instable + Inestable + + + Incapacitated + Inabile + Invalide + Incapacitado + + + Confirm + + + None + + Nessuno + Aucun + Ninguno + + + Weak + 微弱 + Debole + Faible + Débil + + + Low + + Basso + Bas + Bajo + + + Unload All Patients + Scarica Tutti i Pazienti + Décharge tous les patients + Descargar todos los pacientes + + + Unload Patient + Scarica Paziente + Décharge le patient + Descargar paciente + + + Force Unload + Forza Scaricamento + Décharge forcé + Forzar descarga + + + Deceased + 已阵亡 + Deceduto + Décédé + Fallecido + + + You are viewing %1, who is currently deceased. + %1 已经阵亡。 + Stai visualizzando %1, che è attualmente deceduto. + Vous regardez %1, qui est actuellement décédé. + Estás viendo %1, quien esta actualmente fallecido. + + + Cardiac Arrest + 心搏停止 + Arresto Cardiaco + Arrêt cardiaque + Paro cardiaco + + + Bleeding + 正在流血 + Sanguinamento + Saignement + Sangrado + + + Heart Rate (%1) + 心率 (%1) + Frequenza Cardiaca (%1) + Fréquence cardiaque (%1) + Ritmo Cardiaco (%1) + + + Blood Pressure (%1) + 血压 (%1) + Pressione Sanguigna (%1) + Pression artérielle (%1) + Presión sanguínea + + + Blood Pressure (%1) [%2ml] + 血压 (%1) [%2ml] + Pressione Sanguigna (%1) [%2ml] + Tension artérielle (%1) [%2ml] + Presión arterial (%1) [%2ml] + + + Unconscious + 昏迷 + Incosciente + Inconscient + Inconsciente + + + Leg Fractures (%1) + 腿部骨折 (%1) + Gambe Fratturate (%1) + Jambes Fracturées (%1) + Fracturas de pierna (%1) + + + Splinted Leg Fractures (%1) + 已固定的腿部骨折 (%1) + Fratture gambe Steccate (%1) + Fractures de jambe avec attelle (%1) + Fracturas de pierna entablilladas (%1) + + + Splinted Leg Fractures (Error Fetching Amount) + 已固定的腿部骨折 (无法获取伤口数量) + Fratture gamba Steccate (Errore Recupero Valore) + Fractures de la jambe avec attelle (Erreur de récupération valeur) + Fracturas de pierna entablilladas (Error de recuperación del valor) + + + Take Dogtags + Prendi Piastrine + Prenez les plaques d'identité + Llevar placas de identificación + + + Dogtags Missing + Piastrine Mancanti + Plaques d'identité manquantes + Faltan placas de identificación + + + SpO2 (%1%2) + SpO2 (%1%2) + SpO2 (%1%2) + SpO2 (%1%2) + + + Pneumothorax + Pneumotorace + Pneumothorax + Neumotórax + + + Hemopneumothorax + Emopneumotorace + Hémopneumothorax + Hemoneumotórax + + + Tension Pneumothorax + Pneumotorace Iperteso + Pneumothorax compressif + Tensión neumotoraxica + + + Pneumothoraces + Pneumotoraci + Pneumothorax + Neumotórax + + + Airway Occluded + Vie Aeree Occluse + Occlusion de voies respiratoires + Vía respiratoria ocluida + + + Airway Obstructed + Vie Aeree Ostruite + Voies respiratoires obstruées + Vías respiratoria obstruidas + + + Airway Blocked + Vie Aeree Bloccate + Voies respiratoires bloquées + Vía respiratoria bloqueada + + + Bandage (%1) + 包扎 (%1) + Bendaggio (%1) + Bandage (%1) + Vendaje (%1) + + + Stitch (%1) + 缝合 (%1) + Sutura (%1) + Suture (%1) + Sutura (%1) + + + Heart Rate (%1) + 心率 (%1) + Frequenza Cardiaca (%1) + Fréquence cardiaque (%1) + Frecuencia cardíaca (%1) + + + Blood Pressure (%1) + 血压 (%1) + Pressione Sanguigna (%1) + Tension artérielle (%1) + Presión arterial (%1) + + + Blood Pressure (%1) [%2ml] + 血压 (%1) [%2ml] + Pressione Sanguigna (%1) [%2ml] + Tension artérielle (%1) [%2ml] + Presión arterial (%1) [%2ml] + + + Fractures (%1) + 骨折 (%1) + Fratture (%1) + Fractures (%1) + Fracturas (%1) + + + Fractures (Error Fetching Amount) + 骨折 (无法获取伤口数量) + Fratture (Errore Recupero Valore) + Fractures (Erreur de récupération valeur) + Fracturas (Error de recuperación de valor) + + + Splinted Fractures (%1) + 已固定的骨折 (%1) + Fratture Steccate (%1) + Fractures attelles (%1) + Fracturas entablilladas (%1) + + + Splinted Fractures (Error Fetching Amount) + 已固定的骨折 (无法获取伤口数量) + Fratture Steccate (Errore Recupero Valore) + Fractures attelles (Erreur de récupération valeur) + Fracturas entablilladas (Error de recuperación de valor) + + + Tourniquets (%1) + 止血带 (%1) + Laccio Emostatico (%1) + Garrots (%1) + Torniquetes (%1) + + + KAT Vehicle Medical + KAT Veicolo Medico + KAT Véhicule Médical + KAT vehículo médico + + + + General + Generale + Général + General + + + Version: %1 + Versione: %1 + Vérsion: %1 + Versión: %1 + + + Installed Version of AVM + Versione Installata di AVM + Version installée d'AVM + Versión instalada de AVM + + + Enable AVM + Abilita AVM + Activer AVM + Habilitar AVM + + + Show or hide all ACE Vehicle Medical actions + Mostra o nascondi tutte le azioni mediche del veicolo ACE + Afficher ou masquer toutes les actions médicales du véhicule ACE + Mostrar u ocultar todas las acciones médicas de vehículos de ACE + + + Warn when selecting deceased + Avvisa quando si seleziona un deceduto + Avertir lors de la sélection d'un décedé + Advertir al seleccionar difunto + + + Display a popup and play a click sound when you view someone who is dead (Rare) + Visualizza un popup e riproduci un clic quando vedi qualcuno che è morto (Raro) + Affichez une fenêtre contextuelle et jouez un clic lorsque vous voyez quelqu'un qui est mort (Rare) + Muestre una notificación y reproduzca un sonido de clic cuando vea a alguien que está muerto (raro) + + + Cache Lifetime + Durata della cache + Durée du cache + Duración de la caché + + + The speed at which AVM updates in seconds, a lower value will provide more accurate updates, while a higher value will be more performant but be less accurate. + La velocità con cui AVM si aggiorna in secondi, un valore più basso fornirà aggiornamenti più accurati, mentre un valore più alto sarà più performante ma meno accurato. + La vitesse à laquelle AVM se met à jour en secondes, une valeur inférieure fournira des mises à jour plus précises, tandis qu'une valeur plus élevée fonctionnera mieux mais moins précise. + La velocidad a la que AVM se actualiza en segundos, un valor más bajo proporcionará actualizaciones más precisas, mientras que un valor más alto será más eficaz pero menos preciso. + + + Incapacitated + Invalido + Invalide + Incapacitado + + + Enable Incapacitated + Abilita Invalido + Activer Invalide + Habilitar incapacitado + + + Display incapacitated list + Mostra lista degli inabili + Afficher la liste des invalides + Mostrar lista de incapacitados + + + Display Number of Incapacitated + Mostra il numero degli inabili + Afficher le nombre des invalides + Mostrar número de discapacitados + + + Display the number of incapacitated units on the action + Mostra il numero di unità inabili nell'azione + Affiche le nombre d'unités invalides dans l'action + Muestra el número de unidades incapacitadas en la acción. + + + Allow Unload All + Abilita Scarica Tutti + Activer Décharger tous + Permitir descargar todo + + + Allow multiple units to be unloaded simeltaneously + Consentire a più unità di essere scaricate contemporaneamente + Autoriser le déchargement de plusieurs unités en même temps + Permitir que se descarguen varias unidades simultáneamente + + + + + Unstable + Instabile + Instable + Inestable + + + Enable Unstable + Abilita Instabile + Activer Instable + Habilitar inestable + + + Unstable list will be shown + Verrà mostrato un elenco degli instabili + Une liste d'instable s'affichera + Se mostrará una lista inestable + + + Show Number of Unstable + Mostra numero degli instabili + Afficher le nombre d'instables + Mostrar número de inestables + + + Display the number of unstable units on the root action + Visualizza il numero di unità instabili sul root action + Affiche le nombre des unités instables sur l'action root + Muestra el número de unidades inestables en la acción raíz. + + + Track Cardiac Arrest + Controlla Arresto Cardiaco + Vérifier Arrêt Cardiaque + Seguimiento del paro cardíaco + + + Cardiac Arrest will be monitored and reported by AVM + L'arresto cardiaco sarà monitorato e segnalato da AVM + L'arrêt cardiaque sera surveillé et signalé par AVM + El paro cardíaco será monitoreado e informado por AVM + + + Track Bleeding + Controlla Sanguinamento + Vérifier les saignements + Comprobar si hai perdida de sangre + + + Bleeding will be monitored and reported by AVM + Il Sanguinamento sarà monitorato e segnalato da AVM + Les saignements seront surveillés et signalés par AVM + Seguimiento de sangrado + + + Track Unconscious + Controlla Incoscienza + Vérifier l'inconscience + Comprobar si el paciente es inconsciente + + + Consciousness will be monitored and reported by AVM + Incoscienza sarà monitorata e segnalata da AVM + L'inconscience sera surveillée et signalée par AVM + La conciencia será monitoreada e informada por AVM + + + Track Low Blood Pressure + Controlla Pressione Saguigna Bassa + Vérifier l'hypotension artérielle + Verificar de la presión arterial baja + + + Low blood pressure will be monitored and reported by AVM + Pressione sanguigna sarà monitorata e segnalata da AVM + La pression artérielle sera surveillée et signalée par AVM + La presión arterial baja será monitoreada e informada por AVM + + + Low Blood Pressure Threshold + Soglia Pressione sanguigna Bassa + Seuil de pression artérielle basse + Umbral de presión arterial baja + + + Value below which a given patient will have 'low' blood pressure + Valore al di sotto del quale un paziente avrà una pressione sanguigna "bassa" + Valeur en dessous de laquelle un patient aura une tension artérielle "basse" + Valor por debajo del cual un paciente determinado tendrá presión arterial 'baja' + + + Track IVs + Controlla IV + Vérifier IV + Verificar IVs + + + Total volume of IVs is displayed + Viene mostrato il volume totale delle IV + Le volume total des IV est affiché + Se muestra el volumen total de IV + + + Track Low Heart Rate + Controlla Frequenza Cardiaca + Vérifier la fréquence cardiaque + Verificar de frecuencia cardíaca baja + + + Low heart rate will be monitored and reported by AVM + Frequenza Cardiaca sarà monitorata e segnalata da AVM + La fréquence cardiaque sera surveillée et signalée par AVM + AVM controlará y notificará la frecuencia cardíaca baja + + + Low Heart Rate Threshold + Soglia Frequenza Cardiaca Bassa + Seuil de fréquence cardiaque basse + Umbral de frecuencia cardíaca baja + + + Value below which a given patient will have 'low' heart rate + Valore al di sotto del quale un paziente avrà una frequenza cardiaca "bassa" + Valeur en dessous de laquelle un patient aura une fréquence cardiaque "basse" + Valor por debajo del cual un paciente determinado tendrá una frecuencia cardíaca 'baja' + + + Track Leg Fractures + Controlla Fratture Gamba + Vérifier les fractures de la jambe + Verificar fracturas de pierna + + + Leg Fractures will be monitored and reported as unstable by AVM + Fratture gamba saranno monitorate e segnalate da AVM + Les fractures de la jambe seront surveillées et signalées par AVM + Las fracturas de pierna serán monitoreadas e informadas por AVM + + + Track Leg Splints + Controlla Steccature Gamba + Vérifier l'attelle de jambe + Verificar las férulas para las piernas + + + Splinted Leg Fractures will be reported in the unstable category by AVM + Steccature Gamba saranno monitorate e segnalate da AVM + Les attelles de jambe seront surveillées et signalées par AVM + Las fracturas entablilladas se informarán en la categoría inestable por AVM + + + Track Deaceased + Controlla Deceduti + Vérifier Décédé + Verifica Fallecido + + + Dead members will be reported in the unstable category by AVM + I membri deceduti verranno segnalati nella categoria instabile da AVM + Les membres décédés seront signalés dans la catégorie instable par AVM + Los miembros muertos serán reportados en la categoría inestable por AVM + + + Track Dogtags + Controlla Piastrine + Vérifier les plaquettes d'identification + Verifica de placas de identificación + + + Adds an action to take dogtags off unconscious or dead units. + Aggiunge un'azione per rimuovere le piastrine dalle unità prive di sensi o morte. + Ajoute une action pour retirer les plaquettes des unités inconscientes ou mortes. + Agrega una acción para quitar las placas de identificación de las unidades inconscientes o muertas. + + + Take Dogtags from Deceased Only + Prendi Piastrine solo da personale deceduto + Prendre des plaquettes uniquement sur du personnel décédé + Tome las etiquetas de identificación de los fallecidos solamente + + + Only allows you to take dogtags off deceased units, requires Track Dogtags to be on to work. + Ti permette solo di togliere le piastrine dal personale deceduto, richiede che Track Dogtags sia attivo per funzionare. + Il vous permet uniquement de retirer les plaques d'identification du personnel décédé, nécessite que les plaques d'identification soient actives pour fonctionner. + Solo le permite llevar placas de identificación de unidades fallecidas, requiere que las placas de identificación de seguimiento funcionen. + + + Enable Unload + + + Adds an action to unload unconscious or dead units. + + + + + Track KAM SpO2 + Controlla KAM SpO2 + Vérifiez KAM SpO2 + Seguimiento de KAM SpO2 + + + KAT Advanced Medical SpO2 will be monitored and reported by AVM + KAT Advanced Medical SpO2 sarà monitorata e segnalata da AVM + KAT Advanced Medical SpO2 sera surveillé et signalé par AVM + AVM controlará y notificará KAT Advanced Medical SpO2 + + + Track KAM Pneumothroax + Controlla KAM Pneumotorace + Vérifier le pneumothorax KAM + Seguimiento de neumotórax KAM + + + Pneumothorax, Hemopneumothroax, and Tension Pneumothorax will be monitored and reported by AVM + Pneumotorace, Emopneumotorace e Pneumotorace iperteso saranno monitorati e segnalati da AVM + Le pneumothorax, l'hémopneumothorax et le pneumothorax compressif seront surveillés et signalés par AVM + El neumotórax, el hemoneumotroax y el neumotórax a tensión serán monitoreados e informados por AVM + + + Track KAM Blocked Airways + Controlla KAM Vie Aeree Bloccate + Vérifiez les voies respiratoires bloquées par KAM + Seguimiento de las vías respiratorias bloqueadas por KAM + + + Airway Obstruction and Occlusion will be monitored and reported by AVM + Les voies respiratoires obstruées et en occlusion seront surveillées et signalées par AVM + Vérifiez les voies respiratoires bloquées par KAM + La obstrucción y oclusión de las vías respiratorias será monitoreada e informada por AVM + + + + + Stable + Stabile + Stable + Estable + + + Enable Stable List + Abilita Lista Stabile + Activer la liste stable + Se mostrará una lista estable + + + Stable list will be shown + Verrà mostrato un elenco stabile + S'affichera une liste stable + Se le mostrará una lista de pacientes estables + + + Show Number of Stable + Mostra numero di stabili + Afficher le nombre de stables + Mostrar número de estable + + + Display the number of stable units on the root action + Visualizza il numero di unità stabili sul root action + Affiche le nombre d'unités stables sur le root action + Muestra el número de unidades estables en la acción raíz. + + + Track Open Wounds + Controlla ferite aperte + Vérifier les plaies ouvertes + Seguimiento de heridas abiertas + + + Open wounds that need to be bandaged will be monitored and reported by AVM + Le ferite aperte che devono essere fasciate saranno monitorate e segnalate da AVM + Les plaies ouvertes qui doivent être bandées seront surveillées et signalées par AVM + Las heridas abiertas que necesitan vendajes serán monitoreadas e informadas por AVM + + + Track Stitchable Wounds + Controlla ferite suturabili + Vérifier les plaies suturables + Seguimiento de heridas cosibles + + + Stitchable body parts will be monitored and reported by AVM + Le parti del corpo suturabili saranno monitorate e segnalate da AVM + Les parties du corps suturables seront surveillées et signalées par AVM + Las partes del cuerpo que se pueden coser serán monitoreadas e informadas por AVM + + + + Track Low Blood Pressure + Controlla Pressione Saguigna Bassa + Vérifier l'hypotension artérielle + Seguimiento de la presión arterial baja + + + Low blood pressure will be monitored and reported by AVM + Pressione Sanguigna Bassa sarà monitorata e segnalata da AVM + L'hypotension artérielle sera surveillé et signalé par AVM + La presión arterial baja será monitoreada e informada por AVM + + + Track IVs + Controlla IV + Vérifier IV + Verificar IVs + + + IV total volume will be displayed + Sarà mostrato il Volume Totale IV + Le volume total IV sera affiché + Se mostrará el volumen total IV + + + Low Blood Pressure Threshold + Soglia Pressione Sanguigna Bassa + Seuil de pression artérielle basse + Umbral de presión arterial baja + + + Value below which a given patient will have 'low' blood pressure + Valore al di sotto del quale un paziente avrà una pressione sanguigna "bassa" + Valeur en dessous de laquelle un patient aura une tension artérielle "basse" + Valor por debajo del cual un paciente determinado tendrá presión arterial 'baja' + + + Track Low Heart Rate + Controlla Ritmo Cardiaco Basso + Vérifier la faible fréquence cardiaque + Seguimiento de frecuencia cardíaca baja + + + Low heart rate will be monitored and reported by AVM + Ritmo Cardiaco Basso sarà monitorato e segnalato da AVM + La faible fréquence cardiaque sera surveillée et signalée par AVM + AVM controlará y notificará la frecuencia cardíaca baja + + + Low Heart Rate Threshold + Soglia Ritmo Cardiaco Basso + Seuil de fréquence cardiaque basse + Umbral de frecuencia cardíaca baja + + + Value below which a given patient will have 'low' heart rate + Valore al di sotto del quale un paziente avrà una frequenza cardiaca "bassa" + Valeur en dessous de laquelle un patient aura une fréquence cardiaque "basse" + Valor por debajo del cual un paciente determinado tendrá una frecuencia cardíaca 'baja' + + + Track Arm Fractures + Controlla Fratture Braccia + Vérifier les bras cassés + Seguimiento de fracturas de brazo + + + Arm Fractures will be monitored and reported as stable by AVM + Fratture Braccia sarà monitorata e segnalata come stabile da AVM + Les fractures du bras seront surveillées et signalées comme stables par AVM + Las fracturas de brazo serán monitoreadas e informadas como estables por AVM + + + Track Arm Splints + Controlla Steccature Braccia + Vérifier l'attelle de bras + Férulas para brazo de seguimiento + + + Splinted Arm Fractures will be reported in the stable category by AVM + Steccatture Braccia sarà monitorata e segnalata come stabile da AVM + L'attelle de bras sera surveillée et signalée comme stable par AVM + Las fracturas de brazo entablillado se informarán en la categoría estable por AVM + + + Track Tourniquets + Controlla Laccio Emostatico + Vérifier le garrot + Torniquetes de pista + + + Tourniquets will be reported in the stable category by AVM + Laccio Emostatico sarà segnalato come categoria stabile da AVM + Le garrot sera signalé comme une catégorie stable par AVM + Los torniquetes serán reportados en la categoría estable por AVM. + + + + + Vehicles + Veicolo + Véhicule + Vehículos + + + Enable on Car + Abilita su Auto + Activer sur voiture + Habilitar en automóviles + + + AVM is enabled for Cars + AVM é abilitato su Auto + AVM est activé sur voiture + AVM está habilitado para automóviles + + + Enable on Helicopter + Abilita su Elicottero + Activer sur l'hélicoptère + Habilitar en helicóptero + + + AVM is enabled for Helicopters + AVM é abilitato su Elicottero + AVM est activé sur l'hélicoptère + AVM está habilitado para helicópteros + + + Enable on Plane + Abilita su Aereo + Activer dans l'avion + Habilitar en avión + + + AVM is enabled for Planes + AVM é abilitato su Aereo + AVM est activé sur l'avion + AVM está habilitado para aviones + + + Enable on Ship + Abilita su Nave + Activer sur le navire + Habilitar en el barco + + + AVM is enabled for Ships + AVM é abilitato su Nave + AVM est activé sur le navire + AVM está habilitado para barcos + + + Enable on Tank + Abilita su Carro + Activer sur Char + Habilitar en el tanque + + + AVM is enabled for Tanks + AVM é abilitato su Carro + AVM est activé sur Char + AVM está habilitado para tanques + + + + + Integrations + Integrazioni + Intégrations + Integraciones + + + Enable KAM Integration + Abilita Integrazioni KAM + Activer les intégrations KAM + Habilitar la integración de KAM + + + AVM will show KAT Medical specific actions + AVM mostrerà le azioni specifiche della KAT Medical + AVM montrera les actions spécifiques de KAT Medical + AVM mostrará acciones específicas de KAT Medical + + + + \ No newline at end of file diff --git a/addons/vehicleMedical/ui/bandage.paa b/addons/vehicleMedical/ui/bandage.paa new file mode 100644 index 000000000..b69e44c3f Binary files /dev/null and b/addons/vehicleMedical/ui/bandage.paa differ diff --git a/addons/vehicleMedical/ui/bleeding_red.paa b/addons/vehicleMedical/ui/bleeding_red.paa new file mode 100644 index 000000000..a9b2ac460 Binary files /dev/null and b/addons/vehicleMedical/ui/bleeding_red.paa differ diff --git a/addons/vehicleMedical/ui/bp_low.paa b/addons/vehicleMedical/ui/bp_low.paa new file mode 100644 index 000000000..d062b6133 Binary files /dev/null and b/addons/vehicleMedical/ui/bp_low.paa differ diff --git a/addons/vehicleMedical/ui/cardiac_arrest_red.paa b/addons/vehicleMedical/ui/cardiac_arrest_red.paa new file mode 100644 index 000000000..d9496bf07 Binary files /dev/null and b/addons/vehicleMedical/ui/cardiac_arrest_red.paa differ diff --git a/addons/vehicleMedical/ui/dead.paa b/addons/vehicleMedical/ui/dead.paa new file mode 100644 index 000000000..9cbf13cba Binary files /dev/null and b/addons/vehicleMedical/ui/dead.paa differ diff --git a/addons/vehicleMedical/ui/dogtags.paa b/addons/vehicleMedical/ui/dogtags.paa new file mode 100644 index 000000000..c7c238f9a Binary files /dev/null and b/addons/vehicleMedical/ui/dogtags.paa differ diff --git a/addons/vehicleMedical/ui/fracture.paa b/addons/vehicleMedical/ui/fracture.paa new file mode 100644 index 000000000..4e0b17f3f Binary files /dev/null and b/addons/vehicleMedical/ui/fracture.paa differ diff --git a/addons/vehicleMedical/ui/hr_low.paa b/addons/vehicleMedical/ui/hr_low.paa new file mode 100644 index 000000000..b8842a3ac Binary files /dev/null and b/addons/vehicleMedical/ui/hr_low.paa differ diff --git a/addons/vehicleMedical/ui/kat_airway_blocked.paa b/addons/vehicleMedical/ui/kat_airway_blocked.paa new file mode 100644 index 000000000..d6e3fa232 Binary files /dev/null and b/addons/vehicleMedical/ui/kat_airway_blocked.paa differ diff --git a/addons/vehicleMedical/ui/kat_pneumothorax.paa b/addons/vehicleMedical/ui/kat_pneumothorax.paa new file mode 100644 index 000000000..939bdc510 Binary files /dev/null and b/addons/vehicleMedical/ui/kat_pneumothorax.paa differ diff --git a/addons/vehicleMedical/ui/kat_spo2_low.paa b/addons/vehicleMedical/ui/kat_spo2_low.paa new file mode 100644 index 000000000..4d2a0b2d8 Binary files /dev/null and b/addons/vehicleMedical/ui/kat_spo2_low.paa differ diff --git a/addons/vehicleMedical/ui/splint.paa b/addons/vehicleMedical/ui/splint.paa new file mode 100644 index 000000000..05c68c603 Binary files /dev/null and b/addons/vehicleMedical/ui/splint.paa differ diff --git a/addons/vehicleMedical/ui/stitch.paa b/addons/vehicleMedical/ui/stitch.paa new file mode 100644 index 000000000..1c7176b3b Binary files /dev/null and b/addons/vehicleMedical/ui/stitch.paa differ diff --git a/addons/vehicleMedical/ui/tourniquet.paa b/addons/vehicleMedical/ui/tourniquet.paa new file mode 100644 index 000000000..4156906eb Binary files /dev/null and b/addons/vehicleMedical/ui/tourniquet.paa differ diff --git a/addons/vehicleMedical/ui/unconscious_white.paa b/addons/vehicleMedical/ui/unconscious_white.paa new file mode 100644 index 000000000..7442d9255 Binary files /dev/null and b/addons/vehicleMedical/ui/unconscious_white.paa differ diff --git a/addons/vehicleMedical/ui/unload.paa b/addons/vehicleMedical/ui/unload.paa new file mode 100644 index 000000000..592175fe5 Binary files /dev/null and b/addons/vehicleMedical/ui/unload.paa differ diff --git a/addons/vehiclemedical/$PBOPREFIX$ b/addons/vehiclemedical/$PBOPREFIX$ new file mode 100644 index 000000000..5c463abda --- /dev/null +++ b/addons/vehiclemedical/$PBOPREFIX$ @@ -0,0 +1 @@ +x\kat\addons\vehiclemedical \ No newline at end of file diff --git a/addons/vehiclemedical/CfgEventHandlers.hpp b/addons/vehiclemedical/CfgEventHandlers.hpp new file mode 100644 index 000000000..286874df3 --- /dev/null +++ b/addons/vehiclemedical/CfgEventHandlers.hpp @@ -0,0 +1,12 @@ +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + disableModuload = "true"; + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/vehiclemedical/XEH_PREP.hpp b/addons/vehiclemedical/XEH_PREP.hpp new file mode 100644 index 000000000..31e7fc580 --- /dev/null +++ b/addons/vehiclemedical/XEH_PREP.hpp @@ -0,0 +1,23 @@ +PREP(buildIncapacitatedPassengerActions); +PREP(buildStableActions); +PREP(buildStablePassengerActions); +PREP(buildUnstableActions); +PREP(buildUnstablePassengerActions); +PREP(cachedLocalisationCall); +PREP(cachedResult); +PREP(countIncapacitated); +PREP(countStable); +PREP(countUnstable); +PREP(displayBP); +PREP(displayHR); +PREP(getNumberOfFractures); +PREP(getNumberOfWoundsToBandage); +PREP(getTotalIV); +PREP(getVersion); +PREP(isStable); +PREP(isUnstable); +PREP(needsBandage); +PREP(openMedicalMenu); +PREP(unloadAllWithCondition); +PREP(unloadPatient); +PREP(unloadPatientForceHandler); \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_buildIncapacitatedPassengerActions.sqf b/addons/vehiclemedical/functions/fnc_buildIncapacitatedPassengerActions.sqf new file mode 100644 index 000000000..1affcf6c8 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_buildIncapacitatedPassengerActions.sqf @@ -0,0 +1,130 @@ +#include "..\script_component.hpp" + +params["_vehicle", "_player"]; + +if!(alive _vehicle) exitWith { + [] +}; + +_modifierFunc = { + params ["_target", "_player", "_parameters", "_actionData"]; + _parameters params ["_patient"]; + +}; + +private _actions = []; + +// Unload All Children +private _fnc_forceUnloadAllAction = { + params["_patient"]; + private _forceUnload = [ + "MIRA_UnloadAll_Force", + [LOC(Incapacitated,Unload_Force)] call FUNC(cachedLocalisationCall), + QPATHTOF(ui\unload.paa), + { + params ["_vehicle", "_player", "_parameters"]; + [_vehicle, _player, {true}, true] call FUNC(unloadAllWithCondition); + }, + {true}, + {}, + [] + ] call ace_interact_menu_fnc_createAction; + [[_forceUnload, [], _patient]] +}; + +// Unload All Action +private _unloadAllAction = ["MIRA_UnloadAll", + [LOC(Incapacitated,Unload_All)] call FUNC(cachedLocalisationCall), + QPATHTOF(ui\unload.paa), + { + params ["_vehicle", "_player", "_parameters"]; + [_vehicle, _player, { + params["_patient"]; + _patient != player && ((IS_UNCONSCIOUS(_patient)) || !(alive _patient)) + }] call FUNC(unloadAllWithCondition); + }, + {true}, + _fnc_forceUnloadAllAction, + [] +] call ace_interact_menu_fnc_createAction; +_actions pushBack [_unloadAllAction, [], _vehicle]; + + //foreach player/npc in vehicle +{ + private _unit = _x; + //ignore drone pilot(s) + if(getText (configOf _unit >> "simulation") != "UAVPilot") then { + //get unit name from ace common to display + private _unitName = [_unit] call ace_common_fnc_getName; + //icon is blank, defined by modififer func + private _icon = ""; + + private _fnc_conditions = { + params["_patient", "_player", "_parameters"]; + !(alive _patient) || (IS_UNCONSCIOUS(_patient)) + }; + private _action = [ + format["%1", _unit], + _unitName, + _icon, + { + params ["", "", "_parameters"]; + _parameters params ["_unit"]; + [_unit] call FUNC(openMedicalMenu); + }, + _fnc_conditions, + { + params["_patient", "_player", "_parameters"]; + + //when creating children, only create children of unit who is being hovered over, otherwise empty children + //probably performance thing, unsure + if(ace_interact_menu_selectedTarget isEqualTo _patient) then { + private _subActions = []; + private _isMedic = (_player call ACEFUNC(medical_treatment,isMedic)); + + if((IS_UNCONSCIOUS(_patient)) || !alive _patient) then { + + private _forceUnloadAction = { + params["_patient"]; + private _forceUnload = [ + "MIRA_Unload_Force", + [LOC(Incapacitated,Unload_Force)] call FUNC(cachedLocalisationCall), + QPATHTOF(ui\unload.paa), + { + params ["_patient", "_player", "_parameters"]; + [_patient, _player, true] call FUNC(unloadPatient) + }, + {true}, + {}, + [] + ] call ace_interact_menu_fnc_createAction; + [[_forceUnload, [], _patient]] + }; + + private _action = ["MIRA_Unload", [LOC(Incapacitated,Unload)] call FUNC(cachedLocalisationCall), QPATHTOF(ui\unload.paa), { + params ["_target", "_player", "_parameters"]; + [_target, _player] call FUNC(unloadPatient); + }, {true}, _forceUnloadAction] call ace_interact_menu_fnc_createAction; + + _subActions pushBack [_action, [], _patient]; + }; + + _subActions + }else { + [] + }; + }, + [], + {[0, 0, 0]}, + 2, + [false, false, false, false, false], + _modifierFunc + ] call ace_interact_menu_fnc_createAction; + //add built action to array + _actions pushBack[_action, [], _unit]; + }; + //I think this basically functions as a continue, not really sure. + false +}count crew _vehicle; + +_actions \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_buildStableActions.sqf b/addons/vehiclemedical/functions/fnc_buildStableActions.sqf new file mode 100644 index 000000000..2afc076b3 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_buildStableActions.sqf @@ -0,0 +1,124 @@ +#include "..\script_component.hpp" +/* + * Author: M3ales + * Builds a set of subactions for a given passenger, listing their afflictions. + * + * Arguments: + * 0: Target + * 1: Player + * 2: Parameters + * + * Return Value: + * Children actions + * + * Example: + * [_player,_target,[_patient]] call MIRA_fnc_buildStableActions + * + * Public: Yes + */ + +params["_target", "_player", "_parameters"]; + +_parameters params [ + "_patient" +]; + +private _actions = []; +private _isMedic = (_player call ACEFUNC(medical_treatment,isMedic)); + +// Bandagable Wounds Action +private _needsBandage = GVAR(Stable_TrackNeedsBandage) && _patient call FUNC(needsBandage); +if(_needsBandage) then { + private _requiredBandages = [_patient] call FUNC(getNumberOfWoundsToBandage); + private _action = ["MIRA_Bandage", format[[LOC(Stable,Bandage)] call FUNC(cachedLocalisationCall), _requiredBandages] , QPATHTOF(ui\bandage.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Stitchable Wounds Action +private _stitchWounds = _patient call EFUNC(misc,getFullBodyStitchableWoundTime); +private _needsStitch = (_stitchWounds > 0); +if (_needsStitch) then { + private _action = ["MIRA_Stitch", format[[LOC(Stable,Stitch)] call FUNC(cachedLocalisationCall), _stitchWounds] , QPATHTOF(ui\stitch.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Low Heartrate Action +private _hasLowHR = GVAR(Stable_TrackLowHR) && (GET_HEART_RATE(_patient) < 60); +if(_hasLowHR) then { + private _hr = [_patient, _isMedic] call FUNC(displayHR); + private _action = ["MIRA_LowHR", format[[LOC(Stable,Low_Heart_Rate)] call FUNC(cachedLocalisationCall), _hr], QPATHTOF(ui\hr_low.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Low Blood Pressure Action +private _bloodPressure = [_patient] call EFUNC(circulation,getBloodPressure); +_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; +private _map = GET_MAP(_patient); +private _hasLowBP = GVAR(Stable_TrackLowBP) && (_map < 60); +if(_hasLowBP) then { + private _bp = [_patient, _isMedic] call FUNC(displayBP); + private _name = format[[LOC(Stable,Low_Blood_Pressure)] call FUNC(cachedLocalisationCall), _bp]; + private _action = ["MIRA_LowBP", _name, QPATHTOF(ui\bp_low.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Fractures +if(GVAR(Stable_TrackFractures) && ((selectMax GET_FRACTURES(_patient)) > 0)) then { + private _numFractures = { _x != 0 } count GET_FRACTURES(_patient); + private _fracturesMessage = format[[LOC(Stable,Arm_Fractures)] call FUNC(cachedLocalisationCall), _numFractures]; + if(_numFractures == 0) then { + _fracturesMessage = [LOC(Stable,Arm_Fractures_Error)] call FUNC(cachedLocalisationCall); + }; + private _action = ["MIRA_Fractures", _fracturesMessage, QPATHTOF(ui\fracture.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + + +// Splinted Fractures +if(GVAR(Stable_TrackSplints) && (({ _x in [-1, -2, -3] } count (GET_FRACTURES(_patient))) > 0)) then { + private _numFractures = { _x in [-1, -2, -3] } count (GET_FRACTURES(_patient)); + private _fracturesMessage = format[[LOC(Stable,Splinted_Fractures)] call FUNC(cachedLocalisationCall), _numFractures]; + if(_numFractures == 0) then { + _fracturesMessage = [LOC(Stable,Splinted_Fractures_Error)] call FUNC(cachedLocalisationCall); + }; + private _action = ["MIRA_Splinted_Fractures", _fracturesMessage, QPATHTOF(ui\splint.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Tourniquets +private _tourniquets = GVAR(Stable_TrackTourniquets) && ((selectMax GET_TOURNIQUETS(_patient)) > 0); +if(_tourniquets) then { + private _amount = { _x != 0 } count GET_TOURNIQUETS(_patient); + private _action = ["MIRA_Tourniquets", format[[LOC(Stable,Tourniquets)] call FUNC(cachedLocalisationCall), _amount], QPATHTOF(ui\tourniquet.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +_actions \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_buildStablePassengerActions.sqf b/addons/vehiclemedical/functions/fnc_buildStablePassengerActions.sqf new file mode 100644 index 000000000..bddfb65b4 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_buildStablePassengerActions.sqf @@ -0,0 +1,125 @@ +#include "..\script_component.hpp" +/* + * Author: esteldunedain, with minor changes by M3ales + * Builds an array of actions, one for each passenger, with their name as the display. + * Essentially a copy of https://github.com/acemod/ACE3/blob/e78016d7f7e193691f92bac10c3e437d64a4bfd0/addons/interaction/functions/fnc_addPassengersActions.sqf + * + * Arguments: + * 0: Vehicle + * 1: Player + * + * Return Value: + * Children actions + * + * Example: + * [vehicle player, player] call MIRA_Vehicle_Medical_fnc_buildUnstablePassengerActions + * + * Public: Yes + */ + +params["_vehicle", "_player"]; + +if!(alive _vehicle) exitWith { + [] +}; + +_actions = []; + +//conditions to display the unit's action +_conditions = { + params ["", "", "_parameters"]; + _parameters params ["_unit"]; + if(!alive _unit) exitWith { false }; + _unit call FUNC(isStable); +}; + +//modify the icon to show the worst 'wound' type +_modifierFunc = { + params ["_target", "_player", "_parameters", "_actionData"]; + _parameters params ["_patient"]; + + private _result = ""; + // bandage > stitch > lowhr > lowbp > fractures > tourniquets + private _tourniquet = GVAR(Stable_TrackTourniquets) && ((selectMax GET_TOURNIQUETS(_patient)) > 0); + private _fractures = GVAR(Stable_TrackFractures) && ((selectMax GET_FRACTURES(_patient)) > 0); + private _isMedic = (_player call ACEFUNC(medical_treatment,isMedic)); + private _bloodPressure = [_patient] call EFUNC(circulation,getBloodPressure); + _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; + private _map = GET_MAP(_unit); + private _lowBP = GVAR(Stable_TrackLowBP) && (_map < 60); + private _lowHR = GVAR(Stable_TrackLowHR) && (GET_HEART_RATE(_patient) < 60); + private _stitchWounds = _patient call EFUNC(misc,getFullBodyStitchableWoundTime); + private _stitch = (_stitchWounds > 0); + private _bandage = GVAR(Stable_TrackNeedsBandage) && [_patient] call FUNC(needsBandage); + + if(_tourniquet) then { + _result = QPATHTOF(ui\tourniquet.paa); + }; + if(_fractures) then { + _result = QPATHTOF(ui\fracture.paa); + }; + if(_lowBP) then { + _result = QPATHTOF(ui\bp_low.paa); + }; + if(_lowHR) then { + _result = QPATHTOF(ui\hr_low.paa); + }; + if(_stitch) then { + _result = QPATHTOF(ui\stitch.paa); + }; + if(_bandage) then { + _result = QPATHTOF(ui\bandage.paa); + }; + + if(_result == "") then { + private _set = format["Tourniquet: %1, Fractures: %2, Low BP: %3, Low HR: %4, Stitch: %5, Bandage: %6, isMedic: %7",_tourniquet,_fractures,_lowBP,_lowHR,_stitch,_bandage,_isMedic]; + }; + _actionData set [2, _result]; +}; + + //foreach player/npc in vehicle +{ + private _unit = _x; + //ignore drone pilot(s) + if(getText (configOf _unit >> "simulation") != "UAVPilot") then { + //get unit name from ace common to display + private _unitName = [_unit] call ace_common_fnc_getName; + //icon is blank, defined by modififer func + private _icon = ""; + //build the action, use additional params to have runOnHover = true + if(_unit == _player) then { + _unitName = "You"; + }; + private _action = [ + format["%1", _unit], + _unitName, + _icon, + { + params ["", "", "_parameters"]; + _parameters params ["_unit"]; + [_unit] call FUNC(openMedicalMenu); + }, + _conditions, + { + //when creating children, only create children of unit who is being hovered over, otherwise empty children + //probably performance thing, unsure + if(ace_interact_menu_selectedTarget isEqualTo _target) then { + _this call FUNC(buildStableActions); + }else { + [] + }; + }, + [_unit], + {[0, 0, 0]}, + 2, + [false, false, false, false, false], + _modifierFunc + ] call ace_interact_menu_fnc_createAction; + //add built action to array + _actions pushBack[_action, [], _unit]; + }; + //I think this basically functions as a continue, not really sure. + false +}count crew _vehicle; + +_actions \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_buildUnstableActions.sqf b/addons/vehiclemedical/functions/fnc_buildUnstableActions.sqf new file mode 100644 index 000000000..23aac1471 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_buildUnstableActions.sqf @@ -0,0 +1,164 @@ +#include "..\script_component.hpp" +/* + * Author: M3ales + * Builds a set of subactions for a given passenger, listing their afflictions. + * + * Arguments: + * 0: Target + * 1: Player + * 2: Parameters + * + * Return Value: + * Children actions + * + * Example: + * [_player,_target,[_patient]] call MIRA_fnc_buildUnstableActions + * + * Public: Yes + */ + +params["_target", "_player", "_parameters"]; + +_parameters params [ + "_patient" +]; + +private _actions = []; +private _isMedic = (_player call ACEFUNC(medical_treatment,isMedic)); + +// Dead +private _isDead = GVAR(Unstable_TrackDead) && !alive _patient; +if(_isDead) then { + private _action = ["MIRA_Dead", [LOC(Unstable,Dead)] call FUNC(cachedLocalisationCall), QPATHTOF(ui\dead.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + if(GVAR(WarnViewingDead)) then { + private _patientName = [_patient] call ace_common_fnc_getName; + [format[[LOC(Unstable,Dead_Warning)] call FUNC(cachedLocalisationCall), _patientName], true, 4, 1] call ACE_common_fnc_displayText; + }; + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +private _canTakeDogtag = GVAR(Unstable_TakeDogtags) && [_player, _patient] call ace_dogtags_fnc_canTakeDogtag; +// Take Dogtags Action +if(_canTakeDogtag && {(GVAR(Unstable_DogtagsDeadOnly) && !alive _patient) || !GVAR(Unstable_DogtagsDeadOnly)}) then { + private _taken = [LOC(Unstable,Dogtags_Take)] call FUNC(cachedLocalisationCall); + if(_patient getVariable["ace_dogtags_dogtagTaken", objNull] == _target) then { + _taken = [LOC(Unstable,Dogtags_Already_Taken)] call FUNC(cachedLocalisationCall); + }; + private _action = ["MIRA_Dogtags_Take", _taken, QPATHTOF(ui\dogtags.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_player, _patient] call ace_dogtags_fnc_takeDogtag; + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Cardiac Arrest Action +private _cardiacArrest = GVAR(Unstable_TrackCardiacArrest) && (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] != 0); +if (_cardiacArrest) then { + _action = ["MIRA_Cardiac", [LOC(Unstable,Cardiac_Arrest)] call FUNC(cachedLocalisationCall), QPATHTOF(ui\cardiac_arrest_red.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// KAT Integration Actions + +private _spO2 = GET_KAT_SPO2(_patient); +if(GVAR(Unstable_TrackSpO2) && _spO2 < 90) then { + _action = ["MIRA_KAT_SpO2", format[[LOC(Unstable_KAT,SpO2)] call FUNC(cachedLocalisationCall), round _spO2, "%"], QPATHTOF(ui\kat_spO2_low.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + + +// Bleeding Action +private _isBleeding = GVAR(Unstable_TrackBleeding) && _patient call FUNC(needsBandage); +//add bleeding action if applicable +if (_isBleeding) then { + //TODO: collect all wounds, and colour icon based on severity, only have red done for now + _action = ["MIRA_Bleeding", [LOC(Unstable,Bleeding)] call FUNC(cachedLocalisationCall), QPATHTOF(ui\bleeding_red.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Low HeartRate Action +private _hasLowHR = GVAR(Stable_TrackLowHR) && (GET_HEART_RATE(_patient) < 60); +if(_hasLowHR) then { + private _hr = [_patient, _isMedic] call FUNC(displayHR); + private _action = ["MIRA_LowHR", format[[LOC(Stable,Low_Heart_Rate)] call FUNC(cachedLocalisationCall), _hr], QPATHTOF(ui\hr_low.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Low Blood Pressure Action +private _bloodPressure = [_patient] call EFUNC(circulation,getBloodPressure); +_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; +private _map = GET_MAP(_patient); +private _hasLowBP = GVAR(Stable_TrackLowBP) && (_map < 60); +if(_hasLowBP) then { + private _bp = [_patient, _isMedic] call FUNC(displayBP); + private _name = format[[LOC(Stable,Low_Blood_Pressure)] call FUNC(cachedLocalisationCall), _bp]; + private _action = ["MIRA_LowBP", _name, QPATHTOF(ui\bp_low.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Unconscious Action +private _isUncon = GVAR(Unstable_TrackUnconscious) && (IS_UNCONSCIOUS(_patient)); +if (_isUncon) then { + private _action = ["MIRA_Sleepy", [LOC(Unstable,Unconscious)] call FUNC(cachedLocalisationCall), QPATHTOF(ui\unconscious_white.paa), { + params ["_target", "_player", "_parameters"]; + _parameters params ["_patient"]; + [_patient] call FUNC(openMedicalMenu); + }, {true}, {}, [_patient]] call ace_interact_menu_fnc_createAction; + _actions pushBack [_action, [], _patient]; +}; + +// Unload Action +if(GVAR(Unstable_AllowUnload)) then { + if (_isUncon || _isDead) then { + private _confirmUnloadAction = { + params["_patient"]; + private _confirmUnload = [ + "MIRA_Unload_Confirm", + [LOC(Shared,Confirm)] call FUNC(cachedLocalisationCall), + QPATHTOF(ui\unload.paa), + { + params ["_patient", "_player", "_parameters"]; + [_patient, _player, true] call FUNC(unloadPatient); + }, + {true}, + {}, + [] + ] call ace_interact_menu_fnc_createAction; + [[_confirmUnload, [], _patient]] + }; + + private _action = ["MIRA_Unload", [LOC(Incapacitated,Unload)] call FUNC(cachedLocalisationCall), QPATHTOF(ui\unload.paa), { + params ["_target", "_player", "_parameters"]; + }, {true}, _confirmUnloadAction] call ace_interact_menu_fnc_createAction; + + _actions pushBack [_action, [], _patient]; + }; +}; + +// TODO: Add an action that shows if medication in system +_actions diff --git a/addons/vehiclemedical/functions/fnc_buildUnstablePassengerActions.sqf b/addons/vehiclemedical/functions/fnc_buildUnstablePassengerActions.sqf new file mode 100644 index 000000000..13462f32d --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_buildUnstablePassengerActions.sqf @@ -0,0 +1,117 @@ +#include "..\script_component.hpp" +/* + * Author: esteldunedain, with minor changes by M3ales + * Builds an array of actions, one for each passenger, with their name as the display. + * Essentially a copy of https://github.com/acemod/ACE3/blob/e78016d7f7e193691f92bac10c3e437d64a4bfd0/addons/interaction/functions/fnc_addPassengersActions.sqf + * + * Arguments: + * 0: Vehicle + * 1: Player + * + * Return Value: + * Children actions + * + * Example: + * [vehicle player, player] call MIRA_Vehicle_Medical_fnc_buildUnstablePassengerActions + * + * Public: Yes + */ + +params["_vehicle", "_player"]; + +if!(alive _vehicle) exitWith { + [] +}; + +private _actions = []; + +//conditions to display the unit's action +_conditions = { + params ["", "", "_parameters"]; + _parameters params ["_patient"]; + if(!GVAR(Unstable_TrackDead) && !alive _patient) exitWith { false }; + [_patient] call FUNC(isUnstable); +}; + +//modify the icon to show the worst 'wound' type +_modifierFunc = { + params ["_target", "_player", "_parameters", "_actionData"]; + _parameters params ["_patient"]; + // Get vars to check + private _bleeding = GVAR(Unstable_TrackBleeding) && [_patient] call FUNC(needsBandage); + private _sleepy = GVAR(Unstable_TrackUnconscious) && (IS_UNCONSCIOUS(_patient)); + private _cardiac = GVAR(Unstable_TrackCardiacArrest) && (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] != 0); + private _dead = GVAR(Unstable_TrackDead) && !alive _patient; + private _kat_spO2Low = false; + + if(GVAR(EnableSupportKAT)) then { + _kat_spO2Low = GVAR(Unstable_TrackSpO2) && (GET_KAT_SPO2(_player) < EGVAR(breathing,Stable_spo2)); + }; + + // Modify the icon (3rd param) + //Use ascending order of importance, cardiac > bleeding > unconscious > leg fracture + private _result = ""; + if(_sleepy) then { + _result = QPATHTOF(ui\unconscious_white.paa); + }; + if(_bleeding) then { + _result = QPATHTOF(ui\bleeding_red.paa); + }; + if(_kat_spO2Low) then { + _result = QPATHTOF(ui\kat_spo2_low.paa); + }; + if(_cardiac) then { + _result = QPATHTOF(ui\cardiac_arrest_red.paa); + }; + if(_dead) then { + _result = QPATHTOF(ui\dead.paa); + }; + _actionData set [2, _result]; +}; + +//foreach player/npc in vehicle +{ + private _unit = _x; + //ignore drone pilot(s) + if(getText (configOf _unit >> "simulation") != "UAVPilot") then { + //get unit name from ace common to display + private _unitName = [_unit] call ace_common_fnc_getName; + //icon is blank, defined by modififer func + private _icon = ""; + if(_unit == _player) then { + _unitName = "You"; + }; + //build the action, use additional params to have runOnHover = true + private _action = [ + format["%1", _unit], + _unitName, + _icon, + { + params ["", "", "_parameters"]; + _parameters params ["_unit"]; + [_unit] call FUNC(openMedicalMenu); + }, + _conditions, + { + //when creating children, only create children of unit who is being hovered over, otherwise empty children + //probably performance thing, unsure + if(ace_interact_menu_selectedTarget isEqualTo _target) then { + _this call FUNC(buildUnstableActions); + }else { + [] + }; + }, + [_unit], + {[0, 0, 0]}, + 2, + [false, false, false, false, false], + _modifierFunc + ] call ace_interact_menu_fnc_createAction; + //add built action to array + _actions pushBack[_action, [], _unit]; + }; + //I think this basically functions as a continue, not really sure. + false +}count crew _vehicle; + +_actions \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_cachedLocalisationCall.sqf b/addons/vehiclemedical/functions/fnc_cachedLocalisationCall.sqf new file mode 100644 index 000000000..93f6589ed --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_cachedLocalisationCall.sqf @@ -0,0 +1,11 @@ +#include "..\script_component.hpp" +params["_search"]; +// I'm assuming that I'll never have booleans loaded from stringtable.xml +private _result = uiNamespace getVariable[_search, false]; +if(_result isEqualType false) exitWith // so as long as I don't actually load booleans I'll be ok +{ + _result = localize _search;// if I say it enough, does it become true? + uiNamespace setVariable[_search, _result]; // Apologies to anyone who has to fix an issue caused by this assumption :) + _result +}; +_result; \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_cachedResult.sqf b/addons/vehiclemedical/functions/fnc_cachedResult.sqf new file mode 100644 index 000000000..07059f0c5 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_cachedResult.sqf @@ -0,0 +1,8 @@ +#include "..\script_component.hpp" +params["_id", "_params", "_code"]; + +if(!(_id isEqualType "")) exitWith {}; +if(!(_params isEqualType [])) exitWith +{}; + +[_params, _code, localNamespace, _id, GVAR(cacheInterval)] call ace_common_fnc_cachedCall; \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_countIncapacitated.sqf b/addons/vehiclemedical/functions/fnc_countIncapacitated.sqf new file mode 100644 index 000000000..7d375ae4c --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_countIncapacitated.sqf @@ -0,0 +1,9 @@ +#include "..\script_component.hpp" +params["_vehicle"]; + +private _code = { + params["_vehicle"]; + { !(alive _x) || IS_UNCONSCIOUS(_x) } count (crew _vehicle) +}; + +[QUOTE(GVAR(IncapacitatedCountCache)),[_vehicle],_code] call FUNC(cachedResult); \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_countStable.sqf b/addons/vehiclemedical/functions/fnc_countStable.sqf new file mode 100644 index 000000000..bff0cf104 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_countStable.sqf @@ -0,0 +1,9 @@ +#include "..\script_component.hpp" +params["_vehicle"]; + +private _code = { + params["_vehicle"]; + { _x call FUNC(isStable) } count (crew _vehicle) +}; + +[QUOTE(GVAR(StableCountCache)),[_vehicle],_code] call FUNC(cachedResult); \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_countUnstable.sqf b/addons/vehiclemedical/functions/fnc_countUnstable.sqf new file mode 100644 index 000000000..8ce428868 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_countUnstable.sqf @@ -0,0 +1,9 @@ +#include "..\script_component.hpp" +params["_vehicle"]; + +private _code = { + params["_vehicle"]; + { _x call FUNC(isUnstable) } count (crew _vehicle) +}; + +[QUOTE(GVAR(UnstableCountCache)),[_vehicle],_code] call FUNC(cachedResult); \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_displayBP.sqf b/addons/vehiclemedical/functions/fnc_displayBP.sqf new file mode 100644 index 000000000..2eaa1cc6d --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_displayBP.sqf @@ -0,0 +1,13 @@ +#include "..\script_component.hpp" + +params[ + "_patient", + ["_isMedic", false, [false]] +]; + +_bp = [_patient] call EFUNC(circulation,getBloodPressure); +_bp params ["_bpLow", "_bpHigh"]; +if(_isMedic) exitWith { + format["%1/%2", (round _bpHigh), (round _bpLow)] +}; +[LOC(Shared,Not_Medic_Blood_Pressure_Low)] call FUNC(cachedLocalisationCall) \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_displayHR.sqf b/addons/vehiclemedical/functions/fnc_displayHR.sqf new file mode 100644 index 000000000..fbd63b384 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_displayHR.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" + +params[ + "_patient", + ["_isMedic", false, [false]] +]; + +_hr = GET_HEART_RATE(_patient); +if(_hr == 0) exitWith { + [LOC(Shared,Heart_Rate_None)] call FUNC(cachedLocalisationCall) +}; + +if(_isMedic) exitWith { + round _hr +}; + +[LOC(Shared,Not_Medic_Heart_Rate_Low)] call FUNC(cachedLocalisationCall) \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_getNumberOfFractures.sqf b/addons/vehiclemedical/functions/fnc_getNumberOfFractures.sqf new file mode 100644 index 000000000..079c63905 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_getNumberOfFractures.sqf @@ -0,0 +1,65 @@ + +#include "..\script_component.hpp" + +params[ + "_patient", + ["_splintedOnly", false] +]; + +private _fractures = GET_FRACTURES(_patient); +private _numFractures = 0; +{ + private _fracture = _fractures select _x; + switch (_fracture) do { + case 0: { + // Do nothing, no fracture + }; + case 1: { + // Fractured, no splint + if!(_splintedOnly) then { + _numFractures = _numFractures + 1; + }; + }; + case -1: { + if(_splintedOnly) then { + if(ace_medical_fractures in [2,3]) then { + _numFractures = _numFractures + 1; + } + else { + // Splinted, fracture healed automagically + }; + }; + }; + case -2: { + if(_splintedOnly) then { + if(ace_medical_fractures in [2,3]) then { + _numFractures = _numFractures + 1; + } + else { + // Splinted, fracture healed automagically + }; + }; + }; + case -3: { + if(_splintedOnly) then { + if(ace_medical_fractures in [2,3]) then { + _numFractures = _numFractures + 1; + } + else { + // Splinted, fracture healed automagically + }; + }; + }; + default { + }; + }; +} forEach [ + HITPOINT_INDEX_LARM, + HITPOINT_INDEX_ULARM, + HITPOINT_INDEX_RARM, + HITPOINT_INDEX_URARM, + HITPOINT_INDEX_LLEG, + HITPOINT_INDEX_ULLEG, + HITPOINT_INDEX_RLEG, + HITPOINT_INDEX_URLEG]; +_numFractures \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_getNumberOfWoundsToBandage.sqf b/addons/vehiclemedical/functions/fnc_getNumberOfWoundsToBandage.sqf new file mode 100644 index 000000000..9f36500d9 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_getNumberOfWoundsToBandage.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" + + +params[ + "_patient" +]; + +private _wounds = GET_OPEN_WOUNDS(_patient); +private _countBandageable = 0; + +{ + private _bodyPart = _x; + private _woundList = _wounds get _bodyPart; + + { + private _woundClassID = _x select 0; + private _amountOf = _x select 1; + private _bleeding = _x select 2; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + + // Condition for “bandageable external wound” + if ( + _amountOf > 0 + && {_className != "InternalBleeding"} + && {_bleeding > 0} + ) then { + _countBandageable = _countBandageable + 1; + }; + } forEach _woundList; + +} forEach (keys _wounds); + +_countBandageable \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_getTotalIV.sqf b/addons/vehiclemedical/functions/fnc_getTotalIV.sqf new file mode 100644 index 000000000..8712119e1 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_getTotalIV.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" + + +params[ + "_patient" +]; + +private _ivs = _patient getVariable ["ace_medical_ivBags", nil]; + +if(isNil "_ivs") exitWith { + 0 +}; + +private _sum = 0; +{ + _x params ["_volumeRemaining"]; + _sum = _sum + _volumeRemaining; +}forEach _ivs; +_sum = round _sum; +_sum \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_getVersion.sqf b/addons/vehiclemedical/functions/fnc_getVersion.sqf new file mode 100644 index 000000000..f49bce46b --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_getVersion.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" + +/* + * Author: M3ales + * Ace Vehicle Medical Version + * + * Arguments: + * 0: Patient + * + * Return Value: + * Version Number + * + * Example: + * ([] call mira_vehicle_medical_fnc_getVersion) params ["_major", "_minor", "_patch"]; + * + * Public: Yes + */ + +getArray(configFile >> "CfgPatches" >> QUOTE(ADDON) >> "version") \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_isStable.sqf b/addons/vehiclemedical/functions/fnc_isStable.sqf new file mode 100644 index 000000000..67747e108 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_isStable.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" + +/* + * Author: M3ales + * + * Based on https://github.com/acemod/ACE3/blob/v3.13.5/addons/medical_ai/functions/fnc_isInjured.sqf + * + * Arguments: + * 0: Patient + * + * Return Value: + * If in cardiac arrest or not + * + * Example: + * [_unit] call MIRA_Vehicle_Medical_fnc_isCardiacArrest + * Public: Yes + */ +params[ + "_patient", + ["_isMedic", false, [false]] +]; + +!([_patient] call FUNC(isUnstable)) + && { + private _bloodPressure = [_patient] call EFUNC(circulation,getBloodPressure); + _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; + private _map = GET_MAP(_patient); + ( GVAR(Stable_TrackLowBP) && (_map < 60)) + || { GVAR(Stable_TrackLowHR) && (GET_HEART_RATE(_patient) < 60)} + || { GVAR(Stable_TrackFractures) && ((selectMax GET_FRACTURES(_patient)) > 0)} + || { GVAR(Stable_TrackNeedsBandage) && ([_patient] call FUNC(getNumberOfWoundsToBandage)) > 0 } + || { GVAR(Stable_TrackTourniquets) && ((selectMax GET_TOURNIQUETS(_patient)) > 0)} + } \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_isUnstable.sqf b/addons/vehiclemedical/functions/fnc_isUnstable.sqf new file mode 100644 index 000000000..78cbe44a7 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_isUnstable.sqf @@ -0,0 +1,12 @@ +#include "..\script_component.hpp" + +params["_patient"]; + +private _dead = GVAR(Unstable_TrackDead) && !alive _patient; +private _bleeding = GVAR(Unstable_TrackBleeding) && [_patient] call FUNC(needsBandage); +private _sleepy = GVAR(Unstable_TrackUnconscious) && IS_UNCONSCIOUS(_patient); +private _cardiacArrest = GVAR(Unstable_TrackCardiacArrest) && (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] != 0); +private _spO2Low = (GET_KAT_SPO2(_patient) < 90); + +//display action if any are true +_bleeding || _sleepy || _cardiacArrest || _dead || _spO2Low \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_needsBandage.sqf b/addons/vehiclemedical/functions/fnc_needsBandage.sqf new file mode 100644 index 000000000..bb635b5bf --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_needsBandage.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" + +params ["_patient"]; +private _wounds = GET_OPEN_WOUNDS(_patient); +private _hasExternalBleeding = false; + +{ + private _bodyPart = _x; + private _woundList = _wounds get _bodyPart; + + { + private _woundClassID = _x select 0; + private _amountOf = _x select 1; + private _bleeding = _x select 2; + + private _classIndex = _woundClassID / 10; + private _className = ACEGVAR(medical_damage,woundClassNames) select _classIndex; + if ( + _amountOf > 0 + && {_className != "InternalBleeding"} + && {_bleeding > 0} + ) exitWith { + _hasExternalBleeding = true; + }; + } forEach _woundList; + + if (_hasExternalBleeding) exitWith {}; +} forEach (keys _wounds); +_hasExternalBleeding \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_openMedicalMenu.sqf b/addons/vehiclemedical/functions/fnc_openMedicalMenu.sqf new file mode 100644 index 000000000..078a162dc --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_openMedicalMenu.sqf @@ -0,0 +1,12 @@ +#include "..\script_component.hpp" + +params[ + "_patient" +]; + + +if(GVAR(aceAfter_313)) exitWith { + [_patient] call ace_medical_gui_fnc_openMenu; +}; + +[_patient] call ace_medical_menu_fnc_openMenu; \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_unloadAllWithCondition.sqf b/addons/vehiclemedical/functions/fnc_unloadAllWithCondition.sqf new file mode 100644 index 000000000..9bef52d06 --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_unloadAllWithCondition.sqf @@ -0,0 +1,16 @@ +#include "..\script_component.hpp" +params["_vehicle", "_medic", ["_conditionCode", {true}], ["_force", false]]; + +if(!(_conditionCode isEqualType {})) exitWith { +}; +private _passengers = crew _vehicle; +{ + if(_medic != _x) then { + if([_x] call _conditionCode) then { + [_x, _medic, _force] call FUNC(unloadPatient); + } + else + { + }; + }; +}forEach _passengers; \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_unloadPatient.sqf b/addons/vehiclemedical/functions/fnc_unloadPatient.sqf new file mode 100644 index 000000000..2e6864a7b --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_unloadPatient.sqf @@ -0,0 +1,11 @@ +#include "..\script_component.hpp" +params["_patient", "_medic", ["_force", false]]; + +if(_force) exitWith { + private _name = [_patient] call ace_common_fnc_getName; + [format["Forcing out %1", _name], false, 4, 1] call ACE_common_fnc_displayText; + [QUOTE(GVAR(UnloadPatientForce)), [_patient, _medic], _patient] call CBA_fnc_targetEvent; + ["ace_unloadPersonEvent", [_patient, vehicle _patient, _medic], _patient] call CBA_fnc_targetEvent; +}; + +["ace_unloadPersonEvent", [_patient, vehicle _patient, _medic], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/vehiclemedical/functions/fnc_unloadPatientForceHandler.sqf b/addons/vehiclemedical/functions/fnc_unloadPatientForceHandler.sqf new file mode 100644 index 000000000..cd9e9196e --- /dev/null +++ b/addons/vehiclemedical/functions/fnc_unloadPatientForceHandler.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +params["_patient", "_medic"]; + +private _name = [_medic] call ace_common_fnc_getName; +[format["Being forced out by %1", _name], false, 2, 1] call ACE_common_fnc_displayText; +unassignVehicle _patient; +[_patient] orderGetIn false; +_patient action ["Eject", vehicle _patient]; +if (!isNull objectParent _patient) then { + moveOut _patient; +}; +[_patient, false, "ace_common_fnc_loadPerson", side group _patient] call ace_common_fnc_switchToGroupSide; + +[ + { + params ["_patient"]; + (alive _patient) && {!isNull objectParent _patient} + }, + { + params ["_patient"]; + }, + [_patient, _medic], + 2, + { + params ["_patient", "_medic"]; + private _name = [_medic] call ace_common_fnc_getName; + [format["Being forced out by %1", _name], false, 4, 1] call ACE_common_fnc_displayText; + unassignVehicle _patient; + [_patient] orderGetIn false; + _patient action ["Eject", vehicle _patient]; + if (!isNull objectParent _patient) then { + moveOut _patient; + }; + [_patient, false, "ace_common_fnc_loadPerson", side group _patient] call ace_common_fnc_switchToGroupSide; + } +] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file diff --git a/addons/vitals/CfgFunctions.hpp b/addons/vitals/CfgFunctions.hpp index 9797e53ea..64593bcb9 100644 --- a/addons/vitals/CfgFunctions.hpp +++ b/addons/vitals/CfgFunctions.hpp @@ -8,6 +8,12 @@ class CfgFunctions { class addMedicationAdjustment { file = QPATHTOF(functions\fnc_addMedicationAdjustment.sqf); }; + class getCardiacOutput { + file = QPATHTOF(functions\fnc_getCardiacOutput.sqf); + }; + class getBloodLoss { + file = QPATHTOF(functions\fnc_getBloodLoss.sqf); + }; }; }; class overwrite_ace_medical_vitals { diff --git a/addons/vitals/XEH_PREP.hpp b/addons/vitals/XEH_PREP.hpp index c43c487b6..0a990603f 100644 --- a/addons/vitals/XEH_PREP.hpp +++ b/addons/vitals/XEH_PREP.hpp @@ -2,9 +2,14 @@ PREP(addMedicationAdjustment); PREP(basicDiagnostic); PREP(basicDiagnosticLocal); PREP(fullHealLocal); +PREP(generateDefaultWeight); +PREP(getBloodLoss); +PREP(getCardiacOutput); +PREP(getCushings); +PREP(getDefaultStrokeVolume); +PREP(getStrokeVolume); PREP(handleCardiacFunction); PREP(handleOxygenFunction); -PREP(handlePoisoning); PREP(handleRespawn); PREP(handleSimpleVitals); PREP(handleTemperatureFunction); @@ -12,5 +17,14 @@ PREP(handleUnitVitals); PREP(hasStableVitals); PREP(init); PREP(returnFatigue); +PREP(returnReserve); +PREP(updateContractility); +PREP(updateNauseaMult); +PREP(updateOpioidDepression); PREP(updateOpioidEffect); -PREP(updateOpioidRelief); \ No newline at end of file +PREP(updateOpioidRelief); +PREP(updateParalysis); +PREP(updateRespiratoryDepth); +PREP(updateRespiratoryRate); +PREP(updateSedation); +PREP(weightLog); \ No newline at end of file diff --git a/addons/vitals/XEH_postInit.sqf b/addons/vitals/XEH_postInit.sqf index d215eafd4..913fbeb0c 100644 --- a/addons/vitals/XEH_postInit.sqf +++ b/addons/vitals/XEH_postInit.sqf @@ -4,3 +4,22 @@ [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; +["ace_medical_death", { + params ["_unit"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _alive = alive _unit; + if (_alive) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _bg = _unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]; + private _spo2 = (_bg select 2) - 0.005; + if (_spo2 < 0.01) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _bg set [2, _spo2]; + _unit setVariable [VAR_BLOOD_GAS, _bg, true]; +}, 10, [_unit]] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; + diff --git a/addons/vitals/audio/gasp.ogg b/addons/vitals/audio/gasp.ogg new file mode 100644 index 000000000..b16444773 Binary files /dev/null and b/addons/vitals/audio/gasp.ogg differ diff --git a/addons/vitals/functions/fnc_addMedicationAdjustment.sqf b/addons/vitals/functions/fnc_addMedicationAdjustment.sqf index 9a4ca4a20..88e4a0ecf 100644 --- a/addons/vitals/functions/fnc_addMedicationAdjustment.sqf +++ b/addons/vitals/functions/fnc_addMedicationAdjustment.sqf @@ -11,24 +11,42 @@ * 4: Heart Rate Adjust * 5: Pain Suppress Adjust * 6: Flow Adjust + * 7: Dose * * Return Value: * None * * Example: - * [player, "Morphine", 120, 60, -10, 0.8, -10] call ace_medical_status_fnc_addMedicationAdjustment + * [player, "Morphine", 120, 60, -10, 0.8, -10, 1] call ace_medical_status_fnc_addMedicationAdjustment * * Public: No */ -params ["_unit", "_medication", "_timeToMaxEffect", "_maxTimeInSystem", "_hrAdjust", "_painAdjust", "_flowAdjust", "_dose", "_alphaFactor", "_opioidRelief", "_opioidEffect"]; -TRACE_7("addMedicationAdjustment",_unit,_medication,_timeToMaxEffect,_maxTimeInSystem,_hrAdjust,_painAdjust,_flowAdjust); +params [ + "_unit", "_medication", + ["_timeToMaxEffect", 0], + ["_maxTimeInSystem", 0], + ["_hrAdjust", 0], + ["_painAdjust", 0], + ["_flowAdjust", 0], + ["_dose", 0], + ["_alphaFactor", 0], + ["_opioidRelief", 0], + ["_opioidEffect", 0], + ["_opioidDepression", 0], + ["_respiratoryRate", 0], + ["_contractility", 0], + ["_nauseaMult", 0], + ["_sedation", "false"], + ["_paralysis", "false"], + ["_linear", "false"] +]; +TRACE_8("addMedicationAdjustment",_unit,_medication,_timeToMaxEffect,_maxTimeInSystem,_hrAdjust,_painAdjust,_flowAdjust,_dose); if (_maxTimeInSystem <= 0) exitWith { WARNING_1("bad value for _maxTimeInSystem - %1",_this); }; _timeToMaxEffect = _timeToMaxEffect max 1; private _adjustments = _unit getVariable [VAR_MEDICATIONS, []]; - -_adjustments pushBack [_medication, CBA_missionTime, _timeToMaxEffect, _maxTimeInSystem, _hrAdjust, _painAdjust, _flowAdjust, _dose, _alphaFactor, _opioidRelief, _opioidEffect]; +_adjustments pushBack [_medication, CBA_missionTime, _timeToMaxEffect, _maxTimeInSystem, _hrAdjust, _painAdjust, _flowAdjust, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate, _contractility,_nauseaMult,_sedation,_paralysis,_linear]; _unit setVariable [VAR_MEDICATIONS, _adjustments, true]; diff --git a/addons/vitals/functions/fnc_fullHealLocal.sqf b/addons/vitals/functions/fnc_fullHealLocal.sqf index d18ae4dc0..5947545d5 100644 --- a/addons/vitals/functions/fnc_fullHealLocal.sqf +++ b/addons/vitals/functions/fnc_fullHealLocal.sqf @@ -20,7 +20,21 @@ params ["_patient"]; _patient setVariable [QGVAR(simpleMedical), false, true]; _patient setVariable [QGVAR(respiratoryDepth), DEFAULT_RESPIRATORY_DEPTH, true]; _patient setVariable [QGVAR(fatigueEnabled), (missionNamespace getVariable [QACEGVAR(advanced_fatigue,enabled), false]), true]; - +_patient setVariable [QGVAR(currentWeight), [_patient] call FUNC(generateDefaultWeight), true]; +_patient setVariable [QGVAR(mapIntegral), 0, true]; +_patient setVariable [QGVAR(svMemory), 0.0810542, true]; +_patient setVariable [QGVAR(csCO2Memory), 40, true]; +_patient setVariable [QGVAR(breathingState), 0, true]; +_patient setVariable [QGVAR(biotTimer), 0, true]; +_patient setVariable [QGVAR(biotState), "breath", true]; +_patient setVariable [QGVAR(agonalTimer), 0, true]; +_patient setVariable [QGVAR(rrMemory), 0, true]; +_patient setVariable [QGVAR(shockClass), "NONE", true]; +_patient setVariable [QGVAR(ataxicRate), 0, true]; +_patient setVariable [QGVAR(ataxicDepth), 0, true]; +_patient setVariable [QGVAR(ataxicTimer), 0, true]; +_patient setVariable [QGVAR(respFatigue), 0, true]; +_patient setVariable [QGVAR(pao2_prev), 90, true]; if (GVAR(enableSimpleMedical)) then { _patient setVariable [QGVAR(simpleMedical), true, true]; -}; \ No newline at end of file +}; diff --git a/addons/vitals/functions/fnc_generateDefaultWeight.sqf b/addons/vitals/functions/fnc_generateDefaultWeight.sqf new file mode 100644 index 000000000..d9865cd2d --- /dev/null +++ b/addons/vitals/functions/fnc_generateDefaultWeight.sqf @@ -0,0 +1,82 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Generates blood type for player according to settings + * + * Arguments: + * 0: Player + * 1: Dead body + * + * Return Value: + * Blood type + * + * Example: + * [unit, body] call kat_circulation_fnc_generateDefaultWeight; + * + * Public: No + */ + +params ["_unit"]; + +private _defaultWeight = 80; +private _playerdefaultWeight = _unit getVariable [QGVAR(currentWeight), _defaultWeight]; + +if (isMultiplayer) then { + private _id = parseNumber (getPlayerUID _unit select [15, 2]); + switch (true) do { + case (0 <= _id && _id <= 2): { _defaultWeight = 92 }; + case (3 <= _id && _id <= 4): { _defaultWeight = 69 }; + case (5 <= _id && _id <= 6): { _defaultWeight = 87 }; + case (7 <= _id && _id <= 8): { _defaultWeight = 100 }; + case (9 <= _id && _id <= 10): { _defaultWeight = 64 }; + case (11 <= _id && _id <= 12): { _defaultWeight = 84 }; + case (13 <= _id && _id <= 14): { _defaultWeight = 96 }; + case (15 <= _id && _id <= 16): { _defaultWeight = 73 }; + case (17 <= _id && _id <= 18): { _defaultWeight = 70 }; + case (19 <= _id && _id <= 20): { _defaultWeight = 88 }; + case (21 <= _id && _id <= 22): { _defaultWeight = 63 }; + case (23 <= _id && _id <= 24): { _defaultWeight = 61 }; + case (25 <= _id && _id <= 26): { _defaultWeight = 60 }; + case (27 <= _id && _id <= 28): { _defaultWeight = 93 }; + case (29 <= _id && _id <= 30): { _defaultWeight = 75 }; + case (31 <= _id && _id <= 32): { _defaultWeight = 90 }; + case (33 <= _id && _id <= 34): { _defaultWeight = 66 }; + case (35 <= _id && _id <= 36): { _defaultWeight = 71 }; + case (37 <= _id && _id <= 38): { _defaultWeight = 78 }; + case (39 <= _id && _id <= 40): { _defaultWeight = 94 }; + case (41 <= _id && _id <= 42): { _defaultWeight = 89 }; + case (43 <= _id && _id <= 44): { _defaultWeight = 67 }; + case (45 <= _id && _id <= 46): { _defaultWeight = 86 }; + case (47 <= _id && _id <= 48): { _defaultWeight = 80 }; + case (49 <= _id && _id <= 50): { _defaultWeight = 62 }; + case (51 <= _id && _id <= 52): { _defaultWeight = 98 }; + case (53 <= _id && _id <= 54): { _defaultWeight = 76 }; + case (55 <= _id && _id <= 56): { _defaultWeight = 91 }; + case (57 <= _id && _id <= 58): { _defaultWeight = 60 }; + case (59 <= _id && _id <= 60): { _defaultWeight = 68 }; + case (61 <= _id && _id <= 62): { _defaultWeight = 65 }; + case (63 <= _id && _id <= 64): { _defaultWeight = 95 }; + case (65 <= _id && _id <= 66): { _defaultWeight = 97 }; + case (67 <= _id && _id <= 68): { _defaultWeight = 66 }; + case (69 <= _id && _id <= 70): { _defaultWeight = 99 }; + case (71 <= _id && _id <= 72): { _defaultWeight = 72 }; + case (73 <= _id && _id <= 74): { _defaultWeight = 82 }; + case (75 <= _id && _id <= 76): { _defaultWeight = 61 }; + case (77 <= _id && _id <= 78): { _defaultWeight = 77 }; + case (79 <= _id && _id <= 80): { _defaultWeight = 79 }; + case (81 <= _id && _id <= 82): { _defaultWeight = 83 }; + case (83 <= _id && _id <= 84): { _defaultWeight = 74 }; + case (85 <= _id && _id <= 86): { _defaultWeight = 85 }; + case (87 <= _id && _id <= 88): { _defaultWeight = 81 }; + case (89 <= _id && _id <= 90): { _defaultWeight = 67 }; + case (91 <= _id && _id <= 92): { _defaultWeight = 63 }; + case (93 <= _id && _id <= 94): { _defaultWeight = 64 }; + case (95 <= _id && _id <= 96): { _defaultWeight = 65 }; + case (97 <= _id && _id <= 98): { _defaultWeight = 62 }; + case (99 <= _id && _id <= 100): { _defaultWeight = 68 }; + default { _defaultWeight = 80 }; + }; + } else { + _defaultWeight = _playerdefaultWeight; + }; +_defaultWeight; \ No newline at end of file diff --git a/addons/vitals/functions/fnc_getBloodLoss.sqf b/addons/vitals/functions/fnc_getBloodLoss.sqf new file mode 100644 index 000000000..bec2e3181 --- /dev/null +++ b/addons/vitals/functions/fnc_getBloodLoss.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal + * Calculate the total blood loss of a unit. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * Total blood loss of unit (litres/second) + * + * Example: + * [player] call ace_medical_status_fnc_getBloodLoss + * + * Public: No + */ + +params ["_unit"]; + +private _woundBleeding = GET_WOUND_BLEEDING(_unit); +if (_woundBleeding == 0) exitWith {0}; + +private _cardiacOutput = [_unit] call FUNC(getCardiacOutput); +private _resistance = _unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]; // can use value directly since this is sum of default and adjustments +private _cardiacOutputFixed = (_cardiacOutput max CARDIAC_OUTPUT_MIN); +private _alphaAction = GET_VASOCONSTRICTION(_unit); +// even if heart stops blood will still flow slowly (gravity) +private _bloodLoss = (_woundBleeding * _cardiacOutputFixed * (DEFAULT_PERIPH_RES / _resistance) * ACEGVAR(medical,bleedingCoefficient) * _alphaAction); +TRACE_4("GBL",_woundBleeding,_cardiacOutputFixed,_resistance,_bloodLoss); + +private _eventArgs = [_unit, _bloodLoss]; // Pass by reference + +[QACEGVAR(medical_status,getBloodLoss), _eventArgs] call CBA_fnc_localEvent; + +_eventArgs select 1 // return \ No newline at end of file diff --git a/addons/vitals/functions/fnc_getCardiacOutput.sqf b/addons/vitals/functions/fnc_getCardiacOutput.sqf new file mode 100644 index 000000000..a188dfd28 --- /dev/null +++ b/addons/vitals/functions/fnc_getCardiacOutput.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Glowbal, kymckay + * Get the cardiac output from the Heart, based on current Heart Rate and Blood Volume. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * Current cardiac output (liter per second) + * + * Example: + * [player] call ace_medical_status_fnc_getCardiacOutput + * + * Public: No + */ + +params ["_unit"]; +private _heartRate = GET_HEART_RATE(_unit); +private _cardiacOutput = (([_unit] call FUNC(getStrokeVolume)) * _heartRate) / 60; +TRACE_1("cardicaOutput",_cardiacOutput); +0 max _cardiacOutput \ No newline at end of file diff --git a/addons/vitals/functions/fnc_getCushings.sqf b/addons/vitals/functions/fnc_getCushings.sqf new file mode 100644 index 000000000..07cd8262e --- /dev/null +++ b/addons/vitals/functions/fnc_getCushings.sqf @@ -0,0 +1,34 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Calculate stroke volume of a single heart beat. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * stroke volume (l) + * + * Example: + * [player] call kat_vitals_fnc_getCushings + * + * Public: No + */ + +params ["_unit"]; + +private _icp = GET_ICP(_unit); +private _map = GET_MAP(_unit); +private _cpp = (_map - _icp) max 0; + +// Only meaningful when ICP is high AND CPP threatened +if (_icp < 20) exitWith {0}; + +// ICP driven severity +private _icpFactor = linearConversion [20, 45, _icp, 0, 1, true]; + +// CPP driven severity (low CPP = worse) +private _cppFactor = linearConversion [70, 30, _cpp, 0, 1, true]; + +// Combined severity +(_icpFactor max _cppFactor) \ No newline at end of file diff --git a/addons/vitals/functions/fnc_getDefaultStrokeVolume.sqf b/addons/vitals/functions/fnc_getDefaultStrokeVolume.sqf new file mode 100644 index 000000000..d33d7761a --- /dev/null +++ b/addons/vitals/functions/fnc_getDefaultStrokeVolume.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Calculate stroke volume of a single heart beat. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * stroke volume (ml) + * + * Example: + * [player] call kat_vitals_fnc_getStrokeVolume + * + * Public: No + */ + +params ["_unit"]; +private _defaultCVP = 6; +private _strokeVolume = 0.095; +private _bloodPressure = [80, 120]; + +private _fillPortion = 1 - exp (-3 * 1); +private _edv = _fillPortion * _defaultCVP * 0.25 * _strokeVolume; + +private _esv = (0.5 * _strokeVolume); + +private _strokeVol = (_edv - _esv) max 0; + +_strokeVol diff --git a/addons/vitals/functions/fnc_getStrokeVolume.sqf b/addons/vitals/functions/fnc_getStrokeVolume.sqf new file mode 100644 index 000000000..291da65f1 --- /dev/null +++ b/addons/vitals/functions/fnc_getStrokeVolume.sqf @@ -0,0 +1,235 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Calculate stroke volume of a single heart beat. + * + * Arguments: + * 0: The Unit + * + * Return Value: + * stroke volume (l) + * + * Example: + * [player] call kat_vitals_fnc_getStrokeVolume + * + * Public: No + */ + +params ["_unit"]; +// ======================= +// BASELINE CONSTANTS +// ======================= +#define BASELINE_SV 0.0879 // 87.9 mL +#define BASELINE_EF 0.6 +#define BASELINE_EDV (BASELINE_SV / BASELINE_EF) +#define BASELINE_ESV (BASELINE_EDV - BASELINE_SV) +#define BASELINE_MAP 93 + +// ======================= +// INPUTS +// ======================= +private _map = GET_MAP(_unit); +private _defaultCVP = 6; +private _heartRate = GET_HEART_RATE(_unit); +private _bloodVolumeRatio = GET_BLOOD_VOLUME_LITERS(_unit) / DEFAULT_BLOOD_VOLUME; + +private _contractility = + (_unit getVariable [QEGVAR(pharma,heartContractility), 1]) max 0.2; + +// ======================= +// OBSTRUCTIVE FACTORS +// ======================= +private _ptxArray = (_unit getVariable [QEGVAR(breathing,pneumothorax), [0,0]]); +private _tptxArray = (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [0,0]]); +private _hptxArray = (_unit getVariable [QEGVAR(breathing,hemopneumothorax), [0,0]]); +private _ptx = ((_ptxArray select 0) + (_ptxArray select 1)); +private _hptx = ((_hptxArray select 0) + (_hptxArray select 1)); + + +private _tamponade = _unit getVariable [QEGVAR(circulation,effusion), 0]; +private _trali = _unit getVariable [QEGVAR(breathing,TRALI), 0]; + +private _vrEff = + 1 + - (linearConversion [0,16,_ptx,0,0.3,true]) + - (linearConversion [0,2,_hptx,0,0.4,true]) + - (linearConversion [0,4,_tamponade,0,0.5,true]) + - (linearConversion [0,30,_trali,0,0.2,true]); + +_vrEff = _vrEff max 0.1; +private _rvAfterload = 1; +private _rvFailure = 1; +if ((_tptxArray select 0) || (_tptxArray select 1)) then { + _rvAfterload = + linearConversion + [ + 0, 16, // PTX scale + _ptx, + 1.0, 2.5, // RV afterload multiplier + true + ]; + +// RV stroke limitation (Frank–Starling failure) + _rvFailure = + linearConversion + [ + 0.3, 1.5, // mild → severe RV strain + _rvAfterload, + 1.0, 0.35, // full → failing RV + true + ]; + +}; + +// ======================= +// HEART RATE FILLING +// ======================= +private _fillTime = + linearConversion [40, 160, _heartRate, 1.2, 0.6, true]; + +private _fillPortion = 1 - exp (-3 * _fillTime); + +// ======================= +// VENOUS COMPENSATION +// ======================= +_bvComp = + linearConversion + [ + 0.75, 1.0, + _bloodVolumeRatio, + 0.85, 1.0, + true + ]; +private _shockClass = + _unit getVariable [QGVAR(shockClass), "NONE"]; +private _globalVaso = GET_VASOCONSTRICTION(_unit); +private _vasoTone = switch (_shockClass) do { + case "NONE": { 1.0 }; + case "COMPENSATED": { 1.2 }; // strong sympathetic response + case "DECOMPENSATED": { 1.05 }; // partial failure + case "TERMINAL": { 0.75 }; // vasoplegia + default { 1.0 }; +}; +private _effectiveVaso = + _globalVaso * _vasoTone; + +_effectiveVaso = _effectiveVaso min 1.4 max 0.6; +private _effectiveCVP = + _defaultCVP + * _bvComp + * _effectiveVaso + * _vrEff; +private _arterialEffect = linearConversion [0.7, 1.3, _effectiveVaso, 0.85, 1.25, true]; +TRACE_8( + "_effectiveCVP", + _defaultCVP, + _bvComp, + _effectiveVaso, + _globalVaso, + _vasoTone, + _fillPortion, + _effectiveCVP, + _defaultCVP +); +// ======================= +// PRELOAD & STARLING +// ======================= +private _preload = + (_effectiveCVP / _defaultCVP) + * _rvFailure + min 1.3 + max 0.2; + +private _edv = + BASELINE_EDV + * _preload + * (0.85 + 0.15 * _fillPortion); + +private _edvNorm = (_edv / BASELINE_EDV) min 1.4 max 0.4; + +private _restEDV = BASELINE_EDV * _fillPortion; +private _edvRel = _edv / _restEDV; + +private _starlingGain = + linearConversion + [ + 0.7, 1.2, // relative EDV range + _edvRel, + 0.8, 1.15, // gain range + true + ]; + +_starlingGain = _starlingGain min 1.35; +TRACE_8( + "_starlingGain", + _starlingGain, + _edvNorm, + _edv, + BASELINE_EDV, + _preload, + _fillPortion, + _effectiveCVP, + _defaultCVP +); +// ======================= +// AFTERLOAD & ESV +// ======================= +private _mapNorm = + linearConversion + [ + 50, 130, // hypotension → severe HTN + _map, + 0.65, 1.35, // afterload multiplier + true + ]; + private _mapShock = switch (_shockClass) do { + case "COMPENSATED": { 1.1 }; + case "DECOMPENSATED": { 1.0 }; + case "TERMINAL": { 0.8 }; + default { 1.0 }; + }; +_mapNorm = + _mapNorm * _mapShock; + +private _vasoAfterload = + linearConversion + [ + 0.6, 1.4, + _effectiveVaso, + 0.85, 1.25, + true + ]; +private _afterload = + _mapNorm + * _vasoAfterload; +private _effectiveContractility = + _contractility * _starlingGain; + +private _esv = + BASELINE_ESV * (_afterload / _effectiveContractility); +TRACE_6( + "esv", + _afterload, + _effectiveContractility, + _contractility, + _starlingGain, + _bloodVolumeRatio, + _arterialEffect +); +_esv = _esv min (_edv * 0.95); +// ======================= +// FINAL STROKE VOLUME +// ======================= +private _strokeVol = (_edv - _esv) max 0.001; + +TRACE_6( + "strokeVolume", + _edv, + _strokeVol, + _esv, + _heartRate, + _fillTime, + _bloodVolumeRatio +); + +_strokeVol \ No newline at end of file diff --git a/addons/vitals/functions/fnc_handleCardiacFunction.sqf b/addons/vitals/functions/fnc_handleCardiacFunction.sqf index 459c6a33d..d5d2ee990 100644 --- a/addons/vitals/functions/fnc_handleCardiacFunction.sqf +++ b/addons/vitals/functions/fnc_handleCardiacFunction.sqf @@ -1,3 +1,4 @@ +#define DEBUG_MODE_FULL #include "..\script_component.hpp" /* * Author: Glowbal, Mazinski @@ -21,52 +22,213 @@ * Public: No */ -params ["_unit", "_hrTargetAdjustment", "_hrTarget", "_bloodVolume", "_aceAnFatigue", "_deltaT", "_syncValue"]; - -#define HEART_RATE_CO2_MULTIPLIER 60 -#define CO2_TO_DEMAND_DIVISOR 37894.7367424 -#define BLOOD_VOLUME_TO_STROKE_DIVISOR 3789.47371 -#define DEFAULT_STROKE_VOLUME 0.001583333323 +params ["_unit", "_hrTargetAdjustment", "_hrTarget", "_bloodVolume", "_aceAnFatigue", "_aceAnReserve", "_deltaT", "_syncValue"]; +private _icp = GET_ICP(_unit); +private _map = GET_MAP(_unit); private _actualHeartRate = _hrTarget; -private _actualReturn = 0; - -if IN_CRDC_ARRST(_unit) then { +private _painLevel = 0; +private _shockClass = "NONE"; +private _metabolicDemand = 0; +if (IN_CRDC_ARRST(_unit)) then { if (alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull])) then { - if (_actualHeartRate == 0) then { _syncValue = true }; // always sync on large change - _actualHeartRate = random [100, 110, 120]; + if (_actualHeartRate == 0) then { _syncValue = true }; + _actualHeartRate = random [95, 100, 110]; } else { - if (_actualHeartRate != 0) then { _syncValue = true }; // always sync on large change - _actualHeartRate = 0 + if (_actualHeartRate != 0) then { _syncValue = true }; + _actualHeartRate = 0; }; } else { - private _painLevel = GET_PAIN_PERCEIVED(_unit); - - // Adjustments and Pain Levels are taken off of last cycle HR to prevent any spiraling vitials - private _lastCycleHeartRate = GET_HEART_RATE(_unit) - _hrTargetAdjustment - (10 * _painLevel) - (_aceAnFatigue * 40); - private _lastCycleCO2 = _lastCycleHeartRate * HEART_RATE_CO2_MULTIPLIER; - private _demandReturn = _lastCycleCO2 / CO2_TO_DEMAND_DIVISOR; - private _strokeVolume = (_bloodVolume / BLOOD_VOLUME_TO_STROKE_DIVISOR); - - // As HR increases, pressure is taken off decreasing stroke volume. However, this effect decreases at higher heart rates and lower SVs - private _strokeVolumeDifference = [ _strokeVolume / (DEFAULT_STROKE_VOLUME * 0.66), DEFAULT_STROKE_VOLUME / _strokeVolume ] select (DEFAULT_STROKE_VOLUME / _strokeVolume < 1.22); - private _volumeSupportHR = DEFAULT_HEART_RATE * _strokeVolumeDifference; - _strokeVolume = _strokeVolume * _strokeVolumeDifference; - - // Model HR driven by demandReturn divided by stroke volume with pressure applied by volume shortage. 40 point baseline applied to keep movements more stable - private _modelHeartRate = 40 + ((_demandReturn / _strokeVolume) / 2) + (_volumeSupportHR - DEFAULT_HEART_RATE); - - // Actual Heart Rate increases stepwise under the target model - _actualHeartRate = switch (true) do { - case (_modelHeartRate > _lastCycleHeartRate): { (_lastCycleHeartRate + (1 * _deltaT)) min _modelHeartRate }; - case (_modelHeartRate < _lastCycleHeartRate): { (_lastCycleHeartRate - (1 * _deltaT)) max _modelHeartRate }; - default { _modelHeartRate }; + private _defaultHR = _unit getVariable [QEGVAR(circulation,defaultHeartRate), 80]; + private _mapSetpoint = linearConversion [60, 100, _defaultHR, 83, 103, true]; + #define MAP_DEADBAND 3 + #define BARO_KP 0.6 + #define BARO_KI 0.12 + #define INTEGRAL_CLAMP 30 + #define MIN_HR 20 + #define MAX_HR 220 + _metabolicDemand = linearConversion [2200, 400, _aceAnReserve, 0, 1, true]; + + _painLevel = GET_PAIN_PERCEIVED(_unit); + + private _lastHR = + GET_HEART_RATE(_unit) + - _hrTargetAdjustment + - (10 * _painLevel) + - (_aceAnFatigue * 40); + + private _baselineSV = 0.0810542; + private _strokeVolume = [_unit] call FUNC(getStrokeVolume); + + private _svMemory = + _unit getVariable [QGVAR(svMemory), _baselineSV]; + + private _svTau = 6; + _svMemory = _svMemory + ((_strokeVolume - _svMemory) * (_deltaT / _svTau)); + _unit setVariable [QGVAR(svMemory), _svMemory]; + + private _effectiveSV = _svMemory max 0.03; + + TRACE_5( + "SV_MODEL", + _strokeVolume, + _svMemory, + _effectiveSV, + _svTau, + _baselineSV + ); + private _mapError = (_mapSetpoint) - _map; + if (abs _mapError < MAP_DEADBAND) then { _mapError = 0 }; + + private _mapIntegral = + _unit getVariable [QGVAR(mapIntegral), 0]; + + _mapIntegral = _mapIntegral + (_mapError * _deltaT); + + if (abs _mapError < MAP_DEADBAND) then { + _mapIntegral = _mapIntegral * 0.85; + }; + + _mapIntegral = (_mapIntegral max -INTEGRAL_CLAMP) min INTEGRAL_CLAMP; + _unit setVariable [QGVAR(mapIntegral), _mapIntegral]; + + private _baroDelta = + (BARO_KP * _mapError) + + (BARO_KI * _mapIntegral); + + _modelHR = _defaultHR + _baroDelta; + + TRACE_6( + "BARO_CORE", + _map, + _mapError, + _mapIntegral, + _modelHR, + BARO_KP, + BARO_KI + ); + private _centralBias = 0; + + if ( + _painLevel < 0.05 + && _aceAnFatigue < 0.05 + && abs (_effectiveSV - _baselineSV) < 0.003 + ) then { + _centralBias = linearConversion [90, 100, _map, 0, 6, true]; + }; + + _modelHR = _modelHR + _centralBias; + + TRACE_2("CENTRAL_CMD", _centralBias, _modelHR); + + private _staminaHRBias = + linearConversion [0, 1, _metabolicDemand, 0, 25, true]; + + _modelHR = _modelHR + _staminaHRBias; + + if (_icp > EGVAR(brain,ICPbradycardiaThreshold)) then { + private _ICPbias = linearConversion [EGVAR(brain,ICPbradycardiaThreshold), 60, _icp, -20, -45, true]; + _modelHR = _modelHR + _ICPbias; + }; + + TRACE_2("STAMINA_CMD", _metabolicDemand, _staminaHRBias); + + private _vagalTone = 0; + + if (_painLevel > 0.7) then { + _vagalTone = linearConversion [0.7, 1.0, _painLevel, 0, 0.35, true]; }; - // All additional adjustments are added back - _actualHeartRate = _actualHeartRate + _hrTargetAdjustment + (10 * _painLevel) + (_aceAnFatigue * 40); + private _spo2 = GET_KAT_SPO2(_unit); + if (_spo2 < 85) then { + _vagalTone = _vagalTone max + linearConversion [85, 60, _spo2, 0, 0.5, true]; + }; + + _vagalTone = + _vagalTone + * linearConversion [0, 1, _metabolicDemand, 1, 0.4, true]; + + TRACE_3("VAGAL", _painLevel, _spo2, _vagalTone); + + _modelHR = _modelHR * (1 - _vagalTone); + _shockClass = "NONE"; + if (_effectiveSV < 0.06 && _map < 70) then { _shockClass = "COMPENSATED" }; + if (_effectiveSV < 0.04 && _map < 60) then { _shockClass = "DECOMPENSATED" }; + if (_effectiveSV < 0.025) then { _shockClass = "TERMINAL" }; + + _unit setVariable [QGVAR(shockClass), _shockClass]; + + TRACE_3( + "SHOCK", + _shockClass, + _effectiveSV, + _map + ); + + switch (_shockClass) do { + case "DECOMPENSATED": { _modelHR = _modelHR * 1.1 }; + case "TERMINAL": { _modelHR = _modelHR * 0.6 }; + }; + + _modelHR = (_modelHR max MIN_HR) min MAX_HR; + + private _hrDelta = _modelHR - _lastHR; + + private _rate = + (1.2 * _deltaT) + * linearConversion [0, 1, _metabolicDemand, 1, 1.6, true]; + + TRACE_4("SA_NODE", _lastHR, _modelHR, _hrDelta, _rate); + + TRACE_4( + "SA_NODE", + _lastHR, + _modelHR, + _hrDelta, + _rate + ); + + if (abs _hrDelta < 0.25) then { + _actualHeartRate = _lastHR; + } else { + _actualHeartRate = + _lastHR + ((_hrDelta max -_rate) min _rate); + }; + _actualHeartRate = + _actualHeartRate + + _hrTargetAdjustment + + (10 * _painLevel) + + (_aceAnFatigue * 40); + + _actualHeartRate = (_actualHeartRate max MIN_HR) min MAX_HR; + private _hrMem = + _unit getVariable [QGVAR(hrMemory), _actualHeartRate]; + private _hrTau = 3.5; + + _hrTau = + _hrTau + * linearConversion [0, 1, _metabolicDemand, 1, 1.4, true]; + if (_shockClass != "NONE" || _painLevel > 0.4) then { + _hrTau = 1.8; + }; + _hrMem = + _hrMem + + ((_actualHeartRate - _hrMem) * (_deltaT / _hrTau)); + _unit setVariable [QGVAR(hrMemory), _hrMem]; + if (_unit getVariable [QEGVAR(circulation,heartRestart), false]) then { + _hrMem = 70; + _unit setVariable [QGVAR(hrMemory), _hrMem, true]; + + }; + _actualHeartRate = _hrMem; + TRACE_3( + "HR_FINAL", + _actualHeartRate, + _map, + GET_BLOOD_VOLUME_LITERS(_unit) + ); }; _unit setVariable [VAR_HEART_RATE, _actualHeartRate, _syncValue]; - _actualHeartRate diff --git a/addons/vitals/functions/fnc_handleOxygenFunction.sqf b/addons/vitals/functions/fnc_handleOxygenFunction.sqf index 2b7558749..172344672 100644 --- a/addons/vitals/functions/fnc_handleOxygenFunction.sqf +++ b/addons/vitals/functions/fnc_handleOxygenFunction.sqf @@ -11,126 +11,897 @@ * 4: Temperature * 5: Barometric Pressure * 6: Opioid Depression - * 7: ACE Fatigue - * 8: Time since last update - * 9: Sync value? + * 7: Time since last update + * 8: Sync value? * * ReturnValue: * Current O2 Saturation * * Example: - * [player, 80, 0.8, [40,90,0.96,24,7.4], 37, 760, 0, 0.1, 1, true] call kat_vitals_fnc_handleOxygenFunction; + * [player, 80, 0.8, [40,90,0.96,24,7.4], 37, 760, 0, 1, true] call kat_vitals_fnc_handleOxygenFunction; * * Public: No */ -params ["_unit", "_actualHeartRate", "_anerobicPressure", "_bloodGas", "_temperature", "_baroPressure", "_opioidDepression", "_aceAnFatigue", "_deltaT", "_syncValues"]; +params ["_unit", "_actualHeartRate", "_anerobicPressure", "_bloodGas", "_temperature", "_baroPressure", "_opioidDepression", "_aceAnFatigue", "_aceAnReserve", "_deltaT", "_syncValues"]; -#define MAXIMUM_RR 40 -#define HEART_RATE_CO2_MULTIPLIER 60 +#define MAXIMUM_RR 35 #define MINIMUM_VENTILATION 2000 #define PACO2_MAX_CHANGE 0.05 #define PAO2_MAX_CHANGE 0.1 #define DEFAULT_FIO2 0.21 #define MINIMUM_DEPTH 0.2 +#define BASE_MIN_VENT 3600 +#define DEAD_SPACE_FRAC 0.22 +#define RESP_Q 0.8 +#define CO_REF 0.10445973 +#define BVM_MODE_NONE 0 +#define BVM_MODE_ASSIST 1 +#define BVM_MODE_CONTROL 2 +#define BVM_MAX_RR 24 +#define BVM_MIN_RR 10 +#define BVM_MAX_VT 0.9 +#define BVM_MIN_VT 0.35 + +#define DYSSYNC_PENALTY_MAX 0.35 + +#define RF_NONE 0 +#define RF_IMPENDING 1 +#define RF_ESTABLISHED 2 +#define RF_COMPLETE 3 +private _tidalVolume = 0; private _respiratoryRate = 0; -private _respiratoryDepression = 0; +private _respiratoryRateMult = _unit getVariable [QEGVAR(pharma,respiratoryRate), 1]; private _respiratoryDepth = 0; private _demandVentilation = 0; -private _actualVentilation = 0; +private _actualVentilation = 1; +private _alveolarVent = 1; +private _alveolarDemand = 1; +private _baseTidalVolume = 1; +private _etco2 = 37; +private _pao2 = 90; +private _ph = GET_PH(_unit); +private _respFatigue = _unit getVariable [QGVAR(respFatigue), 0]; +private _do2Norm = _unit getVariable [QGVAR(oxygenDelivery), 1]; +private _targetPao2 = 90; +private _patternApplied = false; private _previousCyclePaco2 = (_bloodGas select 0); -private _previousCyclePao2 = (_bloodGas select 1); - -if (IN_CRDC_ARRST(_unit)) then { - // When in arrest, there should be no effecive breaths but still a minimum O2 demand. Zero O2 demand would mean a dead patient. Actual ventilation is 1 to prevent issues in the gas tension functions - _demandVentilation = MINIMUM_VENTILATION; - _respiratoryDepression = 1; - _respiratoryRate = [0, 20] select (_unit getVariable [QEGVAR(breathing,BVMInUse), false]); - _respiratoryDepth = [0, 10] select (_unit getVariable [QEGVAR(breathing,BVMInUse), false]); +private _previousCyclePao2 = (_bloodGas select 1); +private _rfBurden = _unit getVariable [QGVAR(rfBurden), 0]; +private _baseRespiratoryDepth = DEFAULT_RESPIRATORY_DEPTH; +private _bronchospasm = _unit getVariable [QEGVAR(breathing,bronchospasm), 1]; +private _airway = HAS_AIRWAY(_unit); +private _paralysis = (_unit getVariable [QEGVAR(breathing,paralysis), 0] > 0.1); +private _bvmMode = BVM_MODE_NONE; +private _pulmonaryShunt = _unit getVariable [QGVAR(pulmonaryShunt), 0]; +private _medLevel = _unit getVariable [QACEGVAR(medical,medicClass), getNumber (configOf _unit >> "attendant")]; +private _providerSkill = linearConversion [0, 2, _medLevel, 0.4, 0.8]; +private _bvmActive = _unit getVariable [QEGVAR(breathing,BVMInUse), false]; +private _isArrest = IN_CRDC_ARRST(_unit); +if (_do2Norm < 0.4) then { + _anerobicPressure = _anerobicPressure + ((0.5 - _do2Norm) * _deltaT); +}; +private _canBreathe = + _airway + && !_paralysis + && !_isArrest; +private _ventAttached = + _bvmActive + || (_unit getVariable [QEGVAR(breathing,attachedVent), false]); +if (_bvmActive) then { + if (_paralysis || IN_CRDC_ARRST(_unit) || !_airway) then { + _bvmMode = BVM_MODE_CONTROL; + } else { + _bvmMode = BVM_MODE_ASSIST; + }; +}; +if (_bvmMode == BVM_MODE_NONE) then { + _unit setVariable [QGVAR(bvmDyssync), 0, true]; +}; +private _bvmTargetRR = 20; +private _bvmTargetDepth = 10; +private _monitor = _unit getVariable [QEGVAR(breathing,etco2Monitor), []]; +if (_monitor isNotEqualTo []) then { + _bvmTargetRR = + linearConversion [25, 80, _previousCyclePaco2, BVM_MIN_RR, BVM_MAX_RR, true]; + + _bvmTargetDepth = + linearConversion [25, 80, _previousCyclePaco2, 8, 14, true]; +}; +private _bvmRRMem = _unit getVariable [QGVAR(bvmRRMem), _bvmTargetRR]; +_bvmRRMem = _bvmRRMem + ((_bvmTargetRR - _bvmRRMem) * (_deltaT / 4)); +_unit setVariable [QGVAR(bvmRRMem), _bvmRRMem]; +_bvmTargetRR = _bvmRRMem; +private _bvmVT = +( + GET_KAT_SURFACE_AREA(_unit) + * (_bvmTargetDepth / 10) +) min BVM_MAX_VT max BVM_MIN_VT; + +private _bvmVent = + (_bvmVT * _bvmTargetRR) * _bronchospasm; +private _co = [_unit] call FUNC(getCardiacOutput); +private _coNorm = linearConversion [0.7, 1.4, _co / CO_REF, 0.85, 1.35, true]; +private _co2Error = _previousCyclePaco2 - DEFAULT_PACO2; +private _co2Gain = + linearConversion [0, 5, abs _co2Error, 0.3, 1.0, true]; +private _co2Drive = + (linearConversion [30, 50, _previousCyclePaco2, -1200, 1200, true]) * _co2Gain; +private _anaerobicDrive = linearConversion [1.0, 1.6, _anerobicPressure, 0, 3000, true]; +private _fatigueDrive = linearConversion [2200, 440, _aceAnReserve, 0, 2400, true]; +_demandVentilation = + (BASE_MIN_VENT * _coNorm) + + _co2Drive + + _anaerobicDrive + + _fatigueDrive; +_demandVentilation = _demandVentilation max MINIMUM_VENTILATION; +if (_paralysis && !_isArrest) then { + _demandVentilation = BASE_MIN_VENT * _coNorm; +}; +if (_isArrest) then { + _demandVentilation = BASE_MIN_VENT * 0.35; _actualVentilation = 1; -} else { - // Ventilatory Demand comes from Heart Rate with increase demand from PaCO2 levels - _demandVentilation = ((((_actualHeartRate * HEART_RATE_CO2_MULTIPLIER) / _anerobicPressure) + ((_previousCyclePaco2 - DEFAULT_PACO2) * 200)) max MINIMUM_VENTILATION); +}; +if (!_airway || (_paralysis && !_ventAttached)) then { + _actualVentilation = 1; +}; +_alveolarDemand = _demandVentilation * (1 - DEAD_SPACE_FRAC); +private _icp = GET_ICP(_unit); +private _map = GET_MAP(_unit); +private _CPP = (_map - _icp) max 0; +private _respDrive = linearConversion [80, 20, _CPP, 1.0, 0.1, true]; +_respDrive = _respDrive * (1 - (_opioidDepression * 0.6)); +private _bvmDyssyncPrev = _unit getVariable [QGVAR(bvmDyssync), 0]; +_respDrive = _respDrive + ((_bvmDyssyncPrev min 0.25) * 0.4); +_respDrive = _respDrive max 0 min 1; +if (_do2Norm < 0.3) then { + _respDrive = _respDrive * 0.8; +}; +if (!_canBreathe) then { +_respDrive = 0; +_patternApplied = true; +}; +if (_unit getVariable [QEGVAR(breathing,attachedVent), false]) then { + _respiratoryRate = (60 / (_unit getVariable [QEGVAR(breathing,ventRate), 5])) max 1; + _respiratoryDepth = 12; + _baseTidalVolume = (((GET_KAT_SURFACE_AREA(_unit) * (_respiratoryDepth / 10)) min 0.8) max 0.2); + _tidalVolume = _baseTidalVolume; + _actualVentilation = (_tidalVolume * _respiratoryRate) * _bronchospasm; + _patternApplied = true; + private _acidRepo = _unit getVariable [QEGVAR(pharma,acidRepo), 1.0]; + private _ventRatio = + (_respiratoryRate * _respiratoryDepth) + / (14 * DEFAULT_RESPIRATORY_DEPTH); + private _sedation = + (_unit getVariable [QEGVAR(surgery,sedated), 0]) + max (_unit getVariable [QEGVAR(pharma,opioidDepression), 0]); + private _syncBonus = + linearConversion [0, 1, _sedation, 0.85, 1.15, true]; + private _repoRestore = + linearConversion [0.8, 1.8, _ventRatio, 0.015, 0.045, true] + * _syncBonus; + _repoRestore = + _repoRestore + * linearConversion [6.8, 7.25, _ph, 0.6, 1.0, true]; + _acidRepo = (_acidRepo + _repoRestore) min 1.0; + private _respFatigue = _unit getVariable [QGVAR(respFatigue), 0]; + _respFatigue = + (_respFatigue - (0.04 * _syncBonus)) max 0; + _unit setVariable [QGVAR(respFatigue), _respFatigue, true]; + _unit setVariable [QEGVAR(pharma,acidRepo), _acidRepo, true]; +}; +if (_bvmMode == BVM_MODE_CONTROL) then { + _respiratoryRate = _bvmTargetRR; + _respiratoryDepth = _bvmTargetDepth; + _actualVentilation = _bvmVent; + _patternApplied = true; + private _acidRepo = _unit getVariable [QEGVAR(pharma,acidRepo), 1.0]; + private _ventRatio = + (_respiratoryRate * _respiratoryDepth) + / (14 * DEFAULT_RESPIRATORY_DEPTH); + private _sedation = + (_unit getVariable [QEGVAR(surgery,sedated), 0]) + max (_unit getVariable [QEGVAR(pharma,opioidDepression), 0]); + private _syncBonus = + linearConversion [0, 1, _sedation, 0.85, 1.15, true]; + private _repoRestore = + linearConversion [0.8, 1.8, _ventRatio, 0.015, 0.045, true] + * _syncBonus; + _repoRestore = + _repoRestore + * linearConversion [6.8, 7.25, _ph, 0.6, 1.0, true]; + _acidRepo = (_acidRepo + _repoRestore) min 1.0; + private _respFatigue = _unit getVariable [QGVAR(respFatigue), 0]; + _respFatigue = + (_respFatigue - (0.04 * _syncBonus)) max 0; + _unit setVariable [QGVAR(respFatigue), _respFatigue, true]; + _unit setVariable [QEGVAR(pharma,acidRepo), _acidRepo, true]; +}; +if (!_patternApplied && (_icp >= 20) && (_icp < 32)) then { + private _t = CBA_missionTime; + private _frequency = 1/120; + private _amplitude = 5; + private _phase = 0; + private _value = (sin ((_t * _frequency * 360) + _phase)) * _amplitude; + private _env = linearConversion [-5, 5, _value, 0, 2, true]; + if (_env < 0.15) then { + _respiratoryRate = 0; + _respiratoryDepth = 0; + _tidalVolume = 0; + _actualVentilation = 1; + _patternApplied = true; + } else { + _respiratoryRate = 15 * _env; + _respiratoryDepth = 10 * _env; + _tidalVolume = GET_KAT_SURFACE_AREA(_unit) * (_respiratoryDepth / 10); + _actualVentilation = (_tidalVolume * _respiratoryRate) * _bronchospasm; + _patternApplied = true; + }; + _unit setVariable [QGVAR(breathingState), 1, true]; +}; - // Tidal Volume is modified by respiratory depth which can be supressed by opioids and pneumothroax - _respiratoryDepth = [((DEFAULT_RESPIRATORY_DEPTH) - (_opioidDepression / 1.5)), 10] select (_unit getVariable [QEGVAR(breathing,BVMInUse), false]); - private _tidalVolume = GET_KAT_SURFACE_AREA(_unit) * (_respiratoryDepth / 10); +if (!_patternApplied && (_icp >= 32) && (_icp < 38)) then { - // Respiratory Rate Calculation - _respiratoryRate = [((_demandVentilation / _tidalVolume)) min MAXIMUM_RR, 20] select (_unit getVariable [QEGVAR(breathing,BVMInUse), false]); + private _timer = _unit getVariable [QGVAR(ataxicTimer), 0]; + _timer = _timer - _deltaT; + + if (_timer <= 0) then { + // Generate new chaotic pattern + _unit setVariable [ + QGVAR(ataxicRate), + floor random [5, 15, 35], + true + ]; + _unit setVariable [ + QGVAR(ataxicDepth), + floor random [3, 10, 25], + true + ]; + + _timer = 3 + random 3; + }; + + _unit setVariable [QGVAR(ataxicTimer), _timer, true]; - // If respiratory rate is low due to PaCO2, it starts increasing faster to compensate - if (_previousCyclePaco2 > 50) then { _respiratoryRate = (_respiratoryRate + ((_previousCyclePaco2 - 50) * 0.2)) min MAXIMUM_RR}; + private _rate = _unit getVariable [QGVAR(ataxicRate), 10]; + private _depth = _unit getVariable [QGVAR(ataxicDepth), 8]; - _actualVentilation = _tidalVolume * _respiratoryRate; + if ((random 1) < 0.10) then { + _respiratoryRate = 0; + _respiratoryDepth = 0; + _tidalVolume = 0; + _actualVentilation = 1; + } else { + _respiratoryRate = _rate; + _respiratoryDepth = _depth; + _tidalVolume = + GET_KAT_SURFACE_AREA(_unit) * (_respiratoryDepth / 10); + + _actualVentilation = + (_tidalVolume * _respiratoryRate) * _bronchospasm; + }; + + _patternApplied = true; + _unit setVariable [QGVAR(breathingState), 2, true]; +}; +if (!_patternApplied && (_icp >= 38) && (_icp < 45)) then { + private _timer = _unit getVariable [QGVAR(biotTimer), 0]; + private _state = _unit getVariable [QGVAR(biotState), "breath"]; + _timer = _timer - _deltaT; + if (_timer <= 0) then { + if (_state == "breath") then { + _state = "apnea"; + _timer = 1 + random 3; + } else { + _state = "breath"; + _timer = 2 + random 3; + }; + _unit setVariable [QGVAR(biotState), _state, true]; + _unit setVariable [QGVAR(biotTimer), _timer, true]; + } else { + _unit setVariable [QGVAR(biotTimer), _timer, true]; + }; + if (_state == "apnea") then { + _respiratoryRate = 0; + _respiratoryDepth = 0; + _tidalVolume = 0; + _actualVentilation = 1; + } else { + _respiratoryRate = 4 + floor (random 4); + _respiratoryDepth = _baseRespiratoryDepth * (0.2 + random 1.2); + _tidalVolume = GET_KAT_SURFACE_AREA(_unit) * (_respiratoryDepth / 10); + _actualVentilation = (_tidalVolume * _respiratoryRate) * _bronchospasm; + playSound3D [QPATHTOF_SOUND(audio\gasp.ogg), _unit, false, getPosASL _unit, 6, 1, 8]; + }; + _patternApplied = true; + _unit setVariable [QGVAR(breathingState), 3, true]; +}; +if (!_patternApplied && (_icp >= 45)) then { + private _timer = _unit getVariable [QGVAR(agonalTimer), 0]; + _timer = _timer - _deltaT; + _unit setVariable [QGVAR(agonalTimer), _timer, true]; + if (_timer <= 0) then { + private _pause = 5 + random 15; + private _gaspDur = 1.5 + random 1.0; + _timer = _pause + _gaspDur; + _unit setVariable [QGVAR(agonalTimer), _timer, true]; + _respiratoryRate = 0; + _respiratoryDepth = 0; + _tidalVolume = 0; + _actualVentilation = 1; + _patternApplied = true; + } + else + { + if (_timer < 2.0) then { + _respiratoryRate = 1; + _respiratoryDepth = _baseRespiratoryDepth * (2.0 + random 1.0); + _tidalVolume = GET_KAT_SURFACE_AREA(_unit) * (_respiratoryDepth / 10); + _actualVentilation = (_tidalVolume * _respiratoryRate) * _bronchospasm; + playSound3D [QPATHTOF_SOUND(audio\gasp.ogg), _unit, false, getPosASL _unit, 6, 1, 8]; + } else { + _respiratoryRate = 0; + _respiratoryDepth = 0; + _tidalVolume = 0; + _actualVentilation = 1; + }; + _patternApplied = true; + _unit setVariable [QGVAR(breathingState), 4, true]; + }; +}; +if (!_patternApplied && (_ph <= 7.2) && (_respFatigue < 1.1)) then { + private _kussScale = + linearConversion [7.2, 6.8, _ph, 0, 1.0, true]; + _respiratoryRate = + linearConversion [0, 1, _kussScale, 15, 32, true]; + _respiratoryDepth = + _baseRespiratoryDepth + * linearConversion [0, 1, _kussScale, 1.5, 3.2, true]; + private _fatigueGain = + linearConversion [1.5, 3.2, (_respiratoryDepth / DEFAULT_RESPIRATORY_DEPTH), 0.002, 0.01, true] + * linearConversion [1.0, 1.2, _anerobicPressure, 0.6, 1.0, true]; + if ((_unit getVariable [QEGVAR(pharma,acidRepo), 1]) < 0.3) then { + _fatigueGain = _fatigueGain * 1.5; + }; + _unit setVariable [QGVAR(breathingState), 5, true]; + _respFatigue = (_respFatigue + _fatigueGain) min 1.2; + + if (_respFatigue > 0.4) then { + private _depthPenalty = + linearConversion [0.4, 1.0, _respFatigue, 1.0, 0.45, true]; + _respiratoryDepth = _respiratoryDepth * _depthPenalty; + }; + if (_respFatigue > 0.85) then { + + _respiratoryRate = + _respiratoryRate + * linearConversion [0.85, 1.1, _respFatigue, 1.0, 0.6, true]; + _unit setVariable [QGVAR(breathingState), 6, true]; + }; + _tidalVolume = + ( + GET_KAT_SURFACE_AREA(_unit) + * (_respiratoryDepth / 10) + ); + _actualVentilation = + (_tidalVolume * _respiratoryRate) + * _bronchospasm + max 1; + _respDrive = 1; + // 5 = Kussmaul + _patternApplied = true; + TRACE_4( + "BREATH_KUSSMAUL", + _anerobicPressure, + _respiratoryRate, + _respiratoryDepth, + _actualVentilation + ); +}; +private _respFailure = _unit getVariable [QGVAR(respFailure), RF_NONE]; +if (_respFatigue > 0.85 && (_unit getVariable [QEGVAR(pharma,acidRepo), 1]) < 0.25) then { + _respFailure = RF_IMPENDING; }; -private _paco2 = 40; +if (_respFatigue > 1.05 && (_unit getVariable [QEGVAR(pharma,acidRepo), 1]) < 0.15) then { + _respFailure = RF_ESTABLISHED; +}; -if (EGVAR(breathing,paco2Active)) then { - // The greater the imbalance between CO2 explusion and O2 intake, the higher PaCO2 gets - _paco2 = if ((_demandVentilation / _actualVentilation) == 1) then { _previousCyclePaco2 + (PACO2_MAX_CHANGE min (-PACO2_MAX_CHANGE max ((DEFAULT_PACO2 + ((_anerobicPressure max 1) - 1) * 150) - _previousCyclePaco2))) } else { [ _previousCyclePaco2 - (PACO2_MAX_CHANGE * _deltaT), _previousCyclePaco2 + (PACO2_MAX_CHANGE * _deltaT)] select ((_demandVentilation / _actualVentilation) > 1) }; +if (_respFatigue > 1.15 && (_unit getVariable [QEGVAR(pharma,acidRepo), 1]) < 0.05) then { + _respFailure = RF_COMPLETE; }; +private _hypoxiaStress = + linearConversion [90, 40, _previousCyclePao2, 0, 1.0, true]; -private _etco2 = 37; +private _hypercapniaStress = + linearConversion [45, 80, _previousCyclePaco2, 0, 1.2, true]; -if (IN_CRDC_ARRST(_unit)) then { - if (alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull])) then { - // If CPR is being provided, EtCO2 acts as a surrogate for remaining time patient can be in cardiac arrest before death - _etco2 = (15 + (_paco2 / 40) - (((_unit getVariable [QACEGVAR(medical_statemachine,cardiacArrestTimeLeft), 1]) max 1) / (ACEGVAR(medical_statemachine,cardiacArrestTime)) * 10)) max 1; +private _stageMultiplier = switch (_respFailure) do { + case RF_IMPENDING: { 0.3 }; + case RF_ESTABLISHED: { 1.0 }; + case RF_COMPLETE: { 3.0 }; + default { 0 }; +}; + +_rfBurden = _rfBurden + + ((_hypoxiaStress + _hypercapniaStress) + * _stageMultiplier + * _deltaT); +if ((_respFailure <= RF_IMPENDING) && (_previousCyclePao2 > 75) && (_previousCyclePaco2 < 50)) then { + _rfBurden = (_rfBurden - (0.15 * _deltaT)) max 0; +}; +_unit setVariable [QGVAR(respFailure), _respFailure, true]; +if (!_patternApplied && ((!_ventAttached && (_isArrest || !_airway || _paralysis)))) then { + if (_isArrest && (_bvmMode == BVM_MODE_CONTROL || _unit getVariable [QEGVAR(breathing,attachedVent), false])) then { + if (_isArrest) then { + if (_bvmMode == BVM_MODE_CONTROL) then { + _respiratoryRate = _bvmTargetRR min 10; + _respiratoryDepth = _bvmTargetDepth * 0.8; + _actualVentilation = _bvmVent; + }; + }; } else { - // With no CPR, there is no movement in the chest, and so there is no EtCO2 - _etco2 = 0; + _respiratoryRate = 0; + _respiratoryDepth = 0; + _actualVentilation = 1; }; -} else { - // Generated ETCO2 quadratic. Ensures ETCO2 moves with Respiratory Rate and is constantly below PaCO2 - _etco2 = (((-0.0416667 * (_respiratoryRate^2)) + (3.09167 * (_respiratoryRate))) * (_respiratoryDepth / 10 )) max 5; + _respDrive = 0; + _unit setVariable [QGVAR(bvmDyssync), 0, true]; + _patternApplied = true; }; +if (!_patternApplied) then { + TRACE_3( + "BREATH_CTRL_DEMAND", + _demandVentilation, + _respDrive, + _opioidDepression + ); + _unit setVariable [QGVAR(breathingState), 0, true]; + private _targetRR = + linearConversion [2400, 10500, _demandVentilation, 8, 35, true]; + + _targetRR = (_targetRR min MAXIMUM_RR) * _respiratoryRateMult; + _targetRR = _targetRR * (1 - (_opioidDepression * 0.6)); + + TRACE_2( + "BREATH_CTRL_TARGET_RR", + _targetRR, + _respiratoryRateMult + ); + + private _rrMem = _unit getVariable [QGVAR(rrMemory), _targetRR]; + _rrMem = _rrMem + ((_targetRR - _rrMem) * (_deltaT / 2.5)); + _unit setVariable [QGVAR(rrMemory), _rrMem]; + if (_respFailure == RF_COMPLETE && !_ventAttached) then { + _respDrive = 0.3; + }; + _respiratoryRate = _rrMem * _respDrive; + TRACE_3( + "BREATH_CTRL_RR", + _rrMem, + _respDrive, + _respiratoryRate + ); + + _respiratoryDepth = + ((DEFAULT_RESPIRATORY_DEPTH - (_opioidDepression / 1.5)) + max MINIMUM_DEPTH) + * _respDrive; + private _hypocapniaScale = linearConversion [25, 40, _previousCyclePaco2, 0.7, 1.0, true]; + _respiratoryDepth = _respiratoryDepth * _hypocapniaScale; + private _baseVT = + GET_KAT_SURFACE_AREA(_unit) + * (_respiratoryDepth / 10); + TRACE_2( + "BREATH_CTRL_VT_BASE", + _respiratoryDepth, + _baseVT + ); + if (_respiratoryRate > 22) then { + private _excess = _respiratoryRate - 22; + private _vtScale = linearConversion [0, 20, _excess, 1, 0.45, true]; + _baseVT = _baseVT * _vtScale; + TRACE_3( + "BREATH_CTRL_VT_SCALE", + _respiratoryRate, + _excess, + _vtScale + ); + }; + if (_respiratoryRate < 18 && _respiratoryDepth < (DEFAULT_RESPIRATORY_DEPTH * 1.2)) then { + _respFatigue = (_respFatigue - 0.01) max 0; + }; + if (_paralysis) then { + _respFatigue = (_respFatigue - 0.01) max 0; + }; + if (_do2Norm < 0.2) then { + _respFatigue = (_respFatigue + 0.02 * _deltaT) min 1.2; + }; + _unit setVariable [QGVAR(respFatigue), _respFatigue, true]; + _actualVentilation = + (_baseVT * _respiratoryRate) + * _bronchospasm + max 1; + if (_bvmMode == BVM_MODE_ASSIST) then { + private _patientVent = _actualVentilation; + + private _rrDelta = abs (_respiratoryRate - _bvmTargetRR); + private _driveFactor = _respDrive; + + private _dyssync = + linearConversion [0, 15, _rrDelta, 0, DYSSYNC_PENALTY_MAX, true] + * _driveFactor; + private _sedation = + (_unit getVariable [QEGVAR(surgery,sedated), 0]) + max (_unit getVariable [QEGVAR(pharma,opioidDepression), 0]); -private _externalPh = 0; -private _pH = 7.4; + _dyssync = _dyssync * (1 - (_sedation * 0.8)); + _dyssync = _dyssync * (1 - (_providerSkill * 0.6)); + private _bvmVentEffective = _bvmVent * (1 - _dyssync); + if (_dyssync > 0.25 && (random 1 < 0.25)) then { + playSound3D [ + QPATHTOF_SOUND(audio\gasp.ogg), + _unit, + false, + getPosASL _unit, + 5, + 1 + random 0.2, + 6 + ]; + }; + switch (_respFailure) do { + case RF_IMPENDING: { + _respiratoryDepth = _respiratoryDepth * 0.75; + _respiratoryRate = _respiratoryRate * 1.1; + _respDrive = 1; + _unit setVariable [QGVAR(breathingState), 7, true]; + }; + + case RF_ESTABLISHED: { + _respiratoryDepth = _respiratoryDepth * 0.4; + _respiratoryRate = _respiratoryRate * 0.7; + _respDrive = 1; + _unit setVariable [QGVAR(breathingState), 8, true]; + }; + + case RF_COMPLETE: { + if (!(_unit getVariable [QEGVAR(breathing,attachedVent), false]) + && (_bvmMode == BVM_MODE_NONE)) then { + + if (random 1 < 0.85) then { + _respiratoryRate = 0; + _respiratoryDepth = 0; + _tidalVolume = 0; + _actualVentilation = 1; + } else { + _respiratoryRate = 1; + _respiratoryDepth = DEFAULT_RESPIRATORY_DEPTH * 2.5; + _tidalVolume = + GET_KAT_SURFACE_AREA(_unit) + * (_respiratoryDepth / 10); + _actualVentilation = + (_tidalVolume * _respiratoryRate) * _bronchospasm; + playSound3D [ + QPATHTOF_SOUND(audio\gasp.ogg), + _unit, + false, + getPosASL _unit, + 6, + 1, + 8 + ]; + }; + }; + _respDrive = 1; + _unit setVariable [QGVAR(breathingState), 9, true]; + }; + }; + _actualVentilation = _patientVent max _bvmVentEffective; + _unit setVariable [QGVAR(bvmDyssync), _dyssync, true]; + }; + TRACE_3( + "BREATH_CTRL_VENT", + _baseVT, + _respiratoryRate, + _actualVentilation + ); + }; + +_alveolarVent = (_actualVentilation * (1 - DEAD_SPACE_FRAC)) max 1; +private _paco2 = _previousCyclePaco2; + +if (EGVAR(breathing,paco2Active)) then { + TRACE_5("PACO2:ENTRY", + _previousCyclePaco2, + _isArrest, + _ventAttached, + _airway, + _paralysis +); -if (EGVAR(pharma,kidneyAction)) then { - // Extenal pH impacts from saline is included - _externalPh = _unit getVariable [QEGVAR(pharma,externalPh), 0]; + if ((_isArrest && !_ventAttached) + || (!_airway) + || (_paralysis && !_ventAttached) + )then { + private _co2Rise = + linearConversion [0, 1, _anerobicPressure, 0.4, 1.2, true]; + private _tempScale = + linearConversion [35, 40, _temperature, 0.9, 1.15, true]; + _co2Rise = _co2Rise * _tempScale; + private _cprPerfusion = 0; + if (_isArrest && EGVAR(breathing,SpO2_perfusion)) then { + _cprPerfusion = alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull]); + }; - // Adjust dissociation constant based on temperature - private _phConstant = ((-0.00006653 * (_temperature ^ 2)) - (0.03268 * _temperature) + 7.4); + private _cprScale = [1, 0.75] select _cprPerfusion; + _co2Rise = _co2Rise * _cprScale; + _paco2 = (_previousCyclePaco2 + (_co2Rise * _deltaT)) min 120; + TRACE_5("PACO2:RISE_ONLY", + _co2Rise, + _tempScale, + _cprScale, + _deltaT, + _paco2 +); + } else { + TRACE_5("PACO2:VENT_PATH", + _alveolarVent, + _alveolarDemand, + _bvmActive, + _bvmMode, + _previousCyclePaco2 +); + private _ventRatio = _alveolarVent / (_alveolarDemand max 1); + private _unconscious = !alive _unit || (_unit getVariable ["ACE_isUnconscious", false]); + private _opioid = _unit getVariable [QEGVAR(pharma,opioidDepression), 0]; + private _bvmDyssync = _unit getVariable [QGVAR(bvmDyssync), 0]; + if (!_bvmActive) then { + _bvmDyssync = 0; + }; + private _cnsSuppression = (_unit getVariable [QEGVAR(surgery,sedated), 0]) max (_opioid); + private _basal = 1; + private _basalCO2Prod = 1; - // pH is from the Henderson-Hasselbalch equation - _pH = (_phConstant + log(24 / ((0.03 * _paco2)))) - ((_externalPh max 1) / 2000) - ((_aceAnFatigue / 2) / 3); + private _cnsScale = + linearConversion [0, 1, _cnsSuppression, 1, 0.65, true]; + if (_unconscious) then { + _basalCO2Prod = 0.8; + }; + _basalCO2Prod = _basal * _cnsScale; + private _reserveCO2 = + linearConversion [2200, 440, _aceAnReserve, 0, 0.8, true]; + private _co2Prod = + _basalCO2Prod + + ((_anerobicPressure - 1) max 0) + + _reserveCO2; + _co2Prod = _co2Prod * (1 + (_bvmDyssync * 0.3)); + TRACE_5("PACO2:PRODUCTION", + _cnsSuppression, + _cnsScale, + _basalCO2Prod, + _reserveCO2, + _co2Prod + ); + private _ventLP = _unit getVariable [QGVAR(paco2VentLP), _alveolarVent]; + _ventLP = _ventLP + ((_alveolarVent - _ventLP) * 0.12); + _unit setVariable [QGVAR(paco2VentLP), _ventLP, true]; + private _targetPaco2 = + DEFAULT_PACO2 + * (_co2Prod) + / ((_ventLP / 4200) max 0.3); + _targetPaco2 = _targetPaco2 max 15 min 120; + if ((_unit getVariable [QGVAR(respFailure), RF_NONE]) >= RF_ESTABLISHED) then { + _targetPaco2 = _targetPaco2 * 1.25; + }; + TRACE_4("PACO2:TARGET", + DEFAULT_PACO2, + _co2Prod, + _alveolarVent, + _targetPaco2 +); + private _deltaPaco2 = (_targetPaco2 - _previousCyclePaco2); + _deltaPaco2 = _deltaPaco2 max (-PACO2_MAX_CHANGE * _previousCyclePaco2) + min ( PACO2_MAX_CHANGE * _previousCyclePaco2); + + if (_bvmDyssync > 0) then { + _deltaPaco2 = _deltaPaco2 + (_bvmDyssync * 2.5); + }; + if (_isArrest && _bvmMode != BVM_MODE_NONE) then { + _deltaPaco2 = _deltaPaco2 min 0; + }; + TRACE_5("PACO2:DELTA", + _previousCyclePaco2, + _deltaPaco2, + _bvmDyssync, + _isArrest, + _bvmMode +); + _paco2 = _previousCyclePaco2 + _deltaPaco2; + }; }; -// Fractional Oxygen when breathing normal air is 0.21, 1 when breathing 100% Oxygen, and 0 when no air is being brought into the lungs private _fio2 = switch (true) do { - case ((_unit getVariable [QEGVAR(airway,occluded), false]) || (_unit getVariable [QEGVAR(airway,obstruction), false])): { - [0, DEFAULT_FIO2] select ((_unit getVariable [QEGVAR(airway,recovery), false]) || (_unit getVariable [QEGVAR(airway,overstretch), false])) - }; - case ((_respiratoryRate == 0) && (EGVAR(breathing,SpO2_perfusion))): { 0 }; - case ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), false]) || (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false])): { 0 }; - case (_unit getVariable [QEGVAR(breathing,oxygenMaskActive), false]): { 0.95 }; + case (!_airway): { 0 }; + case (_respiratoryRate == 0): { 0 }; case (_unit getVariable [QEGVAR(breathing,oxygenTankConnected), false]): { 1 }; + case (_unit getVariable [QEGVAR(breathing,attachedVent), false]): { 1 }; + case (_unit getVariable [QEGVAR(breathing,oxygenMaskActive), false]): { 0.95 }; + case ((_unit getVariable [QEGVAR(breathing,nasalCannula), false]) && ((IN_MED_FACILITY(_unit)) || (IN_MED_VEHICLE(_unit)))): { 0.95 }; default { DEFAULT_FIO2 }; }; -// Alveolar Gas equation. PALVO2 is largely impacted by Barometric Pressure and FiO2 -private _pALVo2 = ((_fio2 * (_baroPressure - 47)) - (_paco2 / _anerobicPressure)) max 1; +private _pALVo2 = +( + (_fio2 * (_baroPressure - 47)) + - (_paco2 / RESP_Q) +) max 1; +TRACE_4("Fio2", + _pALVo2, + _fio2, + _baroPressure, + _paco2 +); +private _targetPao2 = _pALVo2 * (1 - _pulmonaryShunt); +if (IN_CRDC_ARRST(_unit)) then { + private _cprActive = + alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull]); + private _perfusion = + if (_cprActive) then { + linearConversion [0.6, 1.2, _coNorm, 0.75, 0.95, true] + } else { + 0.75 + }; + _pao2 = + (_pALVo2 * _perfusion) + max 10; +} else { + private _ventRatio = _alveolarVent / (_alveolarDemand max 1); + private _ventFrac = + if (_ventRatio <= 1.0) then { + linearConversion [0.3, 1.0, _ventRatio, 0.2, 1.0, true] + } else { + linearConversion [1.0, 1.6, _ventRatio, 1.0, 0.9, true] + }; + _pao2 = (_pALVo2 * _ventFrac) max 1; + TRACE_5("pao2", + _pALVo2, + _ventFrac, + _pao2, + _alveolarVent, + _alveolarDemand + ); + }; +private _etco2 = 0; + +if (IN_CRDC_ARRST(_unit)) then { + private _cprActive = alive (_unit getVariable [QACEGVAR(medical,CPR_provider), objNull]); + if (_cprActive) then { + private _cprPerfusion = + linearConversion [0.6, 1.2, _coNorm, 0.7, 1.1, true]; + _etco2 = + _paco2 + * _cprPerfusion + * 0.35; + _etco2 = _etco2 max 8 min 28; + } else { + _etco2 = 0; + }; -// PaO2 comes from ventilation shortage multipled by RBC volume -private _pao2 = (DEFAULT_PAO2 - ((DEFAULT_ECB / ((GET_BODY_FLUID(_unit) select 0) max 500)) * ((_demandVentilation - _actualVentilation) / 120))); +} else { + private _perfEff = + linearConversion [0.7, 1.4, _co / CO_REF, 0.8, 1.15, true]; + private _bvmDyssync = _unit getVariable [QGVAR(bvmDyssync), 0]; + private _syncEff = + linearConversion [0, DYSSYNC_PENALTY_MAX, _bvmDyssync, 1.0, 0.75, true]; + _etco2 = _paco2 * 0.875 * _perfEff * _syncEff; + TRACE_5("etco2", + _etco2,_co,_paco2,_perfEff,_syncEff); + _etco2 = _etco2 max 5 min 60; + if ((_unit getVariable [QEGVAR(circulation,heartRestart), false])) then { + _etco2 = (_etco2 * 1.35) min 55; + }; + TRACE_1("etco21", + _etco2); + private _bvmDyssync = _unit getVariable [QGVAR(bvmDyssync), 0]; + if (_bvmDyssync > 0) then { + private _oscAmp = + linearConversion [0, DYSSYNC_PENALTY_MAX, _bvmDyssync, 0, 3.5, true]; + + private _osc = + (sin (CBA_missionTime * (2.5 + random 0.5))) * _oscAmp; -// PaO2 is shifted by the difference between PALVO2 and PaO2, capped by PALVO2 -_pao2 = (((linearConversion[-50, 50, (_pALVo2 - _pao2), -20, 20, false]) + _pao2) min _pALVo2) max 0; + _etco2 = (_etco2 + _osc) max 0; + TRACE_1("etco22", + _etco2); + }; + TRACE_1("etco23", + _etco2); +}; -private _arrestPerfusion = [1, (1 * EGVAR(breathing,SpO2_PerfusionMultiplier))] select ((IN_CRDC_ARRST(_unit)) && (EGVAR(breathing,SpO2_perfusion))); -// PaO2 moves in controlled steps to prevent hard movements when Ventilation Demand spikes -_pao2 = if (_previousCyclePao2 != _pao2) then { ([ (_previousCyclePao2 - ((PAO2_MAX_CHANGE * EGVAR(breathing,SpO2_MultiplyNegative) * _arrestPerfusion) * _deltaT)) , (_previousCyclePao2 + ((PAO2_MAX_CHANGE * EGVAR(breathing,SpO2_MultiplyPositive)) * _deltaT))] select ((_previousCyclePao2 - _pao2) < 0)) } else { _pao2 }; +TRACE_3("pao21", + _pao2,_previousCyclePao2,_arrestPerfusion); +if (_previousCyclePao2 < 55 && _alveolarVent > 3000) then { + _pulmonaryShunt = (_pulmonaryShunt + (0.00002 * _deltaT)); +}; +if ((_respiratoryDepth < (DEFAULT_RESPIRATORY_DEPTH * 0.4)) && (_respiratoryRate < 10)) then { + _pulmonaryShunt = (_pulmonaryShunt + (0.00002 * _deltaT)); +}; +if (IN_CRDC_ARRST(_unit)) then { + _pulmonaryShunt = (_pulmonaryShunt + (0.00006 * _deltaT)); +}; +if (!IN_CRDC_ARRST(_unit) && _alveolarVent > 4000) then { + _pulmonaryShunt = ((_pulmonaryShunt - (0.0005 * _deltaT)) max 0); +}; +_pulmonaryShunt = _pulmonaryShunt min 0.6; +_pao2 = _pao2 * (1 - _pulmonaryShunt); +TRACE_2("pao22", + _pao2,_pulmonaryShunt); +_pao2 = if (_previousCyclePao2 != _pao2) then { ([ (_previousCyclePao2 - (((PAO2_MAX_CHANGE/10) * EGVAR(breathing,SpO2_MultiplyNegative)) * _deltaT)) , (_previousCyclePao2 + ((PAO2_MAX_CHANGE * EGVAR(breathing,SpO2_MultiplyPositive)) * _deltaT))] select ((_previousCyclePao2 - _pao2) < 0)) } else { _pao2 }; +private _baseConst = + 7.4 - log(24 / (0.03 * 39.9)); -// Oxy-Hemo Dissociation Curve, driven by PaO2 with shaping done by pH. -private _o2Sat = (((_pao2 max 1)^2.7 / ((25 - (((_pH / DEFAULT_PH) - 1) * 150))^2.7 + _pao2^2.7))) min 0.999; +private _phConst = + _baseConst - 0.015 * (_temperature - 37); + +private _externalPh = _unit getVariable [QEGVAR(pharma,externalPh), 0]; -_unit setVariable [VAR_BREATHING_RATE, (_respiratoryRate max 0), _syncValues]; +private _pH = +(_phConst + log(24 / (0.03 * _paco2))) +- (_externalPh / 420) +- ((_aceAnFatigue / 2) / 3); +TRACE_5("PH", + _pH, + _externalPh, + _paco2, + _aceAnFatigue, + _temperature +); +private _p50 = ((25 - (((_pH / DEFAULT_PH) - 1) * 150)) max 15) min 40; +private _o2Sat = ((_pao2^2.7) / (_p50^2.7 + _pao2^2.7)) min 0.999; +private _bvmDyssync = _unit getVariable [QGVAR(bvmDyssync), 0]; +if (!_bvmActive) then { + _bvmDyssync = 0; +}; +if (_bvmDyssync > 0) then { + private _oscAmp = linearConversion [0, DYSSYNC_PENALTY_MAX, _bvmDyssync, 0, 0.04, true]; + private _osc = (sin (CBA_missionTime * 3)) * _oscAmp; + _o2Sat = ((_o2Sat + _osc) max 0) min 0.999; +}; +TRACE_4("BREATH_REST", + _respiratoryRate, + _demandVentilation, + _paco2, + _pao2 +); +private _hemoglobin = linearConversion [0, 2700, GET_BODY_FLUID_ECB(_unit), 0.2, 1.0, true]; +private _cao2 = 1.34 * _hemoglobin * (_o2Sat * 100); +private _do2 = _co * _cao2; +private _do2Norm = linearConversion [3.5, 10, _do2, 0, 1, true]; +if ((_actualVentilation / _demandVentilation <= 0.35) && !(_unit getVariable ["ACE_isUnconscious", false])) then { + private _timer = _unit getVariable [QGVAR(airwayTimer), -1]; + if (_timer == -1) then { + _timer = 45 + random 45; + _unit setVariable [QGVAR(airwayTimer), _timer, true]; + }; + private _elapsed = _unit getVariable [QGVAR(airwayElapsed), 0]; + private _timeMult = linearConversion [0, 0.35, (_actualVentilation / _demandVentilation), 1.5, 0.75, true]; + _elapsed = _elapsed + (_deltaT * _timeMult); + if (_elapsed >= _timer) then { + [_unit, true] call ACEFUNC(medical,setUnconscious); + _unit setVariable [QGVAR(airwayTimer), -1, true]; + _unit setVariable [QGVAR(airwayElapsed), 0, true]; + } else { + _unit setVariable [QGVAR(airwayElapsed), _elapsed, true]; + }; +} else { + _unit setVariable [QGVAR(airwayTimer), -1, true]; + _unit setVariable [QGVAR(airwayElapsed), 0, true]; +}; +_unit setVariable [QGVAR(oxygenDelivery), _do2Norm, true]; +_unit setVariable [QGVAR(pulmonaryShunt), _pulmonaryShunt, true]; +_unit setVariable [QEGVAR(breathing,breathRate), _respiratoryRate, _syncValues]; +_unit setVariable [VAR_RESPIRATORY_DEPTH, _respiratoryDepth, _syncValues]; _unit setVariable [VAR_BLOOD_GAS, [_paco2, _pao2, _o2Sat, 24, _pH, _etco2], _syncValues]; -_unit setVariable [QGVAR(respiratoryDepth), ((_respiratoryDepth) max 0), _syncValues]; + _o2Sat * 100 diff --git a/addons/vitals/functions/fnc_handlePoisoning.sqf b/addons/vitals/functions/fnc_handlePoisoning.sqf deleted file mode 100644 index 868722913..000000000 --- a/addons/vitals/functions/fnc_handlePoisoning.sqf +++ /dev/null @@ -1,66 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: MiszczuZPolski - * Update poisoning - - * Arguments: - * 0: The Unit - * 1: Poison Adjustments - * 2: Time since last update - * 3: Sync value? - * - * ReturnValue: - * None - * - * Example: - * [player, 1, 1, false] call kat_vitals_handlePoisoning; - * - * Public: No - */ - -params ["_unit", "_poisonAdjustment", "_deltaT", "_syncValue"]; - -private _currentCS = _unit getVariable [QEGVAR(chemical,CSGas), 0]; - -_unit setVariable [QEGVAR(chemical,CSGas), (_currentCS - (_poisonAdjustment * _deltaT)) max 0, _syncValue]; - -private _inZone = false; -private _distance = 0; - -{ - _y params ["_gasLogic", "_radius", "_gasLevel", "_condition", "_conditionArgs", "_isSealable"]; - TRACE_2("gasVitalsPFH loop",_x,_y); - - _distance = _unit distance _gasLogic; - - if (_distance < _radius) then { - _inZone = true; - }; -} forEach GVAR(gasSources); - -if !(_inZone) then { - _unit setVariable [QGVAR(areaIntensity), 0, true]; -}; - -private _infectionArray = _unit getVariable [QEGVAR(chemical,infectionArray), []]; - -if (count _infectionArray == 0) then { - private _currentInfection = _unit getVariable [QEGVAR(chemical,infectionTime), missionNamespace getVariable [QEGVAR(chemical,infectionTime), 60]]; - private _updateTime = _currentInfection + (1 * _deltaT); - _updateTime = _updateTime min (missionNamespace getVariable [QEGVAR(chemical,infectionTime), 60]); - - _unit setVariable [QEGVAR(chemical,infectionTime), _updateTime, true]; -} else { - { - _x params ["_gasLogic", "_radius", "_gasLevel", "_condition", "_conditionArgs", "_isSealable"]; - - // Get the distance of the unit from the center of the sphere (_gasLogic) - private _distance = _unit distance _gasLogic; - - if (_distance > _radius) then { - _infectionArray deleteAt _forEachIndex; - }; - } forEach _infectionArray; - - _unit setVariable [QEGVAR(chemical,infectionArray), _infectionArray, true]; -}; diff --git a/addons/vitals/functions/fnc_handleSimpleVitals.sqf b/addons/vitals/functions/fnc_handleSimpleVitals.sqf index 8670cae7a..9069760ab 100644 --- a/addons/vitals/functions/fnc_handleSimpleVitals.sqf +++ b/addons/vitals/functions/fnc_handleSimpleVitals.sqf @@ -33,7 +33,7 @@ if (_syncValues) then { //Get Blood Loss and Blood Volume from previous cycle private _bloodVolume = GET_SIMPLE_BLOOD_VOLUME(_unit); -private _woundBloodLoss = GET_WOUND_BLEEDING(_unit); +private _woundBloodLoss = GET_BLOOD_LOSS(_unit); private _bloodVolume = _bloodVolume - (_woundBloodLoss / 100); _unit setVariable [VAR_BLOOD_VOL, _bloodVolume, _syncValues]; @@ -71,7 +71,6 @@ if (_adjustments isNotEqualTo []) then { private _heartRate = [_unit, _hrTargetAdjustment, _deltaT, _syncValues] call ACEFUNC(medical_vitals,updateHeartRate); //Rename [_unit, _painSupressAdjustment, _deltaT, _syncValues] call ACEFUNC(medical_vitals,updatePainSuppress); //Leave alone -[_unit, POISON_DECREASE, _deltaT, _syncValues] call FUNC(handlePoisoning); private _bloodPressure = [80,120]; _unit setVariable [VAR_BLOOD_PRESS, _bloodPressure, _syncValues]; diff --git a/addons/vitals/functions/fnc_handleUnitVitals.sqf b/addons/vitals/functions/fnc_handleUnitVitals.sqf index 41170a65e..e5673dce4 100644 --- a/addons/vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/vitals/functions/fnc_handleUnitVitals.sqf @@ -1,3 +1,4 @@ + #include "..\script_component.hpp" /* * Author: Glowbal, Mazinski @@ -37,19 +38,26 @@ if (_syncValues) then { private _bloodVolume = ([_unit, _deltaT, _syncValues] call EFUNC(pharma,getBloodVolumeChange)); _unit setVariable [VAR_BLOOD_VOL, _bloodVolume, _syncValues]; -private _temperature = 37; +// Enviromental Impact (Altitude, Temperature, Pressure) private _baroPressure = 760; +private _temperature = DEFAULT_TEMPERATURE; +private _altitude = (getPosASL _unit) select 2; + +if (EGVAR(hypothermia,baroPressureEnable)) then { + if (EGVAR(hypothermia,useACEpressure)) then { + private _hPa = _altitude call ACEFUNC(weather,calculateBarometricPressure); + _baroPressure = _hPa * 0.750062; + } else { + _baroPressure = 760 * exp((-(_altitude)) / 8400); + }; +}; if (EGVAR(hypothermia,hypothermiaActive)) then { - // Enviromental Impact (Altitude, Temperature, Pressure) - private _altitude = (getPosASL _unit) select 2; private _altitudeTempImpact = switch (true) do { case (_altitude >= 10): { abs(_altitude/153) * -1 }; //For every 1000 meters of elevation gain, temperature decreases by ~6.5 degrees celsius case (_altitude <= -1): { -35 max((abs(_altitude/50) * -1) - 17) }; //Average water temperature is 20 degrees celsius. Decreases to 2 degrees celsius at 1000 meters default { 0 }; }; - - _baroPressure = 760 * exp((-(_altitude)) / 8400); _temperature = [_unit, _altitudeTempImpact, _bloodVolume, _deltaT, _syncValues] call FUNC(handleTemperatureFunction); }; @@ -91,25 +99,100 @@ private _peripheralResistanceAdjustment = 0; private _alphaFactorAdjustment = 0; private _opioidAdjustment = 0; private _opioidEffectAdjustment = 0; +private _opioidDepressionAdjustment = 0; +private _respiratoryRateAdjustment = 1; +private _contractilityAdjustment = 1; +private _nauseaMultAdjustment = 1; +private _sedationAdjustment = 0; +private _paralysisAdjustment = 0; +private _effectRatio = 0; + private _adjustments = _unit getVariable [VAR_MEDICATIONS,[]]; +private _ph = GET_PH(_unit); +private _metabolismMult = linearConversion [7.4, 7.0, _ph, 1.0, 0.4, true]; +private _onsetMult = linearConversion [7.4, 7.0, _ph, 1.0, 1.6, true]; + +_effectiveDose = 1; +if (_ph < 7.1) then { + _effectiveDose = linearConversion [7.1, 6.8, _ph, 1.0, 1.4, true];; +}; +private _ph = GET_PH(_unit); +private _ca = GET_CA(_unit); +private _phDilationMult = linearConversion [ + 7.4, // normal + 7.0, // severe acidosis + _ph, + 1.0, // baseline dilation + 1.5, // exaggerated dilation + true +]; +private _phVasoMult = linearConversion [ + 7.4, // normal + 7.0, // severe acidosis + _ph, + 1.0, // full response + 0.4, // profound resistance + true +]; +private _calciumVasoMult = linearConversion [ + 2.0, // hypocalcemia + 3.0, // hypercalcemia + _ca, + 0.6, // poor response + 1.3, // exaggerated response + true +]; +private _vasoEffectMult = _phVasoMult * _calciumVasoMult; +private _vasodilatorMult = _phDilationMult * (1 / _calciumVasoMult); +TRACE_1("HUV",_adjustments); +_vasoEffectMult = (_vasoEffectMult max 0.25) min 1.5; +_vasodilatorMult = (_vasodilatorMult max 0.6) min 1.8; if (_adjustments isNotEqualTo []) then { private _deleted = false; + { - _x params ["_medication", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", "_hrAdjust", "_painAdjust", "_flowAdjust", "_dose", "_alphaFactor", "_opioidRelief", "_opioidEffect"]; + _x params [ + "_medication", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", + "_hrAdjust", "_painAdjust", "_flowAdjust", "_dose", "_alphaFactor", + "_opioidRelief", "_opioidEffect", "_opioidDepression", + "_respiratoryRate", "_contractility", "_nauseaMult", + "_sedation", "_paralysis", "_linear" + ]; + + private _scaledMaxTime = _maxTimeInSystem / _metabolismMult; + private _scaledTimeToMax = _timeTillMaxEffect * _onsetMult; private _timeInSystem = CBA_missionTime - _timeAdded; - if (_timeInSystem >= _maxTimeInSystem) then { + + if (_timeInSystem >= _scaledMaxTime) then { _deleted = true; _adjustments set [_forEachIndex, objNull]; } else { - private _effectRatio = (((_timeInSystem / _timeTillMaxEffect) ^ 2) min 1) * (_maxTimeInSystem - _timeInSystem) / _maxTimeInSystem; - if (_hrAdjust != 0) then { _hrTargetAdjustment = _hrTargetAdjustment + _hrAdjust * _effectRatio; }; - if (_painAdjust != 0) then { _painSupressAdjustment = _painSupressAdjustment + _painAdjust * _effectRatio; }; - if (_flowAdjust != 0) then { _peripheralResistanceAdjustment = _peripheralResistanceAdjustment + _flowAdjust * _effectRatio; }; - if (_alphaFactor != 0) then { _alphaFactorAdjustment = _alphaFactorAdjustment + _alphaFactor * _effectRatio; }; - if (_opioidRelief != 0) then {_opioidAdjustment = _opioidAdjustment + _opioidRelief * _effectRatio; }; - if (_opioidEffect != 0) then {_opioidEffectAdjustment = _opioidEffectAdjustment + _opioidEffect * _effectRatio; }; + + if (_linear == "true") then { + _effectRatio = 1; + } else { + _effectRatio = + (((_timeInSystem / _scaledTimeToMax) ^ 2) min 1) + * ((_scaledMaxTime - _timeInSystem) / _scaledMaxTime); + }; + + if (_hrAdjust != 0) then { _hrTargetAdjustment = _hrTargetAdjustment + _hrAdjust * _effectRatio * _effectiveDose; }; + if (_painAdjust != 0) then { _painSupressAdjustment = _painSupressAdjustment + _painAdjust * _effectRatio * _effectiveDose; }; + if (_flowAdjust >= 0) then { _peripheralResistanceAdjustment = _peripheralResistanceAdjustment + _flowAdjust * _effectRatio * _effectiveDose * _vasoEffectMult; }; + if (_alphaFactor >= 0) then { _alphaFactorAdjustment = _alphaFactorAdjustment + _alphaFactor * _effectRatio * _effectiveDose * _vasoEffectMult; }; + if (_flowAdjust < 0) then { _peripheralResistanceAdjustment = _peripheralResistanceAdjustment + _flowAdjust * _effectRatio * _effectiveDose * _vasodilatorMult; }; + if (_alphaFactor < 0) then { _alphaFactorAdjustment = _alphaFactorAdjustment + _alphaFactor * _effectRatio * _effectiveDose * _vasodilatorMult; }; + if (_opioidRelief != 0) then { _opioidAdjustment = _opioidAdjustment + _opioidRelief * _effectRatio * _effectiveDose; }; + if (_opioidEffect != 0) then { _opioidEffectAdjustment = _opioidEffectAdjustment + _opioidEffect * _effectRatio * _effectiveDose; }; + if (_opioidDepression != 0) then { _opioidDepressionAdjustment = _opioidDepressionAdjustment + _opioidDepression * _effectRatio * _effectiveDose; }; + if (_respiratoryRate != 0) then { _respiratoryRateAdjustment = _respiratoryRateAdjustment + _respiratoryRate * _effectRatio * _effectiveDose; }; + if (_contractility != 0) then { _contractilityAdjustment = _contractilityAdjustment + _contractility * _effectRatio * _effectiveDose; }; + if (_nauseaMult != 0) then { _nauseaMultAdjustment = (_nauseaMultAdjustment + (_nauseaMult * _effectRatio)) max 0.1; }; + if (_sedation == "true") then { _sedationAdjustment = (_sedationAdjustment + (1 * _effectRatio)) min 1; }; + if (_paralysis == "true") then { _paralysisAdjustment = (_paralysisAdjustment + (1 * _effectRatio)) min 1; }; }; + } forEach _adjustments; if (_deleted) then { @@ -118,39 +201,52 @@ if (_adjustments isNotEqualTo []) then { }; }; + [_unit, _painSupressAdjustment, _deltaT, _syncValues] call ACEFUNC(medical_vitals,updatePainSuppress); //Leave alone [_unit, _peripheralResistanceAdjustment, _deltaT, _syncValues] call ACEFUNC(medical_vitals,updatePeripheralResistance); [_unit, _opioidAdjustment, _deltaT, _syncValues] call FUNC(updateOpioidRelief); [_unit, _opioidEffectAdjustment, _deltaT, _syncValues] call FUNC(updateOpioidEffect); -[_unit, POISON_DECREASE, _deltaT, _syncValues] call FUNC(handlePoisoning); +[_unit, _opioidDepressionAdjustment, _deltaT, _syncValues] call FUNC(updateOpioidDepression); +[_unit, _respiratoryRateAdjustment, _deltaT, _syncValues] call FUNC(updateRespiratoryRate); +[_unit, _contractilityAdjustment, _deltaT, _syncValues] call FUNC(updateContractility); +[_unit, _nauseaMultAdjustment, _deltaT, _syncValues] call FUNC(updateNauseaMult); +[_unit, _sedationAdjustment, _deltaT, _syncValues] call FUNC(updateSedation); +[_unit, _paralysisAdjustment, _deltaT, _syncValues] call FUNC(updateParalysis); private _aceAnFatigue = 0; +private _aceAnReserve = 0; if (_unit getVariable [QGVAR(fatigueEnabled), false]) then { _aceAnFatigue = [_unit] call FUNC(returnFatigue); }; -private _heartRate = [_unit, _hrTargetAdjustment, 0, _bloodVolume, _aceAnFatigue, _deltaT, _syncValues] call FUNC(handleCardiacFunction); +if (_unit getVariable [QGVAR(fatigueEnabled), false]) then { + _aceAnReserve = [_unit] call FUNC(returnReserve); +}; + +private _heartRate = [_unit, _hrTargetAdjustment, 0, _bloodVolume, _aceAnFatigue, _aceAnReserve, _deltaT, _syncValues] call FUNC(handleCardiacFunction); private _spo2 = 97; if (EGVAR(breathing,enable)) then { // Additional variables for Respiration functions private _bloodGas = GET_BLOOD_GAS(_unit); - private _opioidDepression = GET_OPIOID_FACTOR(_unit); + private _opioidDepression = GET_OPIOID_DEPRESSION(_unit); private _anerobicPressure = (DEFAULT_ANEROBIC_EXCHANGE * (6 / (_bloodVolume max 6))) min 1.2; - _spo2 = [_unit, _heartRate, _anerobicPressure, _bloodGas, _temperature, _baroPressure, _opioidDepression, _aceAnFatigue, _deltaT, _syncValues] call FUNC(handleOxygenFunction); + _spo2 = [_unit, _heartRate, _anerobicPressure, _bloodGas, _temperature, _baroPressure, _opioidDepression, _aceAnFatigue, _aceAnReserve, _deltaT, _syncValues] call FUNC(handleOxygenFunction); }; private _woundBloodLoss = GET_WOUND_BLEEDING(_unit); // Vasoconstriction from Wound Blood Loss and Alpha Adjustment _vasoconstriction = 1 + (0.5 * _woundBloodLoss) + _alphaFactorAdjustment; +TRACE_3("vasoconstriction",_woundBloodLoss,_alphaFactorAdjustment,_vasoconstriction); _unit setVariable [VAR_VASOCONSTRICTION, (1.8 min (0.2 max _vasoconstriction)), _syncValues]; private _bloodPressure = [_unit] call EFUNC(circulation,getBloodPressure); _unit setVariable [VAR_BLOOD_PRESS, _bloodPressure, _syncValues]; _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; +private _map = GET_MAP(_unit); // Statements are ordered by most lethal first. switch (true) do { @@ -164,18 +260,33 @@ switch (true) do { }; case (IN_CRDC_ARRST(_unit)): {}; // if in cardiac arrest just break now to avoid throwing unneeded events case ((_spo2 < EGVAR(breathing,SpO2_cardiacValue)) && EGVAR(breathing,SpO2_cardiacActive)): { + TRACE_2("SpO2 below Cardiac Value",_unit,_spo2); + if ((_unit getVariable [QEGVAR(conversion,convert), false]) && (isPlayer _unit) && EGVAR(conversion,enableAutomaticConversion)) then { + [QEGVAR(conversion,convertCasualty), _unit] call CBA_fnc_localEvent; + }; [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; case ((_bloodVolume + GET_REBOA_VOLUME(_unit)) < BLOOD_VOLUME_CLASS_4_HEMORRHAGE): { TRACE_3("Class IV Hemorrhage",_unit,_hemorrhage,_bloodVolume); + if ((_unit getVariable [QEGVAR(conversion,convert), false]) && (isPlayer _unit) && EGVAR(conversion,enableAutomaticConversion)) then { + [QEGVAR(conversion,convertCasualty), _unit] call CBA_fnc_localEvent; + }; [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; case (_heartRate < 20 || {(_heartRate - (_aceAnFatigue / 40)) > 220}): { TRACE_2("heartRate Fatal",_unit,_heartRate); + if ((_unit getVariable [QEGVAR(conversion,convert), false]) && (isPlayer _unit) && EGVAR(conversion,enableAutomaticConversion)) then { + [QEGVAR(conversion,convertCasualty), _unit] call CBA_fnc_localEvent; + }; [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; }; - case (_bloodPressureL < 20 || {_bloodPressureL > 180}): { - TRACE_2("bloodPressure L above or below limits",_unit,_bloodPressureL); + case (_map < 25 || {_map > 240}): { + [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; + if ((_unit getVariable [QEGVAR(conversion,convert), false]) && (isPlayer _unit) && EGVAR(conversion,enableAutomaticConversion)) then { + [QEGVAR(conversion,convertCasualty), _unit] call CBA_fnc_localEvent; + }; + }; + case (_map < 45 || {_map > 190}): { [QACEGVAR(medical,CriticalVitals), _unit] call CBA_fnc_localEvent; }; case (_spo2 < EGVAR(breathing,SpO2_unconscious)): { @@ -196,7 +307,7 @@ switch (true) do { private _cardiacOutput = [_unit] call ACEFUNC(medical_status,getCardiacOutput); if (!isPlayer _unit) then { private _painLevel = _unit getVariable [VAR_PAIN, 0]; - hintSilent format["blood volume: %1, blood loss: [%2, %3]\nhr: %4, bp: %5, pain: %6", round(_bloodVolume * 100) / 100, round(_woundBloodLoss * 1000) / 1000, round((_woundBloodLoss / (0.001 max _cardiacOutput)) * 100) / 100, round(_heartRate), _bloodPressure, round(_painLevel * 100) / 100]; + hintSilent format["blood volume: %1, blood loss: [%2, %3]\nhr: %4, bp: %5, vasoconstriction: %6", round(_bloodVolume * 100) / 100, round(_woundBloodLoss * 1000) / 1000, round((_woundBloodLoss / (0.001 max _cardiacOutput)) * 100) / 100, round(_heartRate), _bloodPressure, _vasoconstriction]; }; #endif diff --git a/addons/vitals/functions/fnc_hasStableVitals.sqf b/addons/vitals/functions/fnc_hasStableVitals.sqf index 58ed2f125..519cb60d8 100644 --- a/addons/vitals/functions/fnc_hasStableVitals.sqf +++ b/addons/vitals/functions/fnc_hasStableVitals.sqf @@ -21,21 +21,27 @@ private _bloodVolume = GET_BLOOD_VOLUME_LITERS(_unit); if (_bloodVolume < ACEGVAR(medical,const_stableVitalsBloodThreshold)) exitWith { false }; if IN_CRDC_ARRST(_unit) exitWith { false }; -if (_unit getVariable [QEGVAR(surgery,sedated), false]) exitWith { false }; +if ((_unit getVariable [QEGVAR(surgery,sedated), 0]) > 0.1) exitWith { false }; if (_unit getVariable [QEGVAR(surgery,reboa), false]) exitWith { false }; private _cardiacOutput = [_unit] call ACEFUNC(medical_status,getCardiacOutput); private _bloodLoss = _unit call ACEFUNC(medical_status,getBloodLoss); if (_bloodLoss > (ACEGVAR(medical,const_bloodLossKnockOutThreshold) * _cardiacOutput / 2)) exitWith { false }; -private _bloodPressure = GET_BLOOD_PRESSURE(_unit); -_bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; -if (_bloodPressureL < 50 || {_bloodPressureH < 60}) exitWith { false }; +private _map = GET_MAP(_unit); +if (_map < 60 || _map > 120) exitWith { false }; private _heartRate = GET_HEART_RATE(_unit); -if (_heartRate < 40) exitWith { false }; +private _defaultHeartRate = _unit getVariable [QEGVAR(circulation,defaultHeartRate), 80]; +if (_heartRate < ((_defaultHeartRate - 35) max 40)) exitWith { false }; + +private _unitTemperature = _unit getVariable [QGVAR(unitTemperature), 37]; +if (_unitTemperature < 34) exitWith { false }; private _o2 = GET_KAT_SPO2(_unit); if (_o2 < EGVAR(breathing,Stable_spo2)) exitWith { false }; +private _CMR = _unit getVariable [QEGVAR(brain,CMR),100]; +if (_CMR < EGVAR(brain,stableCMR)) exitWith { false }; + true diff --git a/addons/vitals/functions/fnc_returnReserve.sqf b/addons/vitals/functions/fnc_returnReserve.sqf new file mode 100644 index 000000000..9858ebbdc --- /dev/null +++ b/addons/vitals/functions/fnc_returnReserve.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local callback for checking ACE Fatigue values + * + * Arguments: + * 0: Medic + * + * Return Value: + * None + * + * Example: + * [player] call kat_vitals_fnc_returnFatigueLocal + * + * Public: No + */ + +params ["_patient"]; + +private _return = 0; + +if (ACEGVAR(advanced_fatigue,anReserve) isEqualTypeAny [0, 1e39]) then { + _return = ACEGVAR(advanced_fatigue,anReserve); +}; + +_return diff --git a/addons/vitals/functions/fnc_updateContractility.sqf b/addons/vitals/functions/fnc_updateContractility.sqf new file mode 100644 index 000000000..a7858edc7 --- /dev/null +++ b/addons/vitals/functions/fnc_updateContractility.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the contractility effect + * + * Arguments: + * 0: The Unit + * 1: contractility Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updatecontractility + * + * Public: No + */ + +params ["_unit", "_contractilityAdjustment", "_deltaT", "_syncValue"]; +_unit setVariable [QEGVAR(pharma,heartContractility), _contractilityAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_updateNauseaMult.sqf b/addons/vitals/functions/fnc_updateNauseaMult.sqf new file mode 100644 index 000000000..cdcd8a3fb --- /dev/null +++ b/addons/vitals/functions/fnc_updateNauseaMult.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the nauseaMult effect + * + * Arguments: + * 0: The Unit + * 1: nauseaMult Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updatenauseaMult + * + * Public: No + */ + +params ["_unit", "_nauseaMultAdjustment", "_deltaT", "_syncValue"]; + +_unit setVariable [QEGVAR(pharma,nauseaMult), _nauseaMultAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_updateOpioidDepression.sqf b/addons/vitals/functions/fnc_updateOpioidDepression.sqf new file mode 100644 index 000000000..b6b1a5230 --- /dev/null +++ b/addons/vitals/functions/fnc_updateOpioidDepression.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the opioid Depression effect + * + * Arguments: + * 0: The Unit + * 1: Opioid Depression Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updateOpioidDepression + * + * Public: No + */ + +params ["_unit", "_opioidDepressionAdjustment", "_deltaT", "_syncValue"]; + +_unit setVariable [QEGVAR(pharma,opioidDepression), _opioidDepressionAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_updateParalysis.sqf b/addons/vitals/functions/fnc_updateParalysis.sqf new file mode 100644 index 000000000..8645a77f6 --- /dev/null +++ b/addons/vitals/functions/fnc_updateParalysis.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the nauseaMult effect + * + * Arguments: + * 0: The Unit + * 1: nauseaMult Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updatenauseaMult + * + * Public: No + */ + +params ["_unit", "_paralysisAdjustment", "_deltaT", "_syncValue"]; + +_unit setVariable [QEGVAR(breathing,paralysis), _paralysisAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_updateRespiratoryDepth.sqf b/addons/vitals/functions/fnc_updateRespiratoryDepth.sqf new file mode 100644 index 000000000..25d6f769b --- /dev/null +++ b/addons/vitals/functions/fnc_updateRespiratoryDepth.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the respiratoryRate effect + * + * Arguments: + * 0: The Unit + * 1: respiratoryDepth Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updaterespiratoryDepth + * + * Public: No + */ + +params ["_unit", "_respiratoryDepthAdjustment", "_deltaT", "_syncValue"]; + +_unit setVariable [QEGVAR(pharma,respiratoryDepth), _respiratoryDepthAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_updateRespiratoryRate.sqf b/addons/vitals/functions/fnc_updateRespiratoryRate.sqf new file mode 100644 index 000000000..daba412b9 --- /dev/null +++ b/addons/vitals/functions/fnc_updateRespiratoryRate.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the respiratoryRate effect + * + * Arguments: + * 0: The Unit + * 1: respiratoryRate Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updaterespiratoryRate + * + * Public: No + */ + +params ["_unit", "_respiratoryRateAdjustment", "_deltaT", "_syncValue"]; + +_unit setVariable [QEGVAR(pharma,respiratoryRate), _respiratoryRateAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_updateSedation.sqf b/addons/vitals/functions/fnc_updateSedation.sqf new file mode 100644 index 000000000..69964b0fb --- /dev/null +++ b/addons/vitals/functions/fnc_updateSedation.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * Update the nauseaMult effect + * + * Arguments: + * 0: The Unit + * 1: nauseaMult Adjustments + * 2: Time since last update + * 3: Sync value? + * + * Return Value: + * None + * + * Example: + * [player, 0, 1, false] call kat_vitals_fnc_updatenauseaMult + * + * Public: No + */ + +params ["_unit", "_sedationAdjustment", "_deltaT", "_syncValue"]; + +_unit setVariable [QEGVAR(surgery,sedated), _sedationAdjustment, _syncValue]; diff --git a/addons/vitals/functions/fnc_weightLog.sqf b/addons/vitals/functions/fnc_weightLog.sqf new file mode 100644 index 000000000..b7244146a --- /dev/null +++ b/addons/vitals/functions/fnc_weightLog.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Miss Heda + * Adds blood type to quick_view log + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call kat_circulation_fnc_bloodTypeLog; + * + * Public: No + */ + +params ["_medic", "_patient"]; + +private _weight = _patient getVariable [QGVAR(currentWeight), 80]; +[_patient, "quick_view", LSTRING(weight_log)] call EFUNC(circulation,removeLog); +[_patient, "quick_view", LSTRING(weight_log), [[_medic] call ACEFUNC(common,getName), _weight]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/vitals/stringtable.xml b/addons/vitals/stringtable.xml index 150bf83c1..67cc4540a 100644 --- a/addons/vitals/stringtable.xml +++ b/addons/vitals/stringtable.xml @@ -118,5 +118,8 @@ KAT - ADV Medical: Vitalwerte KAM - バイタル + + %1 checked dogtags weight: %2 + diff --git a/addons/watch/RscTitles.hpp b/addons/watch/RscTitles.hpp index 696e8c2f9..2092eddf1 100644 --- a/addons/watch/RscTitles.hpp +++ b/addons/watch/RscTitles.hpp @@ -27,8 +27,6 @@ class RscText; class RscPicture; -class RscButton; -class RscPictureKeepAspect; class RscTitles { class KAT_Katmin diff --git a/addons/watch/functions/fnc_showKWatch.sqf b/addons/watch/functions/fnc_showKWatch.sqf index 6bd16b723..05e418895 100644 --- a/addons/watch/functions/fnc_showKWatch.sqf +++ b/addons/watch/functions/fnc_showKWatch.sqf @@ -107,10 +107,18 @@ private _timeSeconds = _display displayCtrl 22008; _altitude ctrlSetText ([_altitudeValue, 1, 0] call CBA_fnc_formatNumber); }; - if (GVAR(pressureUnit) == 1) then { - _baro ctrlSetText ([(_altitudeValue call ACEFUNC(weather,calculateBarometricPressure)), 1, 0] call CBA_fnc_formatNumber); + if (EGVAR(vitals,useACEpressure)) then { + if (GVAR(pressureUnit) == 1) then { + _baro ctrlSetText ([(_altitudeValue call ACEFUNC(weather,calculateBarometricPressure)), 1, 0] call CBA_fnc_formatNumber); + } else { + _baro ctrlSetText ([((_altitudeValue call ACEFUNC(weather,calculateBarometricPressure)) * 0.750062), 1, 0] call CBA_fnc_formatNumber); + }; } else { - _baro ctrlSetText ([((_altitudeValue call ACEFUNC(weather,calculateBarometricPressure)) / 1.3), 1, 0] call CBA_fnc_formatNumber); + if (GVAR(pressureUnit) == 1) then { + _baro ctrlSetText ([((760 * exp((-(_altitudeValue)) / 8400))* 1.333), 1, 0] call CBA_fnc_formatNumber); + } else { + _baro ctrlSetText ([(760 * exp((-(_altitudeValue)) / 8400)), 1, 0] call CBA_fnc_formatNumber); + }; }; if (GVAR(temperatureUnit) == 1) then { diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index a6806a334..4ad48819b 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -13,12 +13,12 @@ class CfgVehicles { side=7; }; - class GVAR(manageAirway_module): GVAR(baseModule) { + /*class GVAR(manageAirway_module): GVAR(baseModule) { curatorCanAttach = 1; displayName = CSTRING(manageAirway_Module_displayname); curatorInfoType = QGVAR(RscManageAirway); icon = QACEPATHTOF(medical_gui,data\categories\airway_management.paa); - }; + };*/ class GVAR(bloodType_module): GVAR(baseModule) { curatorCanAttach = 1; @@ -41,4 +41,22 @@ class CfgVehicles { function = QFUNC(toggleAIDeathModule); icon = QPATHTOF(ui\Icon_Module_Zeus_Prevent_AI_Death.paa); }; + class GVAR(takeUnitSnapshot_module): GVAR(baseModule) { + curatorCanAttach = 1; + displayName = CSTRING(takeUnitSnapshot_Module_displayname); + function = QFUNC(takeUnitSnapshot); + icon = QACEPATHTOF(medical_gui,data\categories\examine_patient.paa); + }; + class GVAR(serializeState_module): GVAR(baseModule) { + curatorCanAttach = 1; + displayName = CSTRING(serializeState_Module_displayname); + function = QFUNC(serializeState_module); + icon = QACEPATHTOF(medical_gui,data\categories\examine_patient.paa); + }; + class GVAR(deserializeState_module): GVAR(baseModule) { + curatorCanAttach = 1; + displayName = CSTRING(deserializeState_Module_displayname); + curatorInfoType = QGVAR(RscSerializeStateModule); + icon = QACEPATHTOF(medical_gui,data\categories\examine_patient.paa); + }; }; \ No newline at end of file diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index 7184676f9..fa4db3149 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -1,5 +1,8 @@ +PREP(deserializeState_module); PREP(emptyFunction); +PREP(serializeState_module); PREP(showMessage); +PREP(takeUnitSnapshot); PREP(toggleAIDeathModule); PREP(ui_changeBloodType); PREP(ui_changeCardiacState); diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index ee24a8099..89bf632b7 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -5,10 +5,12 @@ class CfgPatches { name = COMPONENT_NAME; requiredVersion = REQUIRED_VERSION; units[] = { - QGVAR(manageAirway_module), QGVAR(bloodType_module), QGVAR(cardiacState_module), - QGVAR(toggleAIDeath_module) + QGVAR(toggleAIDeath_module), + QGVAR(takeUnitSnapshot_module), + QGVAR(serializeState_module), + QGVAR(deserializeState_module), }; weapons[] = {}; magazines[] = { }; diff --git a/addons/zeus/functions/fnc_deserializeState_module.sqf b/addons/zeus/functions/fnc_deserializeState_module.sqf new file mode 100644 index 000000000..40aa4b1db --- /dev/null +++ b/addons/zeus/functions/fnc_deserializeState_module.sqf @@ -0,0 +1,70 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * outputs current unit state to that units RPT for debug tracing + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [LOGIC] call kat_zeus_fnc_toggleAIDeathModule; + * + * Public: Yes + */ + +params ["_control"]; + +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + +_control ctrlRemoveAllEventHandlers "SetFocus"; + + +private _unit = attachedTo _logic; + +scopeName "Main"; +private _fnc_error = { + params ["_msg"]; + _display closeDisplay 0; + deleteVehicle _logic; + [_msg] call FUNC(showMessage); + breakOut "Main"; +}; + +switch (false) do { + case !(isNull _unit): { + [ACELSTRING(zeus,NothingSelected)] call _fnc_error; + }; + case (_unit isKindOf "CAManBase"): { + [ACELSTRING(zeus,OnlyInfantry)] call _fnc_error; + }; +}; + +private _fnc_onUnload = { + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + if (isNull _logic) exitWith {}; + deleteVehicle _logic; +}; + +private _fnc_onConfirm = { + params [["_ctrlButtonOK", controlNull, [controlNull]]]; + + private _display = ctrlParent _ctrlButtonOK; + if (isNull _display) exitWith {}; + + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + if (isNull _logic) exitWith {}; + + private _unit = attachedTo _logic; + + private _json = ctrlText (_display displayCtrl 18112); + + [_unit, _json] call EFUNC(misc,deserializeState); +}; + +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_serializeState_module.sqf b/addons/zeus/functions/fnc_serializeState_module.sqf new file mode 100644 index 000000000..7be6f7d3c --- /dev/null +++ b/addons/zeus/functions/fnc_serializeState_module.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * outputs current unit state to that units RPT for debug tracing + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [LOGIC] call kat_zeus_fnc_toggleAIDeathModule; + * + * Public: Yes + */ +params ["_logic"]; +if !(local _logic) exitWith {}; + +private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + +if ((_mouseOver select 0) != "OBJECT") then { + [ACELSTRING(zeus,NothingSelected)] call FUNC(showMessage); +} else { + private _unit = effectiveCommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { + [ACELSTRING(zeus,OnlyInfantry)] call FUNC(showMessage); + } else { + private _json = _unit call EFUNC(misc,serializeState); + missionNamespace setVariable [QGVAR(serializedState), _json, true]; + "ace" callExtension ["clipboard:append", [_json + endl + endl]]; + "ace" callExtension ["clipboard:complete", []]; + deleteVehicle _logic; + [LSTRING(toClipboard)] call FUNC(showMessage); + }; +}; +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_takeUnitSnapshot.sqf b/addons/zeus/functions/fnc_takeUnitSnapshot.sqf new file mode 100644 index 000000000..abfad5252 --- /dev/null +++ b/addons/zeus/functions/fnc_takeUnitSnapshot.sqf @@ -0,0 +1,310 @@ +#include "..\script_component.hpp" +/* + * Author: Cplhardcore + * outputs current unit state to that units RPT for debug tracing + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [LOGIC] call kat_zeus_fnc_toggleAIDeathModule; + * + * Public: Yes + */ + +params ["_logic"]; +if !(local _logic) exitWith {}; + +private _mouseOver = GETMVAR(bis_fnc_curatorObjectPlaced_mouseOver,[""]); + +if ((_mouseOver select 0) != "OBJECT") then { + [ACELSTRING(zeus,NothingSelected)] call FUNC(showMessage); +} else { + private _unit = effectiveCommander (_mouseOver select 1); + if !(_unit isKindOf "CAManBase") then { + [ACELSTRING(zeus,OnlyInfantry)] call FUNC(showMessage); + } else { + diag_log str _unit; +private _pain = _unit getVariable [VAR_PAIN, 0]; +private _bloodVol = _unit getVariable [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME]; + +private _tourniquet = _unit getVariable [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES]; + +private _openWounds = _unit getVariable [VAR_OPEN_WOUNDS, []]; +private _bandagedWounds = _unit getVariable [VAR_BANDAGED_WOUNDS, []]; +private _stitchedWounds = _unit getVariable [VAR_STITCHED_WOUNDS, []]; +private _wrappedWounds = _unit getVariable [VAR_WRAPPED_WOUNDS, []]; +private _coagWounds = _unit getVariable [VAR_COAGED_WOUNDS, []]; +private _isLimping = _unit getVariable [QACEGVAR(medical,isLimping), false]; +private _fractures = _unit getVariable [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES]; + +private _heartRate = _unit getVariable [VAR_HEART_RATE, DEFAULT_HEART_RATE]; +private _bloodPress = _unit getVariable [VAR_BLOOD_PRESS, [80, 120]]; +private _periphRes = _unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]; +private _spo2 = _unit getVariable [VAR_SPO2, DEFAULT_SPO2]; +private _oxygenDemand = _unit getVariable [VAR_OXYGEN_DEMAND, 0]; + +private _ivBags = _unit getVariable [QACEGVAR(medical,ivBags), []]; + +private _bodypartDamage = _unit getVariable [VAR_BODYPART_DAMAGE, DEFAULT_BODYPART_DAMAGE_VALUES]; +private _occludedMedications = _unit getVariable [QACEGVAR(medical,occludedMedications), []]; +private _hemorrhage = _unit getVariable [VAR_HEMORRHAGE, 0]; +private _inPain = _unit getVariable [VAR_IN_PAIN, false]; +private _painSupp = _unit getVariable [VAR_PAIN_SUPP, 0]; +private _medications = _unit getVariable [VAR_MEDICATIONS, []]; +private _triageCard = _unit getVariable [QACEGVAR(medical,triageCard), []]; +private _vasoconstriction = _unit getVariable [VAR_VASOCONSTRICTION, 1]; + + +diag_log format [ + "[Wounds] OpenWounds: %1 | BandagedWounds: %2 | StitchedWounds: %3 | WrappedWounds: %4 | CoagWounds: %5", + _openWounds, + _bandagedWounds, + _stitchedWounds, + _wrappedWounds, + _coagWounds +]; + +diag_log format [ + "[Vitals] Pain: %1 | BloodVol: %2 | Tourniquet: %3 | OccludedMedications: %4 | IsLimping: %5 | Fractures: %6 | HeartRate: %7 | BloodPress: %8 | PeriphRes: %9 | SpO2: %10 | OxygenDemand: %11 | IVBags: %12 | BodypartDamage: %13 | Hemorrhage: %14 | InPain: %15 | PainSupp: %16 | Medications: %17 | TriageCard: %18 | Vasoconstriction: %19", + _pain, + _bloodVol, + _tourniquet, + _occludedMedications, + _isLimping, + _fractures, + _heartRate, + _bloodPress, + _periphRes, + _spo2, + _oxygenDemand, + _ivBags, + _bodypartDamage, + _hemorrhage, + _inPain, + _painSupp, + _medications, + _triageCard, + _vasoconstriction +]; + + +private _airwayItem = _unit getVariable [QEGVAR(airway,airway_item), ""]; +private _airway = _unit getVariable [QEGVAR(airway,airway), false]; +private _clearedTime = _unit getVariable [QEGVAR(airway,clearedTime), 0]; +private _cricothyrotomy = _unit getVariable [QEGVAR(airway,cricothyrotomy), 0]; +private _catastrophicAirway = _unit getVariable [QEGVAR(airway,catastrophicAirway), [false, false]]; +private _obstruction = _unit getVariable [QEGVAR(airway,obstruction), [0, 0, 0]]; +private _occlusion = _unit getVariable [QEGVAR(airway,occlusion), [0, 0, 0]]; +private _occlusionMitigation = _unit getVariable [QEGVAR(airway,occlusionMitigation), [false, false, false]]; +private _overstretch = _unit getVariable [QEGVAR(airway,overstretch), false]; +private _recovery = _unit getVariable [QEGVAR(airway,recovery), false]; +private _wasOccluded = _unit getVariable [QEGVAR(airway,wasOccluded), [0, 0, 0]]; +private _hasPuked = _unit getVariable [QEGVAR(airway,hasPuked), false]; +private _airwayStatus = _unit getVariable [QEGVAR(airway,airwayStatus), [0, 0, 0]]; +private _isVisualized = _unit getVariable [QEGVAR(airway,isVisualized), false]; +diag_log format [ + "[Airways] AirwayItem: %1 | Airway: %2 | ClearedTime: %3 | Cricothyrotomy: %4 | CatastrophicAirway: %5 | Obstruction: %6 | Occlusion: %7 | OcclusionMitigation: %8 | Overstretch: %9 | Recovery: %10 | WasOccluded: %11 | HasPuked: %12 | AirwayStatus: %13 | IsVisualized: %14", + _airwayItem, + _airway, + _clearedTime, + _cricothyrotomy, + _catastrophicAirway, + _obstruction, + _occlusion, + _occlusionMitigation, + _overstretch, + _recovery, + _wasOccluded, + _hasPuked, + _airwayStatus, + _isVisualized +]; +private _airwayStatus = _unit getVariable [QEGVAR(breathing,airwayStatus), 100]; +private _pneumothorax = _unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; +private _pneumothoraxSurfaceArea = _unit getVariable [QEGVAR(breathing,pneumothoraxSurfaceArea), [0, 0]]; +private _hemopneumothorax = _unit getVariable [QEGVAR(breathing,hemopneumothorax), [0, 0]]; +private _tensionpneumothorax = _unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]]; +private _activeChestSeal = _unit getVariable [QEGVAR(breathing,activeChestSeal), [false, false]]; +private _deepPenetratingInjury = _unit getVariable [QEGVAR(breathing,deepPenetratingInjury), [false, false]]; +private _etco2Monitor = _unit getVariable [QEGVAR(breathing,etco2Monitor), []]; +private _breathRate = _unit getVariable [QEGVAR(breathing,breathRate), 15]; +private _nasalCannula = _unit getVariable [QEGVAR(breathing,nasalCannula), false]; +private _lungSurfaceArea = _unit getVariable [QEGVAR(breathing,lungSurfaceArea), 400]; +private _chestTube = _unit getVariable [QEGVAR(breathing,chestTube), [0, 0]]; +private _attachedVent = _unit getVariable [QEGVAR(breathing,attachedVent), false]; +private _attachedVentGUI = _unit getVariable [QEGVAR(breathing,attachedVentGUI), false]; +private _paralysis = _unit getVariable [QEGVAR(breathing,paralysis), 0]; +private _ventRate = _unit getVariable [QEGVAR(breathing,ventRate), 2]; +private _trali = _unit getVariable [QEGVAR(breathing,TRALI), 0]; + +diag_log format [ + "[Respiratory] AirwayStatus: %1 | Pneumothorax: %2 | PneumothoraxSurfaceArea: %3 | Hemopneumothorax: %4 | TensionPneumothorax: %5 | ActiveChestSeal: %6 | DeepPenetratingInjury: %7 | ETCO2Monitor: %8 | BreathRate: %9 | NasalCannula: %10 | LungSurfaceArea: %11 | ChestTube: %12 | AttachedVent: %13 | AttachedVentGUI: %14 | Paralysis: %15 | VentRate: %16 | TRALI: %17", + _airwayStatus, + _pneumothorax, + _pneumothoraxSurfaceArea, + _hemopneumothorax, + _tensionpneumothorax, + _activeChestSeal, + _deepPenetratingInjury, + _etco2Monitor, + _breathRate, + _nasalCannula, + _lungSurfaceArea, + _chestTube, + _attachedVent, + _attachedVentGUI, + _paralysis, + _ventRate, + _trali +]; +private _cprCount = _unit getVariable [QEGVAR(circulation,cprCount), 2]; +private _heartRestart = _unit getVariable [QEGVAR(circulation,heartRestart), false]; +private _cardiacArrestType = _unit getVariable [QEGVAR(circulation,cardiacArrestType), 0]; + +private _bloodPressureChange = _unit getVariable [VAR_BLOODPRESSURE_CHANGE, 0]; + +private _bodyFluid = _unit getVariable [QEGVAR(circulation,bodyFluid), DEFAULT_BODY_FLUID]; + +private _isPerformingCPR = _unit getVariable [QEGVAR(circulation,isPerformingCPR), false]; +private _oxygenationPeriod = _unit getVariable [QEGVAR(circulation,OxygenationPeriod), 0]; + +private _tourniquetTime = _unit getVariable [QEGVAR(circulation,tourniquetTime), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _defaultHeartRate = _unit getVariable [QEGVAR(circulation,defaultHeartRate), 80]; + +private _bloodGas = _unit getVariable [QEGVAR(circulation,bloodGas), DEFAULT_BLOOD_GAS]; +private _testedBloodGas = _unit getVariable [QEGVAR(circulation,testedBloodGas), [0,0,0,0,0,0,0]]; + +private _ABGmenuShow = _unit getVariable [QEGVAR(circulation,ABGmenuShow), false]; + +private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; +private _effusion = _unit getVariable [QEGVAR(circulation,effusion), 0]; + +private _attachedLucas = _unit getVariable [QEGVAR(circulation,attachedLucas), false]; +private _attachedLucasState = _unit getVariable [QEGVAR(circulation,attachedLucasState), false]; + +diag_log format [ + "[Cardiac] CPRCount: %1 | HeartRestart: %2 | CardiacArrestType: %3 | BloodPressureChange: %4 | BodyFluid: %5 | IsPerformingCPR: %6 | OxygenationPeriod: %7 | TourniquetTime: %8 | DefaultHeartRate: %9 | BloodGas: %10 | TestedBloodGas: %11 | ABGmenuShow: %12 | HT: %13 | Effusion: %14 | AttachedLucas: %15 | AttachedLucasState: %16", + _cprCount, + _heartRestart, + _cardiacArrestType, + _bloodPressureChange, + _bodyFluid, + _isPerformingCPR, + _oxygenationPeriod, + _tourniquetTime, + _defaultHeartRate, + _bloodGas, + _testedBloodGas, + _ABGmenuShow, + _ht, + _effusion, + _attachedLucas, + _attachedLucasState +]; +private _dustInjuryLight = _unit getVariable [QEGVAR(ophthalmology,dustInjuryLight), 0]; +private _dustInjuryHeavy = _unit getVariable [QEGVAR(ophthalmology,dustInjuryHeavy), 0]; +private _eyeInjuries = _unit getVariable [QEGVAR(ophthalmology,eyeInjuries), [1,1]]; +private _eyeInjurySevere = _unit getVariable [QEGVAR(ophthalmology,eyeInjurySevere), false]; + +diag_log format [ + "[Ophthalmology] DustInjuryLight: %1 | DustInjuryHeavy: %2 | EyeInjuries: %3 | EyeInjurySevere: %4", + _dustInjuryLight, + _dustInjuryHeavy, + _eyeInjuries, + _eyeInjurySevere +]; + +private _alphaAction = _unit getVariable [QEGVAR(pharma,alphaAction), 1]; + +private _IV = _unit getVariable [QEGVAR(pharma,IV), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _IVflow = _unit getVariable [QEGVAR(pharma,IVflow), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _IVrate = _unit getVariable [QEGVAR(pharma,IVrate), [0,0,0,0,0,0,0,0,0,0,0,0]]; + +private _IVincomingFlowAmount = _unit getVariable [QEGVAR(pharma,IVincomingFlowAmount), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _IVpfh = _unit getVariable [QEGVAR(pharma,IVpfh), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _active = _unit getVariable [QEGVAR(pharma,active), false]; +private _IVPharma_PFH = _unit getVariable [QEGVAR(pharma,IVPharma_PFH), 0]; + +private _IVmenuActive = _unit getVariable [QEGVAR(pharma,IVmenuActive), false]; + +private _externalPh = _unit getVariable [QEGVAR(pharma,externalPh), 0]; +private _pH = _unit getVariable [QEGVAR(pharma,pH), 0]; + +private _opioidFactor = _unit getVariable [QEGVAR(pharma,opioidFactor), 0]; +private _opioidDepression = _unit getVariable [QEGVAR(pharma,opioidDepression), 0]; + +private _kidneyFail = _unit getVariable [QEGVAR(pharma,kidneyFail), false]; +private _kidneyArrest = _unit getVariable [QEGVAR(pharma,kidneyArrest), false]; +private _kidneyPressure = _unit getVariable [QEGVAR(pharma,kidneyPressure), false]; + +private _respiratoryRate = _unit getVariable [QEGVAR(pharma,respiratoryRate), 1]; +private _heartContractility = _unit getVariable [QEGVAR(pharma,heartContractility), 1]; +private _nauseaMult = _unit getVariable [QEGVAR(pharma,nauseaMult), 1]; + +private _localAnesthesia = _unit getVariable [VAR_LOCAL_ANESTHESIA, DEFAULT_LOCAL_ANESTHESIA]; +private _activeEtomidateLoadingDose = _unit getVariable [QEGVAR(pharma,activeEtomidateLoadingDose), false]; + +diag_log format [ + "[IV/Pharma] AlphaAction: %1 | IV: %2 | IVflow: %3 | IVrate: %4 | IVincomingFlowAmount: %5 | IVpfh: %6 | Active: %7 | IVPharma_PFH: %8 | IVmenuActive: %9 | ExternalPh: %10 | pH: %11 | OpioidFactor: %12 | OpioidDepression: %13 | KidneyFail: %14 | KidneyArrest: %15 | KidneyPressure: %16 | RespiratoryRate: %17 | HeartContractility: %18 | NauseaMult: %19 | LocalAnesthesia: %20 | ActiveEtomidateLoadingDose: %21", + _alphaAction, + _IV, + _IVflow, + _IVrate, + _IVincomingFlowAmount, + _IVpfh, + _active, + _IVPharma_PFH, + _IVmenuActive, + _externalPh, + _pH, + _opioidFactor, + _opioidDepression, + _kidneyFail, + _kidneyArrest, + _kidneyPressure, + _respiratoryRate, + _heartContractility, + _nauseaMult, + _localAnesthesia, + _activeEtomidateLoadingDose +]; +private _fractures = _unit getVariable [QEGVAR(surgery,fractures), [0,0,0,0,0,0,0,0,0,0,0,0]]; +private _lidocaine = _unit getVariable [QEGVAR(surgery,lidocaine), false]; +private _etomidate = _unit getVariable [QEGVAR(surgery,etomidate), false]; +private _sedated = _unit getVariable [QEGVAR(surgery,sedated), 0]; +private _imaging = _unit getVariable [QEGVAR(surgery,imaging), false]; +private _reboa = _unit getVariable [QEGVAR(surgery,reboa), false]; +private _surgicalBlock = _unit getVariable [QEGVAR(surgery,surgicalBlock), [0,0,0,0,0,0,0,0,0,0,0,0]]; + +diag_log format [ + "[Ortho/Anesthesia] Fractures: %1 | Lidocaine: %2 | Etomidate: %3 | Sedated: %4 | Imaging: %5 | REBOA: %6 | SurgicalBlock: %7", + _fractures, + _lidocaine, + _etomidate, + _sedated, + _imaging, + _reboa, + _surgicalBlock +]; + +private _respiratorydepth = _unit getVariable [QEGVAR(vitals,respiratoryDepth), DEFAULT_RESPIRATORY_DEPTH]; +private _currentWeight = _unit getVariable [QEGVAR(vitals,currentWeight), 80]; +diag_log format [ + "[Vitals] Respiratory Depth: %1 Current Weight: %2", + _respiratorydepth, + _currentWeight +]; +private _currentVersion = QUOTE(VERSION_STR); +diag_log format [ + "[Version] Current Version: %1", + _currentVersion +]; + +deleteVehicle _logic; + }; +}; +deleteVehicle _logic; diff --git a/addons/zeus/functions/fnc_ui_manageAirway.sqf b/addons/zeus/functions/fnc_ui_manageAirway.sqf index 248c8f498..26e976581 100644 --- a/addons/zeus/functions/fnc_ui_manageAirway.sqf +++ b/addons/zeus/functions/fnc_ui_manageAirway.sqf @@ -55,14 +55,14 @@ private _fnc_sliderMove_ptx = { private _idc = ctrlIDC _slider; private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); private _unit = attachedTo _logic; - private _curVal = _unit getVariable [QEGVAR(breathing,pneumothorax), 0]; + private _curVal = _unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; _slider ctrlSetTooltip format [LLSTRING(sliderFormat13was23), round(sliderPosition _slider), round _curVal, " "]; }; private _sliderPTX = _display displayCtrl 16105; _sliderPTX sliderSetRange [0, 4]; _sliderPTX sliderSetSpeed [1,10]; -private _curPTX = _unit getVariable [QEGVAR(breathing,pneumothorax), 0]; +private _curPTX = _unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; _sliderPTX sliderSetPosition (round _curPTX); _sliderPTX ctrlAddEventHandler ["SliderPosChanged", _fnc_sliderMove_ptx]; [_sliderPTX,_curPTX] call _fnc_sliderMove_ptx; @@ -86,8 +86,8 @@ _sliderSPO2 ctrlAddEventHandler ["SliderPosChanged", _fnc_sliderMove_SPO2]; (_display displayCtrl 16101) cbSetChecked (_unit getVariable [QEGVAR(airway,obstruction), false]); (_display displayCtrl 16102) cbSetChecked (_unit getVariable [QEGVAR(airway,occluded), false]); -(_display displayCtrl 16103) cbSetChecked (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false]); -(_display displayCtrl 16104) cbSetChecked (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), false]); +(_display displayCtrl 16103) cbSetChecked (_unit getVariable [QEGVAR(breathing,hemopneumothorax), [false, false]]); +(_display displayCtrl 16104) cbSetChecked (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]]); private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; @@ -117,12 +117,23 @@ private _fnc_onConfirm = { }; _unit setVariable [_x, _targetState, true]; - } forEach [QEGVAR(airway,obstruction), QEGVAR(airway,occluded), QEGVAR(breathing,hemopneumothorax), QEGVAR(breathing,tensionpneumothorax)]; + } forEach [QEGVAR(airway,obstruction), QEGVAR(airway,occluded)]; + + { + private _targetState = _valueArr select _forEachIndex; + private _currentState = _unit getVariable [_x, false]; + + if (!_initBreathing && (_targetState && !_currentState)) then { + _initBreathing = true; + }; + private _targetArray = [_targetState, _targetState]; + _unit setVariable [_x, _targetArray, true]; + } forEach [QEGVAR(breathing,hemopneumothorax), QEGVAR(breathing,tensionpneumothorax)]; private _curSpO2Val = GET_PAO2(_unit); private _pneumothorax = round(sliderPosition (_display displayCtrl 16105)); - - _unit setVariable [QEGVAR(breathing,pneumothorax), _pneumothorax, true]; + private _pneumothoraxArray = [_pneumothorax, _pneumothorax]; + _unit setVariable [QEGVAR(breathing,pneumothorax), _pneumothoraxArray, true]; private _o2Sat = round(sliderPosition (_display displayCtrl 16106)); private _bloodGas = GET_BLOOD_GAS(_unit); @@ -136,7 +147,7 @@ private _fnc_onConfirm = { }; if ((_valueArr select 2) || (_valueArr select 3)) then { - _unit setVariable [QEGVAR(breathing,pneumothorax), 4, true]; + _unit setVariable [QEGVAR(breathing,pneumothorax), [4, 4], true]; [_unit, -48, -48, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange); [_unit, 0.5] call ACEFUNC(medical_status,adjustPainLevel); }; @@ -145,7 +156,6 @@ private _fnc_onConfirm = { [_unit] call EFUNC(breathing,handlePneumothoraxDeterioration); }; - [_unit] call EFUNC(circulation,updateInternalBleeding); }; _display displayAddEventHandler ["Unload", _fnc_onUnload]; diff --git a/addons/zeus/script_component.hpp b/addons/zeus/script_component.hpp index d1ab62f30..d2562d82b 100644 --- a/addons/zeus/script_component.hpp +++ b/addons/zeus/script_component.hpp @@ -1,6 +1,6 @@ #define COMPONENT zeus #define COMPONENT_BEAUTIFIED ZEUS -#include "\x\kat\addons\main\script_mod.hpp" + // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE @@ -15,6 +15,7 @@ #endif #include "\x\kat\addons\main\script_macros.hpp" +#include "\x\kat\addons\main\script_mod.hpp" // UI grid #define SIZEX ((safeZoneW / safeZoneH) min 1.2) diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index a32429c6a..dc1e6304e 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -361,5 +361,23 @@ Valitse välitön AI-kuolema Schakel onmiddelijke KI / AI dood om + + Take Unit Snapshot + + + Serialize Unit State + + + Deserialize Unit State + + + No appropriate state saved, save one using Serialize State + + + Import Serialized String + + + Serialized String copied to clipboard + diff --git a/addons/zeus/ui/RscAttributes.hpp b/addons/zeus/ui/RscAttributes.hpp index 2754aaa7d..e4a4b9273 100644 --- a/addons/zeus/ui/RscAttributes.hpp +++ b/addons/zeus/ui/RscAttributes.hpp @@ -268,3 +268,50 @@ class GVAR(RscCardiacStateModule): RscDisplayAttributes { class ButtonCancel: ButtonCancel {}; }; }; +class GVAR(RscSerializeStateModule): RscDisplayAttributes { + onLoad = QUOTE([ARR_3('onLoad',_this,QQGVAR(RscSerializeModule))] call FUNC(zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload',_this,QQGVAR(RscSerializeModule))] call FUNC(zeusAttributes)); + class Controls: Controls { + class Background: Background {}; + class Title: Title {}; + class Content: Content { + class Controls { + class importSerializeString: RscControlsGroupNoScrollbars { + onSetFocus = QUOTE(_this call FUNC(deserializeState_module)); + idc = 28424; + x = 0; + y = 0; + w = QUOTE(W_PART(26)); + h = QUOTE(H_PART(4)); + class controls { + class Title2: RscText { + idc = -1; + text = CSTRING(SerializeString_Module_State); + toolTip = ""; + x = 0; + y = 0; + w = QUOTE(W_PART(10)); + h = QUOTE(H_PART(1)); + colorBackground[] = {0,0,0,0.5}; + }; + class SerializeString: RscEdit { + idc = 18112; + canModify = 1; + x = QUOTE(W_PART(10.1)); + y = 0; + w = QUOTE(W_PART(15.9)); + h = QUOTE(H_PART(1)); + style = "0x00 + 0x40 + 0x200"; + shadow = 1; + colorBackground[] = {0, 0, 0, 0.7}; + text = ""; + }; + }; + }; + }; + }; + class ButtonOK: ButtonOK {}; + class ButtonCancel: ButtonCancel {}; + }; +}; + diff --git a/include/z/ace/addons/medical_engine/script_macros_medical.hpp b/include/z/ace/addons/medical_engine/script_macros_medical.hpp index 56c1eec40..c9adf691e 100644 --- a/include/z/ace/addons/medical_engine/script_macros_medical.hpp +++ b/include/z/ace/addons/medical_engine/script_macros_medical.hpp @@ -124,9 +124,11 @@ #define DEFAULT_BANDAGE_REOPENING_MIN_DELAY 120 #define DEFAULT_BANDAGE_REOPENING_MAX_DELAY 200 -#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0] +#define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] -#define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0] +#define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] + +#define DEFAULT_BODYPART_DAMAGE_VALUES [0,0,0,0,0,0,0,0,0,0,0,0] // Triage colors, for consistency across UIs and functions #define TRIAGE_COLOR_NONE 0, 0, 0, 0.9 @@ -160,6 +162,7 @@ #define VAR_OPEN_WOUNDS QEGVAR(medical,openWounds) #define VAR_BANDAGED_WOUNDS QEGVAR(medical,bandagedWounds) #define VAR_STITCHED_WOUNDS QEGVAR(medical,stitchedWounds) +#define VAR_BODYPART_DAMAGE QEGVAR(medical,bodyPartDamage) // These variables track gradual adjustments (from medication, etc.) #define VAR_MEDICATIONS QEGVAR(medical,medications) // These variables track the current state of status values above @@ -188,6 +191,7 @@ #define GET_BANDAGED_WOUNDS(unit) (unit getVariable [VAR_BANDAGED_WOUNDS, createHashMap]) #define GET_STITCHED_WOUNDS(unit) (unit getVariable [VAR_STITCHED_WOUNDS, createHashMap]) #define GET_DAMAGE_THRESHOLD(unit) (unit getVariable [QEGVAR(medical,damageThreshold), [EGVAR(medical,AIDamageThreshold),EGVAR(medical,playerDamageThreshold)] select (isPlayer unit)]) +#define GET_BODYPART_DAMAGE(unit) (unit getVariable [VAR_BODYPART_DAMAGE, DEFAULT_BODYPART_DAMAGE_VALUES]) // The following function calls are defined here just for consistency #define GET_BLOOD_LOSS(unit) ([unit] call EFUNC(medical_status,getBloodLoss)) @@ -204,3 +208,24 @@ // Ignore UAV/Drone AI Base Classes #define IGNORE_BASE_UAVPILOTS "B_UAV_AI", "O_UAV_AI", "UAV_AI_base_F" + +#define VAR_SPO2 QEGVAR(medical,spo2) +#define DEFAULT_SPO2 97 +#define VAR_OXYGEN_DEMAND QEGVAR(medical,oxygenDemand) + +#define PRIORITY_HEAD 3 +#define PRIORITY_BODY 4 +#define PRIORITY_LEFT_ARM (1 + random 1) +#define PRIORITY_RIGHT_ARM (1 + random 1) +#define PRIORITY_LEFT_LEG (1 + random 1) +#define PRIORITY_RIGHT_LEG (1 + random 1) +#define PRIORITY_STRUCTURAL 1 + + +#define CARDIAC_OUTPUT_MIN EGVAR(medical,const_minCardiacOutput) +// don't change, these reflect hard coded engine behaviour +#define DAMAGED_MIN_THRESHOLD 0.45 +#define LIMPING_MIN_DAMAGE 0.5 + +#define UNCON_ANIM(var1) DOUBLES(GVAR(uncon_anim),var1) +#define QUNCON_ANIM(var1) QUOTE(UNCON_ANIM(var1)) \ No newline at end of file