diff --git a/TO_MERGE/cse/sys_medical/CfgFactionClasses.h b/TO_MERGE/cse/sys_medical/CfgFactionClasses.h
new file mode 100644
index 0000000000..19f4307cb5
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgFactionClasses.h
@@ -0,0 +1,7 @@
+class CfgFactionClasses
+{
+ class NO_CATEGORY;
+ class cse_medical: NO_CATEGORY {
+ displayName = "CSE Medical";
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/CfgFunctions.h b/TO_MERGE/cse/sys_medical/CfgFunctions.h
new file mode 100644
index 0000000000..88845199f1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgFunctions.h
@@ -0,0 +1,157 @@
+class CfgFunctions {
+ class CSE {
+ class Medical {
+ file = "cse\cse_sys_medical\functions";
+ class initForUnit_CMS { recompile = 1; };
+ class getSelectedBodyPart_CMS { recompile = 1; };
+ class getBandageOptions_CMS { recompile = 1; };
+ class getAdvancedOptions_CMS { recompile = 1; };
+ class getExamineOptions_CMS { recompile = 1; };
+ class getAirwayOptions_CMS { recompile = 1; };
+ class getMedicationOptions_CMS { recompile = 1; };
+ class getToggleOptions_CMS { recompile = 1; };
+ class getTriageCardOptions_CMS { recompile = 1; };
+ class getDragOptions_CMS { recompile = 1; };
+ class getOptionsForCategory_CMS { recompile = 1; };
+ class updateAttributes_CMS { recompile = 1; };
+ class getBloodLoss_CMS { recompile = 1; };
+ class effectsLoop_CMS { recompile = 1; };
+ class inMedicalFacility_CMS { recompile = 1; };
+ class medicClass_CMS { recompile = 1; };
+ class playInjuredSound_CMS { recompile = 1; };
+ class setDead_CMS { recompile = 1; };
+ class setMedicRole_CMS { recompile = 1; };
+ class assignMedicRoles_CMS { recompile = 1;};
+ class assignMedicalFacility_CMS { recompile = 1;};
+ class assignMedicalVehicle_CMS { recompile = 1; };
+ class assignMedicalEquipment_CMS { recompile = 1; };
+ class addOpenWounds_CMS { recompile = 1; };
+ class isMedicalVehicle_CMS { recompile = 1; };
+ class canAccessMedicalEquipment_CMS;
+ class hasMedicalEnabled_CMS { recompile = 1; };
+ class placeInBodyBag_CMS { recompile = 1; };
+ class canPutInBodyBag_CMS { recompile = 1; };
+ class hasOpenWounds_CMS { recompile = 1; };
+ };
+
+ class Blood {
+ file = "cse\cse_sys_medical\functions\blood";
+ class BloodConditions_CMS { recompile = 1; };
+ class cardiacArrest_CMS { recompile = 1; };
+ };
+
+ class ActivityLog {
+ file = "cse\cse_sys_medical\functions\activityLog";
+ class addActivityToLog_CMS { recompile = 1; };
+ class getActivityLog_CMS { recompile = 1; };
+ class addToQuickViewLog_CMS { recompile = 1; };
+ class getQuickViewLog_CMS { recompile = 1; };
+ };
+
+ class MedicalUI {
+ file = "cse\cse_sys_medical\functions\ui";
+ class openMenu_CMS { recompile = 1; };
+ class onMenuOpen_CMS { recompile = 1; };
+ class updateUIInfo_CMS { recompile = 1; };
+ class displayOptions_CMS { recompile = 1; };
+ class updateActivityLog_CMS { recompile = 1; };
+ class updateBodyImg_CMS { recompile = 1; };
+ class dropDownTriageCard_CMS { recompile = 1; };
+ class updateIcons_CMS { recompile = 1; };
+ class getCurrentSelectedInjuryData_CMS { recompile = 1; };
+ };
+
+ class handleDamage {
+ file = "cse\cse_sys_medical\functions\handledamage";
+ class handleDamage_CMS { recompile = 1; };
+ class getBodyPartNumber_CMS { recompile = 1; };
+ class getNewDamageBodyPart_CMS { recompile = 1; };
+ class getTypeOfDamage_CMS { recompile = 1; };
+ class assignOpenWounds_CMS { recompile = 1; };
+ class assignFractures_CMS { recompile = 1; };
+ class assignAirwayStatus_CMS { recompile = 1; };
+ class determineIfFatal_CMS { recompile = 1; };
+ class determineIfUnconscious_CMS { recompile = 1; };
+ class reactionToHit_CMS { recompile = 1; };
+ class increasePain_CMS { recompile = 1; };
+ class damageBodyPart_CMS { recompile = 1; };
+
+ };
+ class BasicMedical {
+ file = "cse\cse_sys_medical\functions\basic";
+ class basicBandage_CMS { recompile = 1; };
+ class fromNumberToBodyPart_CMS { recompile = 1; };
+ };
+
+ class MedicalTreatment {
+ file = "cse\cse_sys_medical\functions\treatment";
+ class treatmentMutex_CMS { recompile = 1; };
+ class isSetTreatmentMutex_CMS { recompile = 1; };
+ class bandage_CMS { recompile = 1; };
+ class bandageLocal_CMS { recompile = 1; };
+ class bandageOpening_CMS { recompile = 1; };
+ class iv_CMS { recompile = 1; };
+ class ivLocal_CMS { recompile = 1; };
+ class medication_CMS { recompile = 1; };
+ class medicationLocal_CMS { recompile = 1; };
+ class removeTourniquet_CMS { recompile = 1; };
+ class tourniquet_CMS { recompile = 1; };
+ class tourniquetLocal_CMS { recompile = 1; };
+ class hasTourniquetAppliedTo_CMS {recompile = 1; };
+ class performCPR_CMS { recompile = 1; };
+ class performCPRLocal_CMS { recompile = 1; };
+ class performCPRProvider_CMS { recompile = 1; };
+ class performCPRSuccess_CMS { recompile = 1; };
+ class heal_CMS { recompile = 1; };
+ class healLocal_CMS { recompile = 1; };
+ class handleHeal_CMS { recompile = 1; };
+ class treatmentAirway_CMS { recompile = 1; };
+ class treatmentAirwayLocal_CMS { recompile = 1; };
+ class hasEquipment_CMS { recompile = 1; };
+ class useEquipment_CMS { recompile = 1; };
+ class performStitching_CMS { recompile = 1; };
+ };
+
+ class MedicalDrag {
+ file = "cse\cse_sys_medical\functions\drag";
+ class switchBody_CMS { recompile = 1; };
+ class drag_CMS { recompile = 1; };
+ class carry_CMS { recompile = 1; };
+ class drop_CMS { recompile = 1; };
+ };
+
+ class MedicalLoading {
+ file = "cse\cse_sys_medical\functions\loading";
+ class load_CMS { recompile = 1; };
+ class loadLocal_CMS { recompile = 1; };
+ class unload_CMS { recompile = 1; };
+ };
+
+ class MedicalExamine {
+ file = "cse\cse_sys_medical\functions\examine";
+ class checkPulseLocal_CMS { recompile = 1; };
+ class checkBloodPressureLocal_CMS { recompile = 1; };
+ class checkPulse_CMS { recompile = 1; };
+ class checkBloodPressure_CMS { recompile = 1; };
+ class checkResponse_CMS { recompile = 1; };
+ };
+
+ class TriageCard {
+ file = "cse\cse_sys_medical\functions\triage";
+ class getTriageList_CMS { recompile = 1; };
+ class addToTriageList_CMS { recompile = 1; };
+ class setTriageStatus_CMS { recompile = 1; };
+ class getTriageStatus_CMS { recompile = 1; };
+ };
+
+ class Vitals {
+ file = "cse\cse_sys_medical\functions\vitals";
+ class updateVitals_CMS { recompile = 1; };
+ class getHeartRateChange_CMS { recompile = 1; };
+ class getBloodVolumeChange_CMS { recompile = 1; };
+ class getBloodPressure_CMS { recompile = 1; };
+ class addHeartRateAdjustment_CMS { recompile = 1; };
+ class getCardiacOutput_CMS { recompile = 1; };
+ };
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/CfgHints.h b/TO_MERGE/cse/sys_medical/CfgHints.h
new file mode 100644
index 0000000000..ac1b693273
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgHints.h
@@ -0,0 +1,38 @@
+class CfgHints
+{
+ class Combat_Space_Enhancement
+ {
+ displayName = "Combat Space Enhancement";
+ class CSE_CMS_Module
+ {
+ displayName = "Combat Medical System";
+ displayNameShort = "Combat Medical System";
+ description = "Combat Medical System is an advanced medical system for players and AI.";
+ tip = "";
+ arguments[] = {};
+ image = "";
+ noImage = true;
+ };
+ class Assessment
+ {
+ displayName = "Patient Assessment";
+ displayNameShort = "Patient Assessment";
+ description = "It is essential when treating a casualty that you fully assess each of the areas of the casualty to determine not only the injuries but the priority of each in severity.
You cna assess a patient by clicking on the Assessment ICON
Use Check Pulse, check Blood Pressure and Check Response to get an overview.";
+ tip = "Medics will get a faster and more accurate result when assessing patients.";
+ arguments[] = {};
+ image = "";
+ noImage = true;
+ };
+
+ class Bleeding
+ {
+ displayName = "Bandaging a wound";
+ displayNameShort = "Bandaging a wound";
+ description = "For casualties the first priority is to stop the bleeding. You will want to bandage the largest wounds first, before attending to the smaller ones.
You can apply a tourniquet on the limbs to stem the bleeding faster, but remember to remove it!";
+ tip = "Select a wound in the injury list to bandage that one first!";
+ arguments[] = {};
+ image = "";
+ noImage = true;
+ };
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/CfgMagazines.h b/TO_MERGE/cse/sys_medical/CfgMagazines.h
new file mode 100644
index 0000000000..d3f2e51356
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgMagazines.h
@@ -0,0 +1,224 @@
+class CfgMagazines
+{
+ class Default;
+ class CA_magazine: Default{};
+ class cse_backwardsCompatMagazineBase_CMS: CA_magazine {};
+ class cse_bandage_basic: cse_backwardsCompatMagazineBase_CMS
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_BANDAGE_BASIC_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\field_dressing.paa";
+ model = "\cse\cse_sys_medical\equipment\bandages\fielddressing.p3d";
+ descriptionShort = $STR_CSE_MAG_BANDAGE_BASIC_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BANDAGE_BASIC_DESC_USE;
+ mass = 0.5;
+ };
+ class cse_packing_bandage: cse_backwardsCompatMagazineBase_CMS
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_PACKING_BANDAGE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\packing_bandage.paa";
+ descriptionShort = $STR_CSE_MAG_PACKING_BANDAGE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_PACKING_BANDAGE_DESC_USE;
+ mass = 1;
+ // model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
+ model = "\cse\cse_sys_medical\equipment\bandages\packingbandage.p3d";
+ };
+ class cse_bandageElastic: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_BANDAGE_ELASTIC_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\bandageElastic.paa";
+ model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
+ descriptionShort = $STR_CSE_MAG_BANDAGE_ELASTIC_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BANDAGE_ELASTIC_DESC_USE;
+ mass = 1;
+ };
+ class cse_tourniquet: cse_backwardsCompatMagazineBase_CMS
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_TOURNIQUET_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\tourniquet.paa";
+ model = "\cse\cse_sys_medical\equipment\Tourniquet.p3d";
+ descriptionShort = $STR_CSE_MAG_TOURNIQUET_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_TOURNIQUET_DESC_USE;
+ mass = 1;
+ };
+ class cse_splint: cse_backwardsCompatMagazineBase_CMS
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_SPLINT_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\splint.paa";
+ descriptionUse = $STR_CSE_MAG_SPLINT_DESC_USE;
+ descriptionShort = $STR_CSE_MAG_SPLINT_DESC_SHORT;
+ mass = 1;
+ };
+ class cse_morphine: cse_backwardsCompatMagazineBase_CMS
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_MORPHINE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\morphine.paa";
+ model = "\cse\cse_sys_medical\equipment\Morphinpen.p3d";
+ descriptionShort = $STR_CSE_MAG_MORPHINE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_MORPHINE_DESC_USE;
+ mass = 1;
+ };
+ class cse_atropine: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_ATROPINE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\atropine.paa";
+ model = "\cse\cse_sys_medical\equipment\Atropin-pen.p3d";
+ descriptionShort = $STR_CSE_MAG_ATROPINE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_ATROPINE_DESC_USE;
+ mass = 1;
+ };
+ class cse_epinephrine: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_EPINEPHRINE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\epinephrine.paa";
+ model = "\cse\cse_sys_medical\equipment\Epipen.p3d";
+ descriptionShort = $STR_CSE_MAG_EPINEPHRINE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_EPINEPHRINE_DESC_USE;
+ mass = 1;
+ };
+ class cse_plasma_iv: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ mass = 1;
+ displayName = $STR_CSE_MAG_PLASMA_IV;
+ picture = "\cse\cse_sys_medical\equipment\img\plasma_iv.paa";
+ descriptionShort = $STR_CSE_MAG_PLASMA_IV_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_PLASMA_IV_DESC_USE;
+ };
+ class cse_plasma_iv_500: cse_plasma_iv {
+ displayName = $STR_CSE_MAG_PLASMA_IV_500;
+ };
+ class cse_plasma_iv_250: cse_plasma_iv_500 {
+ displayName = $STR_CSE_MAG_PLASMA_IV_250;
+ };
+ class cse_blood_iv: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ mass = 1;
+ model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
+ displayName = $STR_CSE_MAG_BLOOD_IV;
+ picture = "\cse\cse_sys_medical\equipment\img\bloodbag.paa";
+ descriptionShort = $STR_CSE_MAG_BLOOD_IV_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BLOOD_IV_DESC_USE;
+ };
+ class cse_blood_iv_500: cse_blood_iv {
+ displayName = $STR_CSE_MAG_BLOOD_IV_500;
+ };
+ class cse_blood_iv_250: cse_blood_iv_500 {
+ displayName = $STR_CSE_MAG_BLOOD_IV_250;
+ };
+ class cse_saline_iv: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ mass = 1;
+ displayName = $STR_CSE_MAG_SALINE_IV;
+ picture = "\cse\cse_sys_medical\equipment\img\saline_iv.paa";
+ descriptionShort = $STR_CSE_MAG_SALINE_IV_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_SALINE_IV_DESC_USE;
+ };
+ class cse_saline_iv_500: cse_saline_iv {
+ displayName = $STR_CSE_MAG_SALINE_IV_500;
+ };
+ class cse_saline_iv_250: cse_saline_iv_500 {
+ displayName = $STR_CSE_MAG_SALINE_IV_250;
+ };
+ class cse_quikclot: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_QUIKCLOT_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\quickclot.paa";
+ descriptionShort = $STR_CSE_MAG_QUIKCLOT_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_QUIKCLOT_DESC_USE;
+ mass = 1;
+ };
+ class cse_nasopharyngeal_tube: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_NPA_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\nasopharyngeal_tube.paa";
+ descriptionUse = $STR_CSE_MAG_NPA_DESC_USE;
+ descriptionShort = $STR_CSE_MAG_NPA_DESC_SHORT;
+ mass = 1;
+ };
+ class cse_opa: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_OPA_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\nasopharyngeal_tube.paa";
+ descriptionShort = $STR_CSE_MAG_OPA_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_OPA_DESC_USE;
+ mass = 1;
+ };
+ class cse_liquidSkin: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_LIQUID_SKIN_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\liquidSkin.paa";
+ model = "\cse\cse_sys_medical\equipment\skinliquid.p3d";
+ descriptionShort = $STR_CSE_MAG_LIQUID_SKIN_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_LIQUID_SKIN_DESC_USE;
+ mass = 1;
+ };
+ class cse_chestseal: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_CHEST_SEAL_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\chestseal.paa";
+ descriptionShort = $STR_CSE_MAG_CHEST_SEAL_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_CHEST_SEAL_DESC_USE;
+ mass = 1;
+ };
+ class cse_personal_aid_kit: cse_backwardsCompatMagazineBase_CMS {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_AID_KIT_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\personal_aid_kit.paa";
+ model = "\cse\cse_sys_medical\equipment\Personal-aidkits\MTP.p3d";
+ descriptionShort = $STR_CSE_MAG_AID_KIT_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_AID_KIT_DESC_USE;
+ mass = 2;
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/CfgSounds.h b/TO_MERGE/cse/sys_medical/CfgSounds.h
new file mode 100644
index 0000000000..6249bbe13a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgSounds.h
@@ -0,0 +1,45 @@
+class CfgSounds
+{
+ class cse_heartbeat_fast_1
+ {
+ name = "cse_heartbeat_fast_1";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\fast_1.wav","db-1",1};
+ titles[] = {};
+ };
+ class cse_heartbeat_fast_2
+ {
+ name = "cse_heartbeat_fast_2";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\fast_2.wav","db-1",1};
+ titles[] = {};
+ };
+ class cse_heartbeat_fast_3
+ {
+ name = "cse_heartbeat_fast_3";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\fast_3.wav","db-1",1};
+ titles[] = {};
+ };
+ class cse_heartbeat_norm_1
+ {
+ name = "cse_heartbeat_norm_1";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\norm_1.wav","db-1",1};
+ titles[] = {};
+ };
+ class cse_heartbeat_norm_2
+ {
+ name = "cse_heartbeat_norm_2";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\norm_2.wav","db-1",1};
+ titles[] = {};
+ };
+ class cse_heartbeat_slow_1
+ {
+ name = "cse_heartbeat_slow_1";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\slow_1.wav","db-1",1};
+ titles[] = {};
+ };
+ class cse_heartbeat_slow_2
+ {
+ name = "cse_heartbeat_slow_2";
+ sound[] = {"cse\cse_sys_medical\sounds\heart_beats\slow_2.wav","db-1",1};
+ titles[] = {};
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/CfgVehicles.h b/TO_MERGE/cse/sys_medical/CfgVehicles.h
new file mode 100644
index 0000000000..f7f084a6e8
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgVehicles.h
@@ -0,0 +1,762 @@
+class CfgVehicles
+{
+ class Logic;
+ class Module_F: Logic {
+ class ArgumentsBaseUnits {
+ };
+ };
+ class cse_sys_medical: Module_F {
+ scope = 2;
+ displayName = "Combat Medical System [CSE]";
+ icon = "\cse\cse_main\data\cse_medical_module.paa";
+ category = "cse_medical";
+ function = "cse_fnc_initalizeModule_F";
+ functionPriority = 1;
+ isGlobal = 1;
+ isTriggerActivated = 0;
+ author = "Combat Space Enhancement";
+ class Arguments {
+ class openingOfWounds {
+ displayName = "Advanced Wounds";
+ description = "When set to true, bandaged wounds could on occasion re-open, resulting in new open wounds that need to be bandaged.";
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class medicSetting {
+ displayName = "Advanced Medic roles";
+ description = "Medics only are able to view the detailed information";
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+ class difficultySetting {
+ displayName = "Survival Difficulty";
+ description = "Select the aggressiveness of the medical simulation";
+ typeName = "NUMBER";
+ class values {
+ class recruit {
+ name = "Recruit";
+ value = 0.5;
+ };
+ class regular {
+ name = "Regular";
+ value = 1;
+ default = 1;
+ };
+ class veteran {
+ name = "Veteran";
+ value = 1.2;
+ };
+ class expert {
+ name = "Expert";
+ value = 1.5;
+ };
+ };
+ };
+ class enableFor {
+ displayName = "Enabled for";
+ description = "Select what units CMS will be enabled for";
+ typeName = "NUMBER";
+ class values {
+ class playableUnits {
+ name = "Players only";
+ value = 0;
+ default = 1;
+ };
+ class playableUnitsAndAI {
+ name = "Players and AI";
+ value = 1;
+ };
+ };
+ };
+ class enableAirway {
+ displayName = "Enable Airway";
+ description = "Should CMS Airway system be enabled?";
+ typeName = "NUMBER";
+ class values {
+ class enable {
+ name = "Yes";
+ value = 1;
+ };
+ class disable {
+ name = "No";
+ value = 0;
+ default = 1;
+ };
+ };
+ };
+ class vehCrashes {
+ displayName = "Vehicle Crashes";
+ description = "Enable injuries on vehicle crashes";
+ typeName = "BOOL";
+ defaultValue = 1;
+ };
+
+ class aidKitUponUsage {
+ displayName = "Disposable Aid kit";
+ description = "Is a personal aid kit disposable?";
+ typeName = "BOOL";
+ defaultValue = false;
+ };
+ class aidKitMedicsOnly {
+ displayName = "Medics only";
+ description = "Are aid kits restricted to medics only?";
+ typeName = "BOOL";
+ defaultValue = false;
+ };
+ class aidKitRestrictions {
+ displayName = "Aid kit";
+ description = "When can an Aid kit be used?";
+ typeName = "NUMBER";
+ class values {
+ class medFacility {
+ name = "Medical Facility";
+ value = 0;
+ default = 1;
+ };
+ class medFAcilityNoBleeding {
+ name = "Medical Facility & No bleeding";
+ value = 1;
+ };
+ class Everywhere {
+ name = "Everywhere";
+ value = 2;
+ };
+ class EverywhereNoBleeding {
+ name = "Everywhere & No Bleeding";
+ value = 3;
+ };
+ };
+ };
+ class bandageTime {
+ displayName = "Bandage Time";
+ description = "Time it takes for a bandage action to be completed";
+ typeName = "NUMBER";
+ defaultValue = 5;
+ };
+ class stitchingAllow {
+ displayName = "Can Stitch";
+ description = "What units can use stitching?";
+ typeName = "NUMBER";
+ defaultValue = 0;
+ class values {
+ class medicsOnly {
+ name = "Medics Only";
+ value = 0;
+ default = 1;
+ };
+ class everyone {
+ name = "Everyone";
+ value = 1;
+ };
+ class noOne {
+ name = "No units";
+ value = -1;
+ };
+ };
+ };
+
+ };
+ class ModuleDescription {
+ description = "Provides a more realistic medical system for both players and AI."; // Short description, will be formatted as structured text
+ sync[] = {};
+ };
+ };
+ class cse_assignMedicRoles_CMS: Module_F {
+ scope = 2;
+ displayName = "Set Medic Class [CSE]";
+ icon = "\cse\cse_main\data\cse_medical_module.paa";
+ category = "cse_medical";
+ function = "cse_fnc_assignMedicRoles_CMS";
+ functionPriority = 10;
+ isGlobal = 2;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "Combat Space Enhancement";
+ class Arguments {
+ class EnableList {
+ displayName = "List";
+ description = "List of unit names that will be classified as medic, separated by commas.";
+ defaultValue = "";
+ };
+ class class {
+ displayName = "Is Medic";
+ description = "Medics allow for more advanced treatment in case of Advanced Medic roles enabled";
+ typeName = "BOOL";
+ defaultValue = true;
+ };
+ };
+ class ModuleDescription {
+ description = "Assigns the CSE medic class to a unit"; // Short description, will be formatted as structured text
+ sync[] = {};
+ };
+ };
+
+ class cse_assignMedicalVehicle_CMS: Module_F {
+ scope = 2;
+ displayName = "set Medical Vehicle [CSE]";
+ icon = "\cse\cse_main\data\cse_medical_module.paa";
+ category = "cse_medical";
+ function = "cse_fnc_assignMedicalVehicle_CMS";
+ functionPriority = 10;
+ isGlobal = 2;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "Combat Space Enhancement";
+ class Arguments {
+ class EnableList {
+ displayName = "List";
+ description = "List of object names that will be classified as medical vehicle, separated by commas.";
+ defaultValue = "";
+ };
+ class enabled {
+ displayName = "Is Medical Vehicle";
+ description = "Whatever or not the objects in the list will be a medical vehicle.";
+ typeName = "BOOL";
+ defaultValue = true;
+ };
+ };
+ class ModuleDescription {
+ description = "Assigns the CSE medical vehicle class to a vehicle.";
+ sync[] = {};
+ };
+ };
+
+ class cse_assignMedicalFacility_CMS: Module_F {
+ scope = 2;
+ displayName = "Set Medical Facility [CSE]";
+ icon = "\cse\cse_main\data\cse_medical_module.paa";
+ category = "cse_medical";
+ function = "cse_fnc_assignMedicalFacility_CMS";
+ functionPriority = 10;
+ isGlobal = 2;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "Combat Space Enhancement";
+ class Arguments {
+ class class {
+ displayName = "Is Medical Facility";
+ description = "Registers an object as a medical facility for CMS";
+ typeName = "BOOL";
+ };
+ };
+ class ModuleDescription {
+ description = "Defines an object as a medical facility for CMS. This allows for more advanced treatments. Can be used on buildings and vehicles. ";
+ sync[] = {};
+ };
+ };
+ class cse_assignMedicalEquipment_CMS: Module_F {
+ scope = 2;
+ displayName = "Assign Medical Equipment [CSE]";
+ icon = "\cse\cse_main\data\cse_medical_module.paa";
+ category = "cse_medical";
+ function = "cse_fnc_assignMedicalEquipment_CMS";
+ functionPriority = 1;
+ isGlobal = 1;
+ isTriggerActivated = 0;
+ author = "Combat Space Enhancement";
+ class Arguments {
+ class equipment {
+ displayName = "Assign Equipment";
+ description = "Assign Medical equipment to all players";
+ typeName = "NUMBER";
+ defaultValue = 0;
+ class values {
+ class AllPlayers {
+ name = "All Players";
+ value = 0;
+ default = 1;
+ };
+ class MedicsOnly {
+ name = "Medics only";
+ value = 1;
+ };
+ };
+ };
+ };
+ class ModuleDescription {
+ description = "Assigns medical equipment to units";
+ sync[] = {};
+ };
+ };
+
+
+ class MapBoard_altis_F;
+ class cse_bodyBag: MapBoard_altis_F {
+ scope = 1;
+ side = -1;
+ model = "\cse\cse_sys_medical\equipment\bodybag.p3d";
+ icon = "";
+ displayName = $STR_CSE_MAG_BODYBAG_DISPLAY;
+ };
+
+
+ class Item_Base_F;
+ class cse_bandage_basicItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_BANDAGE_BASIC_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_bandage_basic
+ {
+ name = "cse_bandage_basic";
+ count = 1;
+ };
+ };
+ };
+ class cse_packing_bandageItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_PACKING_BANDAGE_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_packing_bandage
+ {
+ name = "cse_packing_bandage";
+ count = 1;
+ };
+ };
+ };
+ class cse_bandageElasticItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_BANDAGE_ELASTIC_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_bandageElastic
+ {
+ name = "cse_bandageElastic";
+ count = 1;
+ };
+ };
+ };
+ class cse_tourniquetItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_TOURNIQUET_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_tourniquet
+ {
+ name = "cse_tourniquet";
+ count = 1;
+ };
+ };
+ };
+ class cse_splintItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_SPLINT_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_splint
+ {
+ name = "cse_splint";
+ count = 1;
+ };
+ };
+ };
+ class cse_morphineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_MORPHINE_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_morphine
+ {
+ name = "cse_morphine";
+ count = 1;
+ };
+ };
+ };
+ class cse_atropineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_ATROPINE_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_atropine
+ {
+ name = "cse_atropine";
+ count = 1;
+ };
+ };
+ };
+ class cse_epinephrineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_EPINEPHRINE_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_epinephrine
+ {
+ name = "cse_epinephrine";
+ count = 1;
+ };
+ };
+ };
+ class cse_plasma_ivItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_PLASMA_IV;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_plasma_iv
+ {
+ name = "cse_plasma_iv";
+ count = 1;
+ };
+ };
+ };
+ class cse_plasma_iv_500Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_PLASMA_IV_500;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_plasma_iv_500
+ {
+ name = "cse_plasma_iv_500";
+ count = 1;
+ };
+ };
+ };
+ class cse_plasma_iv_250Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_PLASMA_IV_250;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_plasma_iv_250
+ {
+ name = "cse_plasma_iv_250";
+ count = 1;
+ };
+ };
+ };
+ class cse_blood_ivItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_BLOOD_IV;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_blood_iv
+ {
+ name = "cse_blood_iv";
+ count = 1;
+ };
+ };
+ };
+ class cse_blood_iv_500Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_BLOOD_IV_500;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_blood_iv_500
+ {
+ name = "cse_blood_iv_500";
+ count = 1;
+ };
+ };
+ };
+ class cse_blood_iv_250Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_BLOOD_IV_250;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_blood_iv_250
+ {
+ name = "cse_blood_iv_250";
+ count = 1;
+ };
+ };
+ };
+ class cse_saline_ivItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_SALINE_IV;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_saline_iv
+ {
+ name = "cse_saline_iv";
+ count = 1;
+ };
+ };
+ };
+ class cse_saline_iv_500Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_SALINE_IV_500;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_saline_iv_500
+ {
+ name = "cse_saline_iv_500";
+ count = 1;
+ };
+ };
+ };
+ class cse_saline_iv_250Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_SALINE_IV_250;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_saline_iv_250
+ {
+ name = "cse_saline_iv_250";
+ count = 1;
+ };
+ };
+ };
+ class cse_quikclotItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_QUIKCLOT_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_quikclot
+ {
+ name = "cse_quikclot";
+ count = 1;
+ };
+ };
+ };
+ class cse_nasopharyngeal_tubeItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_NPA_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_nasopharyngeal_tube
+ {
+ name = "cse_nasopharyngeal_tube";
+ count = 1;
+ };
+ };
+ };
+ class cse_opaItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_OPA_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_opa
+ {
+ name = "cse_opa";
+ count = 1;
+ };
+ };
+ };
+ class cse_liquidSkinItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_LIQUID_SKIN_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_liquidSkin
+ {
+ name = "cse_liquidSkin";
+ count = 1;
+ };
+ };
+ };
+ class cse_chestsealItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_CHEST_SEAL_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_chestseal
+ {
+ name = "cse_chestseal";
+ count = 1;
+ };
+ };
+ };
+ class cse_personal_aid_kitItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_AID_KIT_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_personal_aid_kit
+ {
+ name = "cse_personal_aid_kit";
+ count = 1;
+ };
+ };
+ };
+ class cse_bodyBagItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_CSE_MAG_BODYBAG_DISPLAY;
+ author = "Combat Space Enhancement";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class cse_itemBodyBag
+ {
+ name = "cse_itemBodyBag";
+ count = 1;
+ };
+ };
+ };
+
+
+ class NATO_Box_Base;
+ class cse_medical_supply_crate_cms : NATO_Box_Base {
+ scope = 2;
+ accuracy = 1000;
+ displayName = "Medical Supply Crate (CSE)";
+ model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
+ author = "Combat Space Enhancement";
+ class TransportItems {
+ class cse_bandage_basic {
+ name = "cse_bandage_basic";
+ count = 25;
+ };
+ class cse_packing_bandage {
+ name = "cse_packing_bandage";
+ count = 25;
+ };
+ class cse_tourniquet {
+ name = "cse_tourniquet";
+ count = 25;
+ };
+ class cse_splint {
+ name = "cse_splint";
+ count = 25;
+ };
+ class cse_plasma_iv {
+ name = "cse_plasma_iv";
+ count = 25;
+ };
+ class cse_plasma_iv_500 {
+ name = "cse_plasma_iv_500";
+ count = 25;
+ };
+ class cse_plasma_iv_250 {
+ name = "cse_plasma_iv_250";
+ count = 25;
+ };
+ class cse_blood_iv {
+ name = "cse_blood_iv";
+ count = 25;
+ };
+ class cse_blood_iv_500 {
+ name = "cse_blood_iv_500";
+ count = 25;
+ };
+ class cse_blood_iv_250 {
+ name = "cse_blood_iv_250";
+ count = 25;
+ };
+ class cse_saline_iv {
+ name = "cse_saline_iv";
+ count = 25;
+ };
+ class cse_saline_iv_500 {
+ name = "cse_saline_iv_500";
+ count = 25;
+ };
+ class cse_saline_iv_250 {
+ name = "cse_saline_iv_250";
+ count = 25;
+ };
+ class cse_morphine {
+ name = "cse_morphine";
+ count = 25;
+ };
+ class cse_epinephrine {
+ name = "cse_epinephrine";
+ count = 25;
+ };
+ class cse_atropine {
+ name = "cse_atropine";
+ count = 25;
+ };
+ class cse_quikclot {
+ name = "cse_quikclot";
+ count = 25;
+ };
+ class cse_nasopharyngeal_tube {
+ name = "cse_nasopharyngeal_tube";
+ count = 25;
+ };
+ class cse_bandageElastic {
+ name = "cse_bandageElastic";
+ count = 25;
+ };
+ class cse_liquidSkin {
+ name = "cse_liquidSkin";
+ count = 25;
+ };
+ class cse_chestseal {
+ name = "cse_chestseal";
+ count = 25;
+ };
+ class cse_personal_aid_kit {
+ name = "cse_personal_aid_kit";
+ count = 25;
+ };
+ class cse_surgical_kit {
+ name = "cse_surgical_kit";
+ count = 25;
+ };
+ class cse_itemBodyBag {
+ name = "cse_itemBodyBag";
+ count = 5;
+ };
+ };
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/CfgWeapons.h b/TO_MERGE/cse/sys_medical/CfgWeapons.h
new file mode 100644
index 0000000000..02bfc614c4
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/CfgWeapons.h
@@ -0,0 +1,317 @@
+class CfgWeapons {
+ class ItemCore;
+ class InventoryItem_Base_F;
+ class cse_bandage_basic: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_BANDAGE_BASIC_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\field_dressing.paa";
+ model = "\cse\cse_sys_medical\equipment\bandages\fielddressing.p3d";
+ descriptionShort = $STR_CSE_MAG_BANDAGE_BASIC_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BANDAGE_BASIC_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=0.5;
+ type=201;
+ };
+ };
+ class cse_packing_bandage: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_PACKING_BANDAGE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\packing_bandage.paa";
+ descriptionShort = $STR_CSE_MAG_PACKING_BANDAGE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_PACKING_BANDAGE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ model = "\cse\cse_sys_medical\equipment\bandages\packingbandage.p3d";
+ };
+ class cse_bandageElastic: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_BANDAGE_ELASTIC_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\bandageElastic.paa";
+ model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
+ descriptionShort = $STR_CSE_MAG_BANDAGE_ELASTIC_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BANDAGE_ELASTIC_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_tourniquet: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_TOURNIQUET_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\tourniquet.paa";
+ model = "\cse\cse_sys_medical\equipment\Tourniquet.p3d";
+ descriptionShort = $STR_CSE_MAG_TOURNIQUET_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_TOURNIQUET_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_splint: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_SPLINT_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\splint.paa";
+ descriptionUse = $STR_CSE_MAG_SPLINT_DESC_USE;
+ descriptionShort = $STR_CSE_MAG_SPLINT_DESC_SHORT;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_morphine: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_MORPHINE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\morphine.paa";
+ model = "\cse\cse_sys_medical\equipment\Morphinpen.p3d";
+ descriptionShort = $STR_CSE_MAG_MORPHINE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_MORPHINE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_atropine: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_ATROPINE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\atropine.paa";
+ model = "\cse\cse_sys_medical\equipment\Atropin-pen.p3d";
+ descriptionShort = $STR_CSE_MAG_ATROPINE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_ATROPINE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_epinephrine: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_EPINEPHRINE_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\epinephrine.paa";
+ model = "\cse\cse_sys_medical\equipment\Epipen.p3d";
+ descriptionShort = $STR_CSE_MAG_EPINEPHRINE_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_EPINEPHRINE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_plasma_iv: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ displayName = $STR_CSE_MAG_PLASMA_IV;
+ picture = "\cse\cse_sys_medical\equipment\img\plasma_iv.paa";
+ descriptionShort = $STR_CSE_MAG_PLASMA_IV_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_PLASMA_IV_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_plasma_iv_500: cse_plasma_iv {
+ displayName = $STR_CSE_MAG_PLASMA_IV_500;
+ };
+ class cse_plasma_iv_250: cse_plasma_iv_500 {
+ displayName = $STR_CSE_MAG_PLASMA_IV_250;
+ };
+ class cse_blood_iv: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
+ displayName = $STR_CSE_MAG_BLOOD_IV;
+ picture = "\cse\cse_sys_medical\equipment\img\bloodbag.paa";
+ descriptionShort = $STR_CSE_MAG_BLOOD_IV_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BLOOD_IV_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_blood_iv_500: cse_blood_iv {
+ displayName = $STR_CSE_MAG_BLOOD_IV_500;
+ };
+ class cse_blood_iv_250: cse_blood_iv_500 {
+ displayName = $STR_CSE_MAG_BLOOD_IV_250;
+ };
+ class cse_saline_iv: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ displayName = $STR_CSE_MAG_SALINE_IV;
+ picture = "\cse\cse_sys_medical\equipment\img\saline_iv.paa";
+ descriptionShort = $STR_CSE_MAG_SALINE_IV_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_SALINE_IV_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_saline_iv_500: cse_saline_iv {
+ displayName = $STR_CSE_MAG_SALINE_IV_500;
+ };
+ class cse_saline_iv_250: cse_saline_iv_500 {
+ displayName = $STR_CSE_MAG_SALINE_IV_250;
+ };
+ class cse_quikclot: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_QUIKCLOT_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\quickclot.paa";
+ descriptionShort = $STR_CSE_MAG_QUIKCLOT_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_QUIKCLOT_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_nasopharyngeal_tube: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_NPA_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\nasopharyngeal_tube.paa";
+ descriptionUse = $STR_CSE_MAG_NPA_DESC_USE;
+ descriptionShort = $STR_CSE_MAG_NPA_DESC_SHORT;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_opa: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_OPA_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\nasopharyngeal_tube.paa";
+ descriptionShort = $STR_CSE_MAG_OPA_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_OPA_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_liquidSkin: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_LIQUID_SKIN_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\liquidSkin.paa";
+ model = "\cse\cse_sys_medical\equipment\skinliquid.p3d";
+ descriptionShort = $STR_CSE_MAG_LIQUID_SKIN_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_LIQUID_SKIN_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_chestseal: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_CHEST_SEAL_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\chestseal.paa";
+ descriptionShort = $STR_CSE_MAG_CHEST_SEAL_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_CHEST_SEAL_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class cse_personal_aid_kit: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_CSE_MAG_AID_KIT_DISPLAY;
+ picture = "\cse\cse_sys_medical\equipment\img\personal_aid_kit.paa";
+ model = "\cse\cse_sys_medical\equipment\Personal-aidkits\MTP.p3d";
+ descriptionShort = $STR_CSE_MAG_AID_KIT_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_AID_KIT_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=2;
+ type=201;
+ };
+ };
+ class cse_surgical_kit: ItemCore
+ {
+ scope=2;
+ displayName= $STR_CSE_MAG_SURGICALKIT_DISPLAY;
+ model="\cse\cse_sys_medical\equipment\surgical_kit.p3d";
+ picture="\cse\cse_sys_medical\equipment\img\surgical_kit.paa";
+ descriptionShort = $STR_CSE_MAG_SURGICALKIT_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_SURGICALKIT_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass= 5;
+ type=201;
+ };
+ };
+ class cse_itemBodyBag: ItemCore
+ {
+ scope=2;
+ displayName= $STR_CSE_MAG_BODYBAG_DISPLAY;
+ model="\cse\cse_sys_medical\equipment\bodybagItem.p3d";
+ picture="\cse\cse_sys_medical\equipment\img\bodybag.paa";
+ descriptionShort = $STR_CSE_MAG_BODYBAG_DESC_SHORT;
+ descriptionUse = $STR_CSE_MAG_BODYBAG_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass= 15;
+ type=201;
+ };
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/Combat_Space_Enhancement.h b/TO_MERGE/cse/sys_medical/Combat_Space_Enhancement.h
new file mode 100644
index 0000000000..1b043d924a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/Combat_Space_Enhancement.h
@@ -0,0 +1,49 @@
+#define MENU_KEYBINDING 1
+#define ACTION_KEYBINDING 2
+#define CLIENT_SETTING 3
+
+class Combat_Space_Enhancement {
+ class cfgModules {
+ class cse_sys_medical {
+ init = "call compile preprocessFile 'cse\cse_sys_medical\init_sys_medical.sqf';";
+ name = "Combat Medical System";
+ class EventHandlers {
+ class CAManBase {
+ init = "_this call cse_fnc_initForUnit_CMS;";
+ handleDamage = "_this call cse_fnc_handleDamage_CMS;";
+ handleHeal = "_this call cse_fnc_handleHeal_CMS;";
+ killed = "_this call cse_eh_killed_CMS;";
+ local = "_this call cse_eh_local_CMS;";
+ };
+ };
+ class Configurations {
+ class combat_medical_system_openMenu {
+ type = MENU_KEYBINDING;
+ title = $STR_OPEN_CMS_MENU_TITLE;
+ description = $STR_OPEN_CMS_MENU_DESC;
+ value[] = {0,0,0,0};
+ onPressed = "[] call cse_fnc_openMenu_CMS";
+ idd = 314412;
+ };
+ };
+ };
+ };
+
+ class CustomEventHandlers {
+ class getMedicationOptions_CMS {}; // [target]
+ class getExamineOptions_CMS {}; // [target]
+ class getDragOptions_CMS {}; // [target]
+ class getBandageOptions_CMS {}; // [target]
+ class getAirwayOptions_CMS {}; // [target]
+ class getAdvancedOptions_CMS {}; // [target]
+ class onDropInjured {}; // [_caller, _unit, number (0=from drag, 1=from carry)]
+ class onDragInjured {}; // [_caller, _unit]
+ class onCarryInjured {}; // [_caller, _unit]
+
+ class setUnconsciousState {
+ class cse_sys_medical_onUnconscious {
+ onCall = "_this call cse_fnc_onUnconscious_CMS;";
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/bodyParts.h b/TO_MERGE/cse/sys_medical/bodyParts.h
new file mode 100644
index 0000000000..1838cecfd1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/bodyParts.h
@@ -0,0 +1,6 @@
+#define HEAD 0
+#define TORSO 1
+#define ARM_R 2
+#define ARM_L 3
+#define LEG_R 4
+#define LEG_L 5
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/config.cpp b/TO_MERGE/cse/sys_medical/config.cpp
new file mode 100644
index 0000000000..dcc8ad4f36
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/config.cpp
@@ -0,0 +1,37 @@
+#define _ARMA_
+class CfgPatches
+{
+ class cse_sys_medical
+ {
+ units[] = {"cse_medical_supply_crate_cms", "cse_bandage_basicItem","cse_packing_bandageItem","cse_bandageElasticItem","cse_tourniquetItem","cse_splintItem","cse_morphineItem","cse_atropineItem","cse_epinephrineItem","cse_plasma_ivItem","cse_plasma_iv_500Item","cse_plasma_iv250Item","cse_blood_ivItem","cse_blood_iv_500Item","cse_blood_iv_250Item","cse_saline_ivItem","cse_saline_iv_500Item","cse_saline_iv_250Item","cse_quikclotItem","cse_nasopharyngeal_tubeItem","cse_opaItem","cse_liquidSkinItem","cse_chestsealItem","cse_personal_aid_kitItem"};
+ weapons[] = {"cse_surgical_kit"};
+ requiredVersion = 0.1;
+ requiredAddons[] = {"cse_gui","cse_main"};
+ version = "0.10.0_rc";
+ author[] = {"Combat Space Enhancement"};
+ authorUrl = "http://csemod.com";
+ };
+};
+class CfgAddons {
+ class PreloadAddons {
+ class cse_sys_medical {
+ list[] = {"cse_sys_medical"};
+ };
+ };
+};
+#include "CfgFactionClasses.h"
+#include "CfgFunctions.h"
+
+// TODO To be removed at a later stage, as it is being replaced by items (CfgWeapons.h). Will stay around for backwards compatability for now.
+// #include "CfgMagazines.h"
+
+// Replacing the old magazine approach by items.
+#include "CfgWeapons.h"
+
+
+#include "CfgSounds.h"
+#include "CfgVehicles.h"
+#include "CfgHints.h"
+#include "Combat_Space_Enhancement.h"
+#include "ui\define.hpp"
+#include "ui\menu.hpp"
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/data/body_arm_left.paa b/TO_MERGE/cse/sys_medical/data/body_arm_left.paa
new file mode 100644
index 0000000000..245cc4ba31
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_arm_left.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_arm_right.paa b/TO_MERGE/cse/sys_medical/data/body_arm_right.paa
new file mode 100644
index 0000000000..2023d1e0b4
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_arm_right.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_arms.paa b/TO_MERGE/cse/sys_medical/data/body_arms.paa
new file mode 100644
index 0000000000..b4b272f73d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_arms.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_background.paa b/TO_MERGE/cse/sys_medical/data/body_background.paa
new file mode 100644
index 0000000000..d3f7440e68
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_background.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_head.paa b/TO_MERGE/cse/sys_medical/data/body_head.paa
new file mode 100644
index 0000000000..77ddd995bc
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_head.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_img-arms.paa b/TO_MERGE/cse/sys_medical/data/body_img-arms.paa
new file mode 100644
index 0000000000..f469a59359
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_img-arms.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_img-head.paa b/TO_MERGE/cse/sys_medical/data/body_img-head.paa
new file mode 100644
index 0000000000..2f7d15e1ca
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_img-head.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_img-legs.paa b/TO_MERGE/cse/sys_medical/data/body_img-legs.paa
new file mode 100644
index 0000000000..35f68d8635
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_img-legs.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_img-torso.paa b/TO_MERGE/cse/sys_medical/data/body_img-torso.paa
new file mode 100644
index 0000000000..cc5ecb9d60
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_img-torso.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_leg_left.paa b/TO_MERGE/cse/sys_medical/data/body_leg_left.paa
new file mode 100644
index 0000000000..a116305258
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_leg_left.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_leg_right.paa b/TO_MERGE/cse/sys_medical/data/body_leg_right.paa
new file mode 100644
index 0000000000..02ce66ba70
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_leg_right.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_legs.paa b/TO_MERGE/cse/sys_medical/data/body_legs.paa
new file mode 100644
index 0000000000..9af3adc2ca
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_legs.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/body_torso.paa b/TO_MERGE/cse/sys_medical/data/body_torso.paa
new file mode 100644
index 0000000000..0a7212ac95
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/body_torso.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/border_arm_left.paa b/TO_MERGE/cse/sys_medical/data/border_arm_left.paa
new file mode 100644
index 0000000000..eae1d751cf
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/border_arm_left.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/border_arm_right.paa b/TO_MERGE/cse/sys_medical/data/border_arm_right.paa
new file mode 100644
index 0000000000..0aea4ce20e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/border_arm_right.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/border_head.paa b/TO_MERGE/cse/sys_medical/data/border_head.paa
new file mode 100644
index 0000000000..3b2e7aaf10
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/border_head.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/border_leg_left.paa b/TO_MERGE/cse/sys_medical/data/border_leg_left.paa
new file mode 100644
index 0000000000..7ff3b170fa
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/border_leg_left.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/border_leg_right.paa b/TO_MERGE/cse/sys_medical/data/border_leg_right.paa
new file mode 100644
index 0000000000..bef0f70779
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/border_leg_right.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/border_torso.paa b/TO_MERGE/cse/sys_medical/data/border_torso.paa
new file mode 100644
index 0000000000..2b70076939
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/border_torso.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/buttonDisabled_gradient.paa b/TO_MERGE/cse/sys_medical/data/buttonDisabled_gradient.paa
new file mode 100644
index 0000000000..43b1b8d100
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/buttonDisabled_gradient.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient.paa b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient.paa
new file mode 100644
index 0000000000..2210f98741
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient2.paa b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient2.paa
new file mode 100644
index 0000000000..cabe6c7fed
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient2.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient3.paa b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient3.paa
new file mode 100644
index 0000000000..7da9fbcf8a
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient3.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient_top.paa b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient_top.paa
new file mode 100644
index 0000000000..904e1a62f7
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/buttonNormal_gradient_top.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/cse_background_img.paa b/TO_MERGE/cse/sys_medical/data/cse_background_img.paa
new file mode 100644
index 0000000000..de59065e3b
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/cse_background_img.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/advanced_treatment_small.paa b/TO_MERGE/cse/sys_medical/data/icons/advanced_treatment_small.paa
new file mode 100644
index 0000000000..8becb9d2df
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/advanced_treatment_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/airway_management_small.paa b/TO_MERGE/cse/sys_medical/data/icons/airway_management_small.paa
new file mode 100644
index 0000000000..ab4da47958
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/airway_management_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/bandage_fracture_small.paa b/TO_MERGE/cse/sys_medical/data/icons/bandage_fracture_small.paa
new file mode 100644
index 0000000000..a869f260ec
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/bandage_fracture_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/examine_patient_small.paa b/TO_MERGE/cse/sys_medical/data/icons/examine_patient_small.paa
new file mode 100644
index 0000000000..2e9fc9831d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/examine_patient_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_advanced_treatment.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_advanced_treatment.paa
new file mode 100644
index 0000000000..d6bf6effd9
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_advanced_treatment.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_airway_management.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_airway_management.paa
new file mode 100644
index 0000000000..f444f5f385
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_airway_management.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_bandage_fracture.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_bandage_fracture.paa
new file mode 100644
index 0000000000..df8d1de571
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_bandage_fracture.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_bleeding.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_bleeding.paa
new file mode 100644
index 0000000000..d11c2ed496
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_bleeding.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_carry.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_carry.paa
new file mode 100644
index 0000000000..7ebb830b03
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_carry.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_examine_patient.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_examine_patient.paa
new file mode 100644
index 0000000000..12eb06c890
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_examine_patient.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_medication.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_medication.paa
new file mode 100644
index 0000000000..98893ad863
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_medication.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_toggle_self.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_toggle_self.paa
new file mode 100644
index 0000000000..3078eb5dd5
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_toggle_self.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_tourniquet.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_tourniquet.paa
new file mode 100644
index 0000000000..8b34a7bfbb
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_tourniquet.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_tourniquet_small.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_tourniquet_small.paa
new file mode 100644
index 0000000000..a457e2c0d5
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_tourniquet_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/icon_triage_card.paa b/TO_MERGE/cse/sys_medical/data/icons/icon_triage_card.paa
new file mode 100644
index 0000000000..850ab0f4ce
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/icon_triage_card.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/medication_small.paa b/TO_MERGE/cse/sys_medical/data/icons/medication_small.paa
new file mode 100644
index 0000000000..b6acd670c8
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/medication_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/toggle_self_small.paa b/TO_MERGE/cse/sys_medical/data/icons/toggle_self_small.paa
new file mode 100644
index 0000000000..73108e5a98
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/toggle_self_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/icons/triage_card_small.paa b/TO_MERGE/cse/sys_medical/data/icons/triage_card_small.paa
new file mode 100644
index 0000000000..92eb0f0d20
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/icons/triage_card_small.paa differ
diff --git a/TO_MERGE/cse/sys_medical/data/ui_background.paa b/TO_MERGE/cse/sys_medical/data/ui_background.paa
new file mode 100644
index 0000000000..f1c42c7d7d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/data/ui_background.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Atropin-pen.p3d b/TO_MERGE/cse/sys_medical/equipment/Atropin-pen.p3d
new file mode 100644
index 0000000000..84d210518d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Atropin-pen.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Atropin-pen_used.p3d b/TO_MERGE/cse/sys_medical/equipment/Atropin-pen_used.p3d
new file mode 100644
index 0000000000..ba2e4c4c38
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Atropin-pen_used.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Bandage elastic.p3d b/TO_MERGE/cse/sys_medical/equipment/Bandage elastic.p3d
new file mode 100644
index 0000000000..1ada83c00e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Bandage elastic.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Bandage-Pack.p3d b/TO_MERGE/cse/sys_medical/equipment/Bandage-Pack.p3d
new file mode 100644
index 0000000000..4e48818373
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Bandage-Pack.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Bandage-elastic.p3d b/TO_MERGE/cse/sys_medical/equipment/Bandage-elastic.p3d
new file mode 100644
index 0000000000..1b29b17f7c
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Bandage-elastic.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Epipen.p3d b/TO_MERGE/cse/sys_medical/equipment/Epipen.p3d
new file mode 100644
index 0000000000..437e15c0bb
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Epipen.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Epipen_used.p3d b/TO_MERGE/cse/sys_medical/equipment/Epipen_used.p3d
new file mode 100644
index 0000000000..5359c83a23
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Epipen_used.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Morphinpen.p3d b/TO_MERGE/cse/sys_medical/equipment/Morphinpen.p3d
new file mode 100644
index 0000000000..af3f03ec6a
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Morphinpen.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Morphinpen_used.p3d b/TO_MERGE/cse/sys_medical/equipment/Morphinpen_used.p3d
new file mode 100644
index 0000000000..80489bd74d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Morphinpen_used.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/DPM-wood.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/DPM-wood.p3d
new file mode 100644
index 0000000000..dad1a7880e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/DPM-wood.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Flecktarn-desert.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Flecktarn-desert.p3d
new file mode 100644
index 0000000000..2597ddd826
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Flecktarn-desert.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Flecktarn-wood.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Flecktarn-wood.p3d
new file mode 100644
index 0000000000..13502cb0fa
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Flecktarn-wood.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/MTP.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/MTP.p3d
new file mode 100644
index 0000000000..fb5ee9fddc
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/MTP.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-desert.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-desert.p3d
new file mode 100644
index 0000000000..9ee93c126d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-desert.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-grey.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-grey.p3d
new file mode 100644
index 0000000000..8464bbb9eb
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-grey.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-wood.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-wood.p3d
new file mode 100644
index 0000000000..a3599f3ace
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Marpat-wood.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Multicam.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Multicam.p3d
new file mode 100644
index 0000000000..51651d7144
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/Multicam.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/DPM-Desert.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/DPM-Desert.paa
new file mode 100644
index 0000000000..94478b8c58
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/DPM-Desert.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/DPM-wood.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/DPM-wood.paa
new file mode 100644
index 0000000000..435fdd434c
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/DPM-wood.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Flecktarn-desert.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Flecktarn-desert.paa
new file mode 100644
index 0000000000..a4beb7de20
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Flecktarn-desert.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Flecktarn-wood.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Flecktarn-wood.paa
new file mode 100644
index 0000000000..1def142a27
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Flecktarn-wood.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/MTP_co.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/MTP_co.paa
new file mode 100644
index 0000000000..660ebe3477
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/MTP_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Marpat-grey.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Marpat-grey.paa
new file mode 100644
index 0000000000..8b3fc21a60
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Marpat-grey.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Marpat-wood.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Marpat-wood.paa
new file mode 100644
index 0000000000..94e2187dc2
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Marpat-wood.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Mulitcam.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Mulitcam.paa
new file mode 100644
index 0000000000..3e55892c84
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Mulitcam.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit.rvmat b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit.rvmat
new file mode 100644
index 0000000000..5da2e3099b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit.rvmat
@@ -0,0 +1,32 @@
+ambient[]={1,1,1,1};
+diffuse[]={0.5,0.5,0.5,1};
+forcedDiffuse[]={0.5,0.5,0.5,0};
+emmisive[]={0,0,0,1};
+specular[]={0.30000001,0.30000001,0.30000001,0};
+specularPower=100;
+PixelShaderID="NormalMapSpecularDIMap";
+VertexShaderID="NormalMap";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\Personal-aidkits\data\Personalaidkit_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="cse\cse_sys_medical\equipment\Personal-aidkits\data\Personalaidkit_smdi.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,1};
+ pos[]={0,0,0};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit_nohq.paa
new file mode 100644
index 0000000000..0d03b45372
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit_smdi.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit_smdi.paa
new file mode 100644
index 0000000000..2fb8bec533
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/Personalaidkit_smdi.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/marpat-desert.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/marpat-desert.paa
new file mode 100644
index 0000000000..6b9262427b
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/data/marpat-desert.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/dpm-desert.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/dpm-desert.p3d
new file mode 100644
index 0000000000..a94b619260
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/dpm-desert.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/MTP_cross.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/MTP_cross.p3d
new file mode 100644
index 0000000000..017426e3f8
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/MTP_cross.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-desert_cross.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-desert_cross.p3d
new file mode 100644
index 0000000000..2a8dfa1c88
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-desert_cross.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-grey_cross.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-grey_cross.p3d
new file mode 100644
index 0000000000..1e1e4a846e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-grey_cross.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-wood_cross.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-wood_cross.p3d
new file mode 100644
index 0000000000..4116d04741
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Marpat-wood_cross.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Multicam_cross.p3d b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Multicam_cross.p3d
new file mode 100644
index 0000000000..459f25ae24
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/Multicam_cross.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/MTP-cross.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/MTP-cross.paa
new file mode 100644
index 0000000000..4f6fea84ee
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/MTP-cross.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-desert-cross.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-desert-cross.paa
new file mode 100644
index 0000000000..1069ce681c
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-desert-cross.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-grey-cross.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-grey-cross.paa
new file mode 100644
index 0000000000..773080a8e4
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-grey-cross.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-wood-cross.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-wood-cross.paa
new file mode 100644
index 0000000000..1d5fa1f674
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/Marpat-wood-cross.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/multicam-cross.paa b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/multicam-cross.paa
new file mode 100644
index 0000000000..e7a0460256
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personal-aidkits/mediccross/data/multicam-cross.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Personalaidkit.p3d b/TO_MERGE/cse/sys_medical/equipment/Personalaidkit.p3d
new file mode 100644
index 0000000000..e121de645d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Personalaidkit.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/QuickClot.p3d b/TO_MERGE/cse/sys_medical/equipment/QuickClot.p3d
new file mode 100644
index 0000000000..25a596f9e5
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/QuickClot.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/Tourniquet.p3d b/TO_MERGE/cse/sys_medical/equipment/Tourniquet.p3d
new file mode 100644
index 0000000000..31330499cd
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/Tourniquet.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing.p3d b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing.p3d
new file mode 100644
index 0000000000..53c53ac9fa
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing.rvmat b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing.rvmat
new file mode 100644
index 0000000000..c643c4f0c1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing.rvmat
@@ -0,0 +1,32 @@
+ambient[]={1,1,1,1};
+diffuse[]={0.5,0.5,0.5,1};
+forcedDiffuse[]={0.5,0.5,0.5,0};
+emmisive[]={0,0,0,1};
+specular[]={0.30000001,0.30000001,0.30000001,0};
+specularPower=57.799999;
+PixelShaderID="NormalMapSpecularDIMap";
+VertexShaderID="NormalMap";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\bandages\fielddressing_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="cse\cse_sys_medical\equipment\bandages\fielddressing_smdi.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,1};
+ pos[]={0,0,0};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_color.paa b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_color.paa
new file mode 100644
index 0000000000..7d68a365c2
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_color.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_garbage.p3d b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_garbage.p3d
new file mode 100644
index 0000000000..f3eed095d3
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_garbage.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_nohq.paa
new file mode 100644
index 0000000000..c66785cf13
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_smdi.paa b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_smdi.paa
new file mode 100644
index 0000000000..96376989f7
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/fielddressing_smdi.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage.p3d b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage.p3d
new file mode 100644
index 0000000000..0c530a097f
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage.rvmat b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage.rvmat
new file mode 100644
index 0000000000..df5beda1a4
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage.rvmat
@@ -0,0 +1,32 @@
+ambient[]={1,1,1,1};
+diffuse[]={0.5,0.5,0.5,1};
+forcedDiffuse[]={0.5,0.5,0.5,0};
+emmisive[]={0,0,0,1};
+specular[]={0.30000001,0.30000001,0.30000001,0};
+specularPower=57.799999;
+PixelShaderID="NormalMapSpecularDIMap";
+VertexShaderID="NormalMap";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\bandages\packingbandage_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="cse\cse_sys_medical\equipment\bandages\packingbandage_smdi.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,1};
+ pos[]={0,0,0};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_color.paa b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_color.paa
new file mode 100644
index 0000000000..54b1f75e2e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_color.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_garbage.p3d b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_garbage.p3d
new file mode 100644
index 0000000000..b0bbf671a3
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_garbage.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_nohq.paa
new file mode 100644
index 0000000000..1b3782c501
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_smdi.paa b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_smdi.paa
new file mode 100644
index 0000000000..8d5b3848ac
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bandages/packingbandage_smdi.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bodybag.p3d b/TO_MERGE/cse/sys_medical/equipment/bodybag.p3d
new file mode 100644
index 0000000000..854c46059c
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bodybag.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/bodybagItem.p3d b/TO_MERGE/cse/sys_medical/equipment/bodybagItem.p3d
new file mode 100644
index 0000000000..778752ca7e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/bodybagItem.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Atropinpen_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/Atropinpen_co.paa
new file mode 100644
index 0000000000..3e44836bee
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Atropinpen_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Epipen_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/Epipen_co.paa
new file mode 100644
index 0000000000..2a1afe1f33
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Epipen_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing.rvmat b/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing.rvmat
new file mode 100644
index 0000000000..e4c98edc42
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing.rvmat
@@ -0,0 +1,32 @@
+ambient[]={1,1,1,1};
+diffuse[]={0.5,0.5,0.5,1};
+forcedDiffuse[]={0.5,0.5,0.5,0};
+emmisive[]={0,0,0,1};
+specular[]={0.30000001,0.30000001,0.30000001,0};
+specularPower=57.799999;
+PixelShaderID="NormalMapSpecularDIMap";
+VertexShaderID="NormalMap";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\data\Field-Dressing_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="cse\cse_sys_medical\equipment\data\Field-Dressing_smdi.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,1};
+ pos[]={0,0,0};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing_nohq.paa
new file mode 100644
index 0000000000..6972636a3d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing_smdi.paa b/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing_smdi.paa
new file mode 100644
index 0000000000..f450605958
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Field-Dressing_smdi.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Field-dressing.paa b/TO_MERGE/cse/sys_medical/equipment/data/Field-dressing.paa
new file mode 100644
index 0000000000..07bae7d595
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Field-dressing.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Liquid-skin.paa b/TO_MERGE/cse/sys_medical/equipment/data/Liquid-skin.paa
new file mode 100644
index 0000000000..fda64304bc
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Liquid-skin.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Morphin_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/Morphin_co.paa
new file mode 100644
index 0000000000..8d91fd0e10
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Morphin_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/Tournequit_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/Tournequit_co.paa
new file mode 100644
index 0000000000..e83aada994
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/Tournequit_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bandage-elastic.paa b/TO_MERGE/cse/sys_medical/equipment/data/bandage-elastic.paa
new file mode 100644
index 0000000000..3164b5d4ca
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/bandage-elastic.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybag.rvmat b/TO_MERGE/cse/sys_medical/equipment/data/bodybag.rvmat
new file mode 100644
index 0000000000..d2955e1c4a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/data/bodybag.rvmat
@@ -0,0 +1,92 @@
+ambient[]={1.000000,1.000000,1.000000,1.000000};
+diffuse[]={1.000000,1.000000,1.000000,1.000000};
+forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
+emmisive[]={0.000000,0.000000,0.000000,1.000000};
+specular[]={0.703999,0.703999,0.703999,0.000000};
+specularPower=70.000000;
+PixelShaderID="Super";
+VertexShaderID="Super";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\data\bodybag_nohq.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage2
+{
+ texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage3
+{
+ texture="#(argb,8,8,3)color(0,0,0,0,MC)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage4
+{
+ texture="#(argb,8,8,3)color(1,1,1,1,AS)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage5
+{
+ texture="#(argb,8,8,3)color(0,0.05,1,1,SMDI)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage6
+{
+ texture="#(ai,32,128,1)fresnel(0.98,1.02)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage7
+{
+ texture="cse\cse_sys_medical\equipment\data\env_co.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem.rvmat b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem.rvmat
new file mode 100644
index 0000000000..8be756a025
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem.rvmat
@@ -0,0 +1,32 @@
+ambient[]={1.000000,1.000000,1.000000,1.000000};
+diffuse[]={1.000000,1.000000,1.000000,1.000000};
+forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
+emmisive[]={0.000000,0.000000,0.000000,1.000000};
+specular[]={1.000000,1.000000,1.000000,1.000000};
+specularPower=20.000000;
+PixelShaderID="NormalMapSpecularDIMap";
+VertexShaderID="NormalMap";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\data\bodybagItem_nohq.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
+class Stage2
+{
+ texture="cse\cse_sys_medical\equipment\data\bodybagItem_smdi.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1.000000,0.000000,0.000000};
+ up[]={0.000000,1.000000,0.000000};
+ dir[]={0.000000,0.000000,0.000000};
+ pos[]={0.000000,0.000000,0.000000};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_co.paa
new file mode 100644
index 0000000000..d04f8ec64c
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_nohq.paa
new file mode 100644
index 0000000000..5699ec5e04
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_smdi.paa b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_smdi.paa
new file mode 100644
index 0000000000..cf4cf805e3
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/bodybagItem_smdi.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybag_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/bodybag_co.paa
new file mode 100644
index 0000000000..21996761b7
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/bodybag_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/bodybag_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/data/bodybag_nohq.paa
new file mode 100644
index 0000000000..5c6b35c595
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/bodybag_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/env_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/env_co.paa
new file mode 100644
index 0000000000..77645347b5
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/env_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/quickclot_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/quickclot_co.paa
new file mode 100644
index 0000000000..bf0edccd7e
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/quickclot_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit.rvmat b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit.rvmat
new file mode 100644
index 0000000000..4af111299b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit.rvmat
@@ -0,0 +1,92 @@
+ambient[]={1,1,1,1};
+diffuse[]={1,1,1,1};
+forcedDiffuse[]={0,0,0,0};
+emmisive[]={0,0,0,1};
+specular[]={0.70399898,0.70399898,0.70399898,0};
+specularPower=70;
+PixelShaderID="Super";
+VertexShaderID="Super";
+class Stage1
+{
+ texture="cse\cse_sys_medical\equipment\data\surgical_kit_nohq.paa";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,0};
+ 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,0};
+ 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,0};
+ 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,0};
+ pos[]={0,0,0};
+ };
+};
+class Stage5
+{
+ texture="#(argb,8,8,3)color(0,0.05,1,1,SMDI)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,0};
+ pos[]={0,0,0};
+ };
+};
+class Stage6
+{
+ texture="#(ai,32,128,1)fresnel(0.98,1.02)";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,0};
+ pos[]={0,0,0};
+ };
+};
+class Stage7
+{
+ texture="cse\cse_sys_medical\equipment\data\env_co.tga";
+ uvSource="tex";
+ class uvTransform
+ {
+ aside[]={1,0,0};
+ up[]={0,1,0};
+ dir[]={0,0,0};
+ pos[]={0,0,0};
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_co.paa b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_co.paa
new file mode 100644
index 0000000000..3e622afe48
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_co.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_metal.rvmat b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_metal.rvmat
new file mode 100644
index 0000000000..65192a777f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_metal.rvmat
@@ -0,0 +1,22 @@
+ambient[]={1,1,1,0};
+diffuse[]={1,1,1,0};
+forcedDiffuse[]={0,0,0,0};
+emmisive[]={0,0,0,0};
+specular[]={0.5,0.5,0.5,0};
+specularPower=11.6;
+renderFlags[]=
+{
+ "NoAlphaWrite"
+};
+PixelShaderID="Glass";
+VertexShaderID="Glass";
+class Stage1
+{
+ texture="#(argb,8,8,3)color(1,1,1,0.9)";
+ uvSource="none";
+};
+class Stage2
+{
+ texture="a3\data_f\env_chrome_co.paa";
+ uvSource="none";
+};
diff --git a/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_nohq.paa b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_nohq.paa
new file mode 100644
index 0000000000..b8027515bc
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/data/surgical_kit_nohq.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/field_dressing.p3d b/TO_MERGE/cse/sys_medical/equipment/field_dressing.p3d
new file mode 100644
index 0000000000..a94a398b68
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/field_dressing.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/field_dressing_used.p3d b/TO_MERGE/cse/sys_medical/equipment/field_dressing_used.p3d
new file mode 100644
index 0000000000..7d6765db10
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/field_dressing_used.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/atropine.paa b/TO_MERGE/cse/sys_medical/equipment/img/atropine.paa
new file mode 100644
index 0000000000..49b79e99e5
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/atropine.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/bandageElastic.paa b/TO_MERGE/cse/sys_medical/equipment/img/bandageElastic.paa
new file mode 100644
index 0000000000..bbf7901ceb
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/bandageElastic.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/bloodbag.paa b/TO_MERGE/cse/sys_medical/equipment/img/bloodbag.paa
new file mode 100644
index 0000000000..489614bf44
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/bloodbag.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/bodybag.paa b/TO_MERGE/cse/sys_medical/equipment/img/bodybag.paa
new file mode 100644
index 0000000000..a3a7257fc3
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/bodybag.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/chestseal.paa b/TO_MERGE/cse/sys_medical/equipment/img/chestseal.paa
new file mode 100644
index 0000000000..be0f4f77bf
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/chestseal.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/epinephrine.paa b/TO_MERGE/cse/sys_medical/equipment/img/epinephrine.paa
new file mode 100644
index 0000000000..d4c556281a
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/epinephrine.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/field_dressing.paa b/TO_MERGE/cse/sys_medical/equipment/img/field_dressing.paa
new file mode 100644
index 0000000000..bfe11f2a07
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/field_dressing.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/liquidSkin.paa b/TO_MERGE/cse/sys_medical/equipment/img/liquidSkin.paa
new file mode 100644
index 0000000000..40e72038ec
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/liquidSkin.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/morphine.paa b/TO_MERGE/cse/sys_medical/equipment/img/morphine.paa
new file mode 100644
index 0000000000..16918da53f
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/morphine.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/nasopharyngeal_tube.paa b/TO_MERGE/cse/sys_medical/equipment/img/nasopharyngeal_tube.paa
new file mode 100644
index 0000000000..6629605519
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/nasopharyngeal_tube.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/packing_bandage.paa b/TO_MERGE/cse/sys_medical/equipment/img/packing_bandage.paa
new file mode 100644
index 0000000000..5825d17a77
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/packing_bandage.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/personal_aid_kit.paa b/TO_MERGE/cse/sys_medical/equipment/img/personal_aid_kit.paa
new file mode 100644
index 0000000000..87d6a1612f
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/personal_aid_kit.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/plasma_iv.paa b/TO_MERGE/cse/sys_medical/equipment/img/plasma_iv.paa
new file mode 100644
index 0000000000..31eb3e34df
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/plasma_iv.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/quickclot.paa b/TO_MERGE/cse/sys_medical/equipment/img/quickclot.paa
new file mode 100644
index 0000000000..8727b7d1d0
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/quickclot.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/saline_iv.paa b/TO_MERGE/cse/sys_medical/equipment/img/saline_iv.paa
new file mode 100644
index 0000000000..a957e36d7c
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/saline_iv.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/splint.paa b/TO_MERGE/cse/sys_medical/equipment/img/splint.paa
new file mode 100644
index 0000000000..87c1cb8686
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/splint.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/surgical_kit.paa b/TO_MERGE/cse/sys_medical/equipment/img/surgical_kit.paa
new file mode 100644
index 0000000000..e6b3533a12
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/surgical_kit.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/img/tourniquet.paa b/TO_MERGE/cse/sys_medical/equipment/img/tourniquet.paa
new file mode 100644
index 0000000000..1a0dace011
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/img/tourniquet.paa differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/skinliquid.p3d b/TO_MERGE/cse/sys_medical/equipment/skinliquid.p3d
new file mode 100644
index 0000000000..485457a54a
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/skinliquid.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/splint.p3d b/TO_MERGE/cse/sys_medical/equipment/splint.p3d
new file mode 100644
index 0000000000..42f3ad14b7
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/splint.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/equipment/surgical_kit.p3d b/TO_MERGE/cse/sys_medical/equipment/surgical_kit.p3d
new file mode 100644
index 0000000000..0c01cc8add
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/equipment/surgical_kit.p3d differ
diff --git a/TO_MERGE/cse/sys_medical/functions.sqf b/TO_MERGE/cse/sys_medical/functions.sqf
new file mode 100644
index 0000000000..53a52d84a7
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions.sqf
@@ -0,0 +1,65 @@
+/*
+functions.sqf
+Usage: compileFinals the function SQF files into variables for use
+Author: Glowbal
+
+Arguments: none
+Returns: none
+
+Affects: n/a
+Executes:
+*/
+
+cse_fnc_unitLoop_CMS = {
+ _unit = _this select 0;
+ if !(local _unit) exitwith{};
+ if !(_unit getvariable["cse_fnc_unitLoop_CMS",false]) then{
+ _unit setvariable ["cse_fnc_unitLoop_CMS",true];
+ };
+
+ if ([_unit] call cse_fnc_hasMedicalEnabled_CMS) then {
+ if (isnil "CSE_MEDICAL_COMBINED_LOOP_CMS") then {
+ CSE_MEDICAL_COMBINED_LOOP_CMS = [];
+ };
+ if (_unit in CSE_MEDICAL_COMBINED_LOOP_CMS) exitwith {};
+ CSE_MEDICAL_COMBINED_LOOP_CMS pushback _unit;
+ [format["Added %1 to unitLoop",_unit]] call cse_fnc_debug;
+ };
+};
+
+cse_fnc_onBodySwitch_CMS = {
+ private ["_unit","_newUnit"];
+ _unit = _this select 0;
+ _newUnit = _this select 1;
+ if (!dialog) exitwith{};
+ if (CSE_SYS_MEDICAL_INTERACTION_TARGET == _unit) then {
+ CSE_SYS_MEDICAL_INTERACTION_TARGET = _newUnit;
+ };
+};
+
+cse_eh_killed_CMS = {
+ private["_unit"];
+ _unit = _this select 0;
+ if (!local _unit) exitwith {};
+ [_unit, "cse_pain",0,true] call cse_fnc_setVariable;
+ [_unit, "cse_heartRate",0,true] call cse_fnc_setVariable;
+ [_unit, "cse_bloodPressure", [0,0],true] call cse_fnc_setVariable;
+ if (_unit getvariable["cse_unconscious_non_captive_f",false]) then {
+ _unit setCaptive false;
+ _unit setvariable["cse_unconscious_non_captive_f",nil];
+ };
+};
+
+cse_eh_local_CMS = {
+ private["_unit"];
+ _unit = _this select 0;
+ _local = _this select 1;
+ [format["Locality changed for: %1",_this]] call cse_fnc_Debug;
+ if (_local) then {
+ if (_unit getvariable["cse_fnc_unitLoop_CMS",false]) then {
+ [_unit] call cse_fnc_unitLoop_CMS;
+ };
+ } else {
+
+ };
+};
diff --git a/TO_MERGE/cse/sys_medical/functions/activityLog/fn_addActivityToLog_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_addActivityToLog_CMS.sqf
new file mode 100644
index 0000000000..57cf285406
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_addActivityToLog_CMS.sqf
@@ -0,0 +1,44 @@
+/**
+ * fn_addActivityToLog_CMS.sqf
+ * @Descr: adds an item to the activity log
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT, type STRING, message STRING]
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit","_caller","_type","_activity","_log"];
+
+_unit = _this select 0;
+_type = _this select 1;
+_message = _this select 2;
+
+if (!local _unit) exitwith {
+ [_this, "cse_fnc_addActivityToLog_CMS", _unit, false] spawn BIS_fnc_MP;
+};
+_lastNumber = date select 4;
+_moment = format["%1:%2",date select 3, _lastNumber];
+if (_lastNumber < 10) then {
+ _moment = format["%1:0%2",date select 3, _lastNumber];
+};
+
+
+_log = [_unit, "cse_activityLog_CMS"] call cse_fnc_getVariable;
+if (count _log >= 8) then {
+ _newLog = [];
+ _counter = 0;
+ {
+ // ensure the first element will not be added
+ if (_counter > 0) then {
+ _newLog pushback _x;
+ } else {
+ _counter = _counter + 1;
+ };
+ }foreach _log;
+ _log = _newLog;
+};
+_log pushback [_message,_moment,_type];
+
+[_unit, "cse_activityLog_CMS",_log] call cse_fnc_setVariable;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/activityLog/fn_addToQuickViewLog_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_addToQuickViewLog_CMS.sqf
new file mode 100644
index 0000000000..53088849a4
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_addToQuickViewLog_CMS.sqf
@@ -0,0 +1,42 @@
+/**
+ * fn_addToQuickViewLog_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit","_caller","_type","_activity","_log"];
+
+_unit = _this select 0;
+_type = _this select 1;
+_message = _this select 2;
+_lastNumber = date select 4;
+if (!local _unit) exitwith {
+ [_this, "cse_fnc_addToQuickViewLog_CMS", _unit, false] spawn BIS_fnc_MP;
+};
+_moment = format["%1:%2",date select 3, _lastNumber];
+if (_lastNumber < 10) then {
+ _moment = format["%1:0%2",date select 3, _lastNumber];
+};
+
+
+_log = [_unit,"cse_quickviewLog_CMS"] call cse_fnc_getVariable;
+if (count _log >= 8) then {
+ _newLog = [];
+ _counter = 0;
+ {
+ if (_counter > 0) then {
+ _newLog pushback _x;
+ } else {
+ _counter = _counter + 1;
+ };
+ }foreach _log;
+ _log = _newLog;
+};
+_log pushback [_message,_moment,_type];
+
+[_unit,"cse_quickviewLog_CMS",_log] call cse_fnc_setVariable;
diff --git a/TO_MERGE/cse/sys_medical/functions/activityLog/fn_getActivityLog_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_getActivityLog_CMS.sqf
new file mode 100644
index 0000000000..68d82d4cf5
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_getActivityLog_CMS.sqf
@@ -0,0 +1,22 @@
+/**
+ * fn_getActivityLog_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private["_unit"];
+_unit = _this select 0;
+_log = [_unit,"cse_activityLog_CMS"] call cse_fnc_getVariable;
+
+if (isnil "_log") then {
+ _log = [];
+};
+if (typeName _log != typeName []) then {
+ _log = [];
+};
+_log
diff --git a/TO_MERGE/cse/sys_medical/functions/activityLog/fn_getQuickViewLog_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_getQuickViewLog_CMS.sqf
new file mode 100644
index 0000000000..2e9e50d827
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/activityLog/fn_getQuickViewLog_CMS.sqf
@@ -0,0 +1,21 @@
+/**
+ * fn_getQuickViewLog_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private["_unit"];
+_unit = _this select 0;
+_log = [_unit,"cse_quickviewLog_CMS"] call cse_fnc_getVariable;
+if (isnil "_log") then {
+ _log = [];
+};
+if (typeName _log != typeName []) then {
+ _log = [];
+};
+_log
diff --git a/TO_MERGE/cse/sys_medical/functions/basic/fn_basicBandage_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/basic/fn_basicBandage_CMS.sqf
new file mode 100644
index 0000000000..80622fb40a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/basic/fn_basicBandage_CMS.sqf
@@ -0,0 +1,53 @@
+/**
+ * fn_basicBandage_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_removeItem = _this select 2;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_treatingPerson] call cse_fnc_treatmentMutex_CMS;
+
+if (!([_treatingPerson,_removeItem] call cse_fnc_hasMagazine)) exitwith { [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS; };
+ [_treatingPerson,_removeItem] call cse_fnc_useMagazine;
+if (dialog) then {
+ [] call cse_fnc_gui_refreshLastSubMenu;
+};
+
+if (vehicle _treatingPerson == _treatingPerson && (vehicle _injuredPerson == _injuredPerson)) then {
+ [_treatingPerson,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_broadcastAnim;
+};
+
+_spot = 0;
+_openWounds = [_injuredPerson,"cse_openWounds"] call cse_fnc_getvariable;
+_counter = 0;
+_highestTotal = 0;
+{
+ _totalNumber = 0;
+ {
+ _totalNumber = _totalNumber + _x;
+ }foreach _x;
+ if (_totalNumber > _highestTotal) then {
+ [format["_totalNumber vs _highestTotal",_totalNumber,_highestTotal]] call cse_fnc_debug;
+ _spot = _counter;
+ _highestTotal = _totalNumber;
+ };
+ _counter = _counter + 1;
+}foreach _openWounds;
+
+if (_spot < 0) exitwith { [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS; };
+_selectionName = [_spot] call cse_fnc_fromNumberToBodyPart_CMS;
+[format["CONVERTED NUMBER TO: %1 TO %2",_spot,_selectionName]] call cse_fnc_debug;
+_name = [_injuredPerson,"cse_name"] call cse_fnc_getVariable;
+_messageSend = formatText ["You apply a bandage on %1 - %2", _name,_selectionName];
+[_treatingPerson,_messageSend] call cse_fnc_sendHintTo;
+[[_injuredPerson, _treatingPerson, _selectionName, _removeItem], "cse_fnc_bandageLocal_CMS", _injuredPerson, false] spawn BIS_fnc_MP;
+
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/basic/fn_fromNumberToBodyPart_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/basic/fn_fromNumberToBodyPart_CMS.sqf
new file mode 100644
index 0000000000..1995516ba7
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/basic/fn_fromNumberToBodyPart_CMS.sqf
@@ -0,0 +1,38 @@
+/**
+ * fn_fromNumberToBodyPart_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_selectionName","_part"];
+_part = _this select 0;
+_selectionName = "";
+_selectionName = switch (_part) do {
+ case 0: {
+ "head"
+ };
+ case 1: {
+ "body"
+ };
+ case 2: {
+ "hand_l"
+ };
+ case 3: {
+ "hand_r"
+ };
+ case 4: {
+ "leg_l"
+ };
+ case 5: {
+ "leg_r"
+ };
+ default {
+ ""
+ };
+};
+_selectionName
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/blood/fn_bloodConditions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/blood/fn_bloodConditions_CMS.sqf
new file mode 100644
index 0000000000..c7bc6b68ce
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/blood/fn_bloodConditions_CMS.sqf
@@ -0,0 +1,58 @@
+/**
+ * fn_bloodConditions_CMS.sqf
+ * @Descr: Check if any of the unconscious or dead conditions are true for given unit and if so, make the relevant function calls.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECt, bloodVolume NUMBER, bloodPressure ARRAY, heartRate NUMBER]
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+
+private ["_unit","_bloodVolume","_bloodPressure","_heartRate","_bloodPressureL","_bloodPressureH","_bloodLoss"];
+_unit = _this select 0;
+_bloodVolume = _this select 1;
+_bloodPressure = _this select 2;
+_heartRate = _this select 3;
+
+if ((_unit getvariable["CSE_ENABLE_REVIVE_SETDEAD_F",0]) == 0) then {
+ _bloodPressureL = _bloodPressure select 0;
+ _bloodPressureH = _bloodPressure select 1;
+ if (!(_unit getvariable ["cse_cardiacArrest_CMS",false])) then {
+ if (_bloodPressureH > 260) then {
+ if (random(1) > 0.7) then {
+ [_unit] spawn cse_fnc_cardiacArrest_CMS;
+ };
+ };
+ if (_bloodPressureL < 40 && _heartRate > 190) then {
+ if (random(1) > 0.7) then {
+ [_unit] spawn cse_fnc_cardiacArrest_CMS;
+ };
+ };
+ if (_bloodPressureH > 145 && _heartRate > 150) then {
+ if (random(1) > 0.7) then {
+ [_unit] spawn cse_fnc_cardiacArrest_CMS;
+ };
+ };
+ if (_heartRate > 200) then {
+ [_unit] spawn cse_fnc_cardiacArrest_CMS;
+ };
+
+ if (_heartRate < 20) then {
+ [_unit] spawn cse_fnc_cardiacArrest_CMS;
+ };
+ };
+ if ([_unit] call cse_fnc_isAwake) then {
+ if (_bloodVolume < 60) then {
+ if (random(1) > 0.9) then {
+ [_unit] call cse_fnc_setUnconsciousState;
+ };
+ };
+ if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then {
+ [_unit] call cse_fnc_setUnconsciousState; // safety check to at least ensure unconsciousness for units if they are not dead already.
+ };
+ };
+};
+if (_bloodVolume < 30) then {
+ [_unit] call cse_fnc_setDead_CMS;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/blood/fn_cardiacArrest_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/blood/fn_cardiacArrest_CMS.sqf
new file mode 100644
index 0000000000..fb296aacb4
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/blood/fn_cardiacArrest_CMS.sqf
@@ -0,0 +1,37 @@
+/**
+ * fn_cardiacArrest_CMS.sqf
+ * @Descr: Triggers a unit into the Cardiac Arrest state from CMS. Will put the unit in an unconscious state and run a countdown timer until unit dies.
Timer is a random value between 120 and 720 seconds.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (The unit that will be put in cardiac arrest state)]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+
+private ["_unit", "_modifier","_timer","_counter", "_heartRate"];
+_unit = _this select 0;
+
+if (_unit getvariable ["cse_cardiacArrest_CMS",false]) exitwith {};
+[format["%1 is put into cardiac arrest",_unit]] call cse_fnc_debug;
+_unit setvariable ["cse_cardiacArrest_CMS", true,true];
+[_unit,"cse_heartRate", 0] call cse_fnc_setVariable;
+
+
+[_unit] call cse_fnc_setUnconsciousState;
+_counter = 120 + round(random(600));
+_timer = 0;
+while {(_timer < _counter && alive _unit)} do {
+ _heartRate = [_unit,"cse_heartRate"] call cse_fnc_getVariable;
+ if (_heartRate > 0) exitwith {
+ [format["%1 is moved out of cardiac: %2",_unit, _heartRate]] call cse_fnc_debug;
+ _unit setvariable ["cse_cardiacArrest_CMS", nil,true];
+ };
+ if (_counter - _timer < 1) exitwith {
+ [_unit] call cse_fnc_setDead_CMS;
+ };
+ sleep 1;
+ _timer = _timer + 1;
+};
+
+_unit setvariable ["cse_cardiacArrest_CMS", nil,true];
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/drag/fn_carry_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/drag/fn_carry_CMS.sqf
new file mode 100644
index 0000000000..c23b51af7c
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/drag/fn_carry_CMS.sqf
@@ -0,0 +1,103 @@
+/*
+ fnc_carry.sqf
+ Usage: makes the calling unit start carrying the specified unit
+ Author: Glowbal
+
+ Arguments: array [caller (object), target (object)]
+ 1: caller (OBJECT), Object of type Man
+ 2: target (OBJECT), Object of type Man
+ Returns: none
+
+ Affects: Caller and target locality
+ Executes: spawn
+*/
+
+private ["_caller", "_unit", "_positionUnit", "_killOnDrop"];
+_caller = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
+_unit = [_this, 1, objNull, [objNull]] call BIS_fnc_param;
+
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+
+if (!(_unit isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{ [_caller,"release"] call cse_fnc_treatmentMutex_CMS; };
+if (vehicle _caller != _caller || vehicle _unit != _unit) exitwith { [_caller,"release"] call cse_fnc_treatmentMutex_CMS;};
+
+if (!([_caller] call cse_fnc_canInteract) || {_caller == _unit} || {(([_unit] call cse_fnc_isAwake))}) exitwith {
+ ["cse_fnc_drag_CMS call failed condition: canInteract, equal, is awake"] call cse_fnc_debug;
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+
+if (([_caller] call cse_fnc_getCarriedObj) != _unit && !(isNull ([_caller] call cse_fnc_getCarriedObj)) || {!isNull(_unit getvariable ["cse_beingDragged_CMS",objNull]) || !isNull(_caller getvariable ["cse_dragging_CMS",objNull])} || {!isNull(_unit getvariable ["cse_beingCarried_CMS",objNull]) || !isNull(_caller getvariable ["cse_carrying_CMS",objNull])}) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+ ["carryobj reset"] call cse_fnc_debug;
+ [_caller,objNull] call cse_fnc_carryObj;
+};
+_killOnDrop = false;
+if (!alive _unit) then {
+ _killOnDrop = true;
+ _unit = [_unit,_caller] call cse_fnc_makeCopyOfBody_F;
+};
+if (isNull _unit) exitwith {};
+
+if !([_caller,_unit] call cse_fnc_carryObj) exitwith {
+ ["couldn't carry object!"] call cse_fnc_debug; [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+_unit setvariable ["cse_beingCarried_CMS",_caller,true];
+_caller setvariable ["cse_carrying_CMS",_unit,true];
+_caller selectWeapon (primaryWeapon _caller);
+
+[_caller,"acinpercmstpsraswrfldnon",true] call cse_fnc_broadcastAnim;
+_unit attachTo [_caller, [0.1, -0.1, -1.25], "LeftShoulder"];
+[_unit,"AinjPfalMstpSnonWnonDf_carried_dead",true] call cse_fnc_broadcastAnim;
+
+if (!isnil "CSE_DROP_ADDACTION_CMS") then {
+ _caller removeAction CSE_DROP_ADDACTION_CMS;
+ CSE_DROP_ADDACTION_CMS = nil;
+};
+
+CSE_DROP_ADDACTION_CMS = _caller addAction [format["Drop %1",[_unit] call cse_fnc_getName], {[_this select 1, _this select 2] call cse_fnc_drop_CMS;}];
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+
+[[_caller, _unit],"onCarryInjured"] call cse_fnc_customEventHandler_F;
+
+waituntil {((isNull ([_caller] call cse_fnc_getCarriedObj)) || !([_caller] call cse_fnc_isAwake) || !(vehicle _caller == _caller))};
+[_caller,ObjNull] call cse_fnc_carryObj;
+
+if (([_caller] call cse_fnc_isAwake)) then {
+ if (vehicle _unit == _unit) then {
+ if (([_unit] call cse_fnc_isAwake)) then {
+ [_unit,"",false] call cse_fnc_broadcastAnim;
+ } else {
+ [_unit,([_unit] call cse_fnc_getDeathAnim),false] call cse_fnc_broadcastAnim;
+ };
+ };
+ if (vehicle _caller == _caller) then {
+ [_caller,"",false] call cse_fnc_broadcastAnim;
+ };
+} else {
+ if (vehicle _unit == _unit) then {
+ if (([_unit] call cse_fnc_isAwake)) then {
+ [_unit,"",false] call cse_fnc_broadcastAnim;
+ } else {
+ [_unit,([_unit] call cse_fnc_getDeathAnim),false] call cse_fnc_broadcastAnim;
+ };
+ };
+};
+if (!surfaceIsWater getPos _caller) then {
+ sleep 0.5;
+ if (vehicle _unit == _unit) then {
+ if (vehicle _caller == _caller) then {
+ _positionUnit = getPosATL _unit;
+ _positionUnit set [2, (getPosATL _caller) select 2];
+ _unit setPosATL _positionUnit;
+ };
+ };
+};
+if (_killOnDrop) then {
+ _unit setDamage 1;
+};
+_unit setvariable ["cse_beingCarried_CMS",objNull,true];
+_caller setvariable ["cse_carrying_CMS",objNull,true];
+
+[[_caller, _unit, 1],"onDropInjured"] call cse_fnc_customEventHandler_F;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/drag/fn_drag_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/drag/fn_drag_CMS.sqf
new file mode 100644
index 0000000000..542f209392
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/drag/fn_drag_CMS.sqf
@@ -0,0 +1,115 @@
+/*
+fnc_drag.sqf
+Usage: makes the calling unit start dragging the specified unit
+Author: Glowbal
+
+Arguments: array [unit (object), unit (object)]
+ 1: Caller OBJECT. Unit that initiats the dragging
+ 2: Target OBJECT. Unit that will be dragged
+Returns: none
+
+Affects: Caller and target Locality
+Executes: spawn
+*/
+private ["_caller", "_unit", "_positionUnit", "_killOnDrop"];
+_caller = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
+_unit = [_this, 1, objNull, [objNull]] call BIS_fnc_param;
+
+["cse_fnc_drag_CMS has been called",2] call cse_fnc_debug;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+
+if (!(_unit isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;};
+if (vehicle _caller != _caller || vehicle _unit != _unit) exitwith { [_caller,"release"] call cse_fnc_treatmentMutex_CMS;};
+
+if (!([_caller] call cse_fnc_canInteract) || {_caller == _unit} || {(([_unit] call cse_fnc_isAwake))}) exitwith { ["cse_fnc_drag_CMS call failed condition: canInteract, equal, is awake"] call cse_fnc_debug;
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+
+if (([_caller] call cse_fnc_getCarriedObj) != _unit && !(isNull ([_caller] call cse_fnc_getCarriedObj)) || {!isNull(_unit getvariable ["cse_beingDragged_CMS",objNull]) || !isNull(_caller getvariable ["cse_dragging_CMS",objNull])}) exitwith {
+ ["carryobj reset"] call cse_fnc_debug;
+ [_caller,objNull] call cse_fnc_carryObj;
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+_caller action ["WeaponOnBack", _caller];
+
+
+_killOnDrop = false;
+if (!alive _unit) then {
+ _unit = [_unit,_caller] call cse_fnc_makeCopyOfBody_F;
+ _killOnDrop = true;
+ _unit playMove "AinjPpneMstpSnonWrflDb";
+};
+if (isNull _unit) exitwith {};
+
+if !([_caller,_unit,[0.125, 1.007, 0]] call cse_fnc_carryObj) exitwith { [_caller,"release"] call cse_fnc_treatmentMutex_CMS; };
+_unit setDir 180;
+[_unit,"AinjPpneMstpSnonWrflDb",true] call cse_fnc_broadcastAnim;
+_caller selectWeapon (primaryWeapon _caller);
+
+if (currentWeapon _caller == primaryWeapon _caller) then {
+ [_caller,"AcinPknlMstpSrasWrflDnon",true] call cse_fnc_localAnim;
+} else {
+ [_caller,"AcinPknlMstpSnonWnonDnon",true] call cse_fnc_localAnim;
+};
+
+_unit setvariable ["cse_beingDragged_CMS",_caller,true];
+_caller setvariable ["cse_dragging_CMS",_unit,true];
+if (!isnil "CSE_DROP_ADDACTION_CMS") then {
+_caller removeAction CSE_DROP_ADDACTION_CMS;
+ CSE_DROP_ADDACTION_CMS = nil;
+};
+CSE_DROP_ADDACTION_CMS = _caller addAction [format["Drop %1",[_unit] call cse_fnc_getName], {[_this select 1, _this select 2] call cse_fnc_drop_CMS;}];
+
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+
+[[_caller, _unit],"onDragInjured"] call cse_fnc_customEventHandler_F;
+
+waituntil {((isNull ([_caller] call cse_fnc_getCarriedObj)) || !([_caller] call cse_fnc_isAwake))};
+[_caller,ObjNull] call cse_fnc_carryObj;
+
+_unit setvariable ["cse_beingDragged_CMS",objNull,true];
+_caller setvariable ["cse_dragging_CMS",objNull,true];
+
+
+if (([_caller] call cse_fnc_isAwake)) then {
+ if (vehicle _unit == _unit) then {
+ if (([_unit] call cse_fnc_isAwake)) then {
+ [_unit,"AinjPpneMstpSnonWrflDb_release",false] call cse_fnc_broadcastAnim;
+ //[_unit,"aidlppnemstpsraswrfldnon0s",false] call cse_fnc_broadcastAnim;
+ } else {
+ [_unit,([_unit] call cse_fnc_getDeathAnim)] call cse_fnc_broadcastAnim;
+ };
+ };
+ if (vehicle _caller == _caller) then {
+ [_caller,"amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon",false] call cse_fnc_broadcastAnim;
+ };
+} else {
+ if (([_unit] call cse_fnc_isAwake)) then {
+ if (vehicle _unit == _unit) then {
+ [_unit,"AinjPpneMstpSnonWrflDb_release",false] call cse_fnc_broadcastAnim;
+ //[_unit,"aidlppnemstpsraswrfldnon0s",false] call cse_fnc_broadcastAnim;
+ } else {
+ [_unit,"",false] call cse_fnc_broadcastAnim;
+ };
+ } else {
+ [_unit,([_unit] call cse_fnc_getDeathAnim)] call cse_fnc_broadcastAnim;
+ };
+};
+if (!surfaceIsWater getPos _caller) then {
+ sleep 0.5;
+ if (vehicle _unit == _unit) then {
+ if (vehicle _caller == _caller) then {
+ _positionUnit = getPosATL _unit;
+ _positionUnit set [2, (getPosATL _caller) select 2];
+ _unit setPosATL _positionUnit;
+ };
+ };
+};
+
+if (_killOnDrop) then {
+ _unit setDamage 1;
+};
+
+[[_caller, _unit, 0],"onDropInjured"] call cse_fnc_customEventHandler_F;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/drag/fn_drop_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/drag/fn_drop_CMS.sqf
new file mode 100644
index 0000000000..29b4bc28b6
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/drag/fn_drop_CMS.sqf
@@ -0,0 +1,21 @@
+
+/*
+ fnc_drop.sqf
+ Usage: makes the calling unit start dragging the specified unit
+ Author: Glowbal
+
+ Arguments: array [unit (object), unit (object)]
+ Returns: none
+
+ Affects:
+ Executes:
+*/
+
+private ["_caller", "_unit","_info","_draggedPerson"];
+_caller = _this select 0;
+_unit = _this select 1;
+[_caller,objNull] call cse_fnc_carryObj;
+if (!isnil "CSE_DROP_ADDACTION_CMS") then {
+_caller removeAction CSE_DROP_ADDACTION_CMS;
+ CSE_DROP_ADDACTION_CMS = nil;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/drag/fn_switchBody_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/drag/fn_switchBody_CMS.sqf
new file mode 100644
index 0000000000..9271d19bea
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/drag/fn_switchBody_CMS.sqf
@@ -0,0 +1,82 @@
+/**
+ * fn_switchBody_CMS.sqf
+ * @Descr: DEPCRECATED
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_oldBody","_newUnit","_class","_group","_position","_side","_allVariables"];
+_oldBody = _this select 0;
+_caller = _this select 1;
+
+ if (alive _oldBody) exitwith {};
+ _name = _oldBody getvariable ["cse_name","unknown"];
+ _class = typeof _oldBody;
+ _side = side _caller;
+ _group = createGroup _side;
+ _position = getPos _oldBody;
+
+ //_group = (group _oldBody);
+ //_newUnit = _group createUnit [_class, _position, [], 3, "FORM"];
+ _newUnit = _group createUnit [typeof _oldBody, _position, [], 0, "NONE"];
+
+
+
+ _allVariables = [_oldBody] call cse_fnc_getAllSetVariables;
+ // [NAME (STRING), TYPENAME (STRING), VALUE (ANY), DEFAULT GLOBAL (BOOLEAN)]
+ {
+ [_newUnit,_x select 0, _x select 2] call cse_fnc_setVariable;
+ }foreach _allVariables;
+ _newUnit setVariable ["cse_name",_name,true];
+
+ _newUnit disableAI "TARGET";
+ _newUnit disableAI "AUTOTARGET";
+ _newUnit disableAI "MOVE";
+ _newUnit disableAI "ANIM";
+ _newUnit disableAI "FSM";
+ _newUnit setvariable ["cse_isDead",true,true];
+
+ _newUnit setvariable ["cse_heartRate", 0];
+ _newUnit setvariable ["cse_bloodPressure", [0,0]];
+
+ removeallweapons _newUnit;
+ removeallassigneditems _newUnit;
+ removeUniform _newUnit;
+ removeHeadgear _newUnit;
+ removeBackpack _newUnit;
+ removeVest _newUnit;
+
+
+ _newUnit addHeadgear (headgear _oldBody);
+ _newUnit addBackpack (backpack _oldBody);
+ clearItemCargoGlobal (backpackContainer _newUnit);
+ clearMagazineCargoGlobal (backpackContainer _newUnit);
+ clearWeaponCargoGlobal (backpackContainer _newUnit);
+
+ _newUnit addVest (vest _oldBody);
+ clearItemCargoGlobal (backpackContainer _newUnit);
+ clearMagazineCargoGlobal (backpackContainer _newUnit);
+ clearWeaponCargoGlobal (backpackContainer _newUnit);
+
+ _newUnit addUniform (uniform _oldBody);
+ clearItemCargoGlobal (backpackContainer _newUnit);
+ clearMagazineCargoGlobal (backpackContainer _newUnit);
+ clearWeaponCargoGlobal (backpackContainer _newUnit);
+
+ {_newUnit addMagazine _x} count (magazines _oldBody);
+ {_newUnit addWeapon _x} count (weapons _oldBody);
+ {_newUnit addItem _x} count (items _oldBody);
+
+ _newUnit selectWeapon (primaryWeapon _newUnit);
+ [_newUnit,([_newUnit] call cse_fnc_getDeathAnim)] call cse_fnc_broadcastAnim;
+
+ if (CSE_SYS_MEDICAL_INTERACTION_TARGET == _oldBody) then {
+ CSE_SYS_MEDICAL_INTERACTION_TARGET = _newUnit;
+ };
+// [[_oldBody,_newUnit],_name,"cse_fnc_onBodySwtich_CMS",true,false] spawn BIS_fnc_MP;
+
+ deleteVehicle _oldBody;
+_newUnit
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/examine/fn_checkBloodPressureLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkBloodPressureLocal_CMS.sqf
new file mode 100644
index 0000000000..f883c4ecf6
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkBloodPressureLocal_CMS.sqf
@@ -0,0 +1,57 @@
+/**
+ * fn_checkBloodPressureLocal_CMS.sqf
+ * @Descr: Displays specified units current blood pressure
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_caller","_unit","_bloodPressure","_bloodPressureHigh","_bloodPressureLow","_title","_content"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+
+ _bloodPressure = [_unit] call cse_fnc_getBloodPressure_CMS;
+ if (!alive _unit) then {
+ _bloodPressure = [0,0];
+ };
+
+ _bloodPressureHigh = _bloodPressure select 1;
+ _bloodPressureLow = _bloodPressure select 0;
+ _output = "";
+_logOutPut = "";
+ if ([_caller] call cse_fnc_medicClass_CMS) then {
+ _output = "STR_CSE_CMS_CHECK_BLOODPRESSURE_OUTPUT_1";
+ _logOutPut = format["%1/%2",round(_bloodPressureHigh),round(_bloodPressureLow)];
+ } else {
+ if (_bloodPressureHigh > 20) then {
+ _output = "STR_CSE_CMS_CHECK_BLOODPRESSURE_OUTPUT_2";
+ _logOutPut = "Low";
+ if (_bloodPressureHigh > 100) then {
+ _output = "STR_CSE_CMS_CHECK_BLOODPRESSURE_OUTPUT_3";
+ _logOutPut = "Normal";
+ if (_bloodPressureHigh > 160) then {
+ _output = "STR_CSE_CMS_CHECK_BLOODPRESSURE_OUTPUT_4";
+ _logOutPut = "High";
+ };
+
+ };
+ } else {
+ if (random(10) > 3) then {
+ _output = "STR_CSE_CMS_CHECK_BLOODPRESSURE_OUTPUT_5";
+ _logOutPut = "No Blood Pressure";
+ } else {
+ _output = "STR_CSE_CMS_CHECK_BLOODPRESSURE_OUTPUT_6";
+ };
+ };
+ };
+
+_title = format["STR_CSE_CMS_CHECK_BLOODPRESSURE"];
+_content = ["STR_CSE_CMS_CHECK_BLOODPRESSURE_CHECKED_MEDIC", _output];
+[_caller, _title, _content, 0,[[_unit] call cse_fnc_getName, round(_bloodPressureHigh),round(_bloodPressureLow)] ] call cse_fnc_sendDisplayInformationTo;
+
+if (_logOutPut != "") then {
+ [_unit,"examine",format["%1 checked Blood Pressure: %2",[_caller] call cse_fnc_getName,_logOutPut]] call cse_fnc_addToQuickViewLog_CMS;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/examine/fn_checkBloodPressure_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkBloodPressure_CMS.sqf
new file mode 100644
index 0000000000..0736576321
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkBloodPressure_CMS.sqf
@@ -0,0 +1,29 @@
+/**
+ * fn_checkBloodPressure_CMS.sqf
+ * @Descr: Displays specified units current blood pressure
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller","_unit","_bloodPressure","_bloodPressureHigh","_bloodPressureLow"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+_title = format["STR_CSE_CMS_CHECK_BLOODPRESSURE"];
+_content = ["STR_CSE_CMS_CHECK_BLOODPRESSURE_CONTENT"];
+[_caller, _title, _content] call cse_fnc_sendDisplayInformationTo;
+
+
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _caller;
+if !([(2 + round(random(4))),{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{[player, "STR_CSE_CMS_CANCELED", ["STR_CSE_CMS_ACTION_CANCELED","STR_CSE_CMS_YOU_MOVED_AWAY"]] call cse_fnc_sendDisplayInformationTo;}] call cse_fnc_gui_loadingBar) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+
+[_this, "cse_fnc_checkBloodPressureLocal_CMS", _unit, false] spawn BIS_fnc_MP;
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/examine/fn_checkPulseLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkPulseLocal_CMS.sqf
new file mode 100644
index 0000000000..1b644dfa00
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkPulseLocal_CMS.sqf
@@ -0,0 +1,50 @@
+/**
+ * fn_checkPulseLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_caller","_unit"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+ _heartRate = [_unit,"cse_heartRate"] call cse_fnc_getVariable;
+ if (!alive _unit) then {
+ _heartRate = 0;
+ };
+ _heartRateOutput = "";
+ _logOutPut = "";
+ if (_heartRate > 1.0) then {
+ if ([_caller] call cse_fnc_medicClass_CMS) then {
+ _heartRateOutput = "STR_CSE_CMS_CHECK_PULSE_OUTPUT_1";
+ _logOutPut = format["%1",round(_heartRate)];
+ } else {
+ // non medical personel will only find a pulse/HR
+ _heartRateOutput = "STR_CSE_CMS_CHECK_PULSE_OUTPUT_2";
+ _logOutPut = "Weak";
+ if (_heartRate > 60) then {
+ if (_heartRate > 100) then {
+ _heartRateOutput = "STR_CSE_CMS_CHECK_PULSE_OUTPUT_3";
+ _logOutPut = "Strong";
+ } else {
+ _heartRateOutput = "STR_CSE_CMS_CHECK_PULSE_OUTPUT_4";
+ _logOutPut = "Normal";
+ };
+ };
+ };
+ } else {
+ _heartRateOutput = "STR_CSE_CMS_CHECK_PULSE_OUTPUT_5";
+ _logOutPut = "No heart rate";
+ };
+
+_title = "STR_CSE_CMS_CHECK_PULSE";
+_content = ["STR_CSE_CMS_CHECK_PULSE_CHECKED_MEDIC",_heartRateOutput];
+[_caller, _title, _content,0, [[_unit] call cse_fnc_getName, round(_heartRate)]] call cse_fnc_sendDisplayInformationTo;
+
+if (_logOutPut != "") then {
+ [_unit,"examine",format["%1 checked Heart Rate: %2",[_caller] call cse_fnc_getName,_logOutPut]] call cse_fnc_addToQuickViewLog_CMS;
+};
diff --git a/TO_MERGE/cse/sys_medical/functions/examine/fn_checkPulse_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkPulse_CMS.sqf
new file mode 100644
index 0000000000..812c1bbaf2
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkPulse_CMS.sqf
@@ -0,0 +1,30 @@
+/**
+ * fn_checkPulse_CMS.sqf
+ * @Descr: Displays specified units current pulse
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_caller","_unit","_title","_content"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+_title = format["STR_CSE_CMS_CHECK_PULSE"];
+_content = ["STR_CSE_CMS_CHECK_PULSE_CONTENT"];
+[_caller, _title, _content] call cse_fnc_sendDisplayInformationTo;
+
+
+
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _caller;
+if !([(2 + round(random(4))),{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{[player, "STR_CSE_CMS_CANCELED", ["STR_CSE_CMS_ACTION_CANCELED","STR_CSE_CMS_YOU_MOVED_AWAY"]] call cse_fnc_sendDisplayInformationTo;}] call cse_fnc_gui_loadingBar) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+
+[_this, "cse_fnc_checkPulseLocal_CMS", _unit, false] spawn BIS_fnc_MP;
+
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/examine/fn_checkResponse_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkResponse_CMS.sqf
new file mode 100644
index 0000000000..ead154db66
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/examine/fn_checkResponse_CMS.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_checkResponse_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_caller","_unit"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+_title = format["STR_CSE_CMS_CHECK_RESPONSE"];
+_content = ["STR_CSE_CMS_CHECK_RESPONSE_CONTENT"];
+[_caller, _title, _content] call cse_fnc_sendDisplayInformationTo;
+
+
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _caller;
+if !([(2 + round(random(4))),{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{[player, "STR_CSE_CMS_CANCELED", ["STR_CSE_CMS_ACTION_CANCELED","STR_CSE_CMS_YOU_MOVED_AWAY"]] call cse_fnc_sendDisplayInformationTo;}] call cse_fnc_gui_loadingBar) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+
+_output = "";
+if ([_unit] call cse_fnc_isAwake) then {
+ _output = format[localize "STR_CSE_CMS_CHECK_REPONSE_RESPONSIVE",[_unit] call cse_fnc_getName];
+} else {
+ _output = format[localize "STR_CSE_CMS_CHECK_REPONSE_UNRESPONSIVE",[_unit] call cse_fnc_getName];
+};
+
+_title = format["STR_CSE_CMS_CHECK_RESPONSE"];
+_content = [format[localize "STR_CSE_CMS_CHECK_REPONSE_YOU_CHECKED",[_unit] call cse_fnc_getName],_output];
+[_caller, _title, _content] call cse_fnc_sendDisplayInformationTo;
+
+[_unit,"examine",_output] call cse_fnc_addToQuickViewLog_CMS;
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_addOpenWounds_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_addOpenWounds_CMS.sqf
new file mode 100644
index 0000000000..5ee4f16d89
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_addOpenWounds_CMS.sqf
@@ -0,0 +1,43 @@
+/**
+ * fn_addOpenWounds_CMS.sqf
+ * @Descr: Add open wounds to unit.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (The object that will recieve the wound), bodyPart STRING, type STRING (Small, medium or large), amount NUMBER (The amount of open wounds added)]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+private ["_unit", "_bodyPart", "_type", "_openWounds", "_selection", "_amount", "_newAmount"];
+_unit = _this select 0;
+_bodyPart = _this select 1;
+_type = _this select 2;
+_amount = _this select 3;
+
+if (typeName _bodyPart == "STRING") then {
+ _bodyPart = [_bodyPart] call cse_fnc_getBodyPartNumber_CMS;
+};
+if (typeName _type == "STRING") then {
+ _type = switch (toLower _type) do {
+ case "small": {0};
+ case "medium": {1};
+ case "large": {2};
+ default {-1};
+ };
+};
+
+if (_type < 0) exitwith {
+ [format["Adding an injury with an invalid type: %1",_this], 0] call cse_fnc_debug;
+};
+
+_openWounds = [_unit,"cse_openWounds"] call cse_fnc_getVariable;
+_selection = _openWounds select _bodyPart;
+_newAmount = (_selection select _type) + _amount;
+if (_newAmount < 0) then {
+ _newAmount = 0;
+};
+_selection set [ _type, _newAmount];
+_openWounds set [ _bodyPart , _selection];
+[_unit, "cse_openWounds",_openWounds] call cse_fnc_setVariable;
+
+[_unit] call cse_fnc_unitLoop_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_assignMedicRoles_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicRoles_CMS.sqf
new file mode 100644
index 0000000000..74d039a2c0
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicRoles_CMS.sqf
@@ -0,0 +1,62 @@
+/**
+ * fn_assignMedicRoles_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_logic","_setting","_objects"];
+_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
+
+ [format["AssignMedicalRoles called. Arguments are: %1 %2", _this]] call cse_fnc_debug;
+
+if (!isNull _logic) then {
+ _list = _logic getvariable ["EnableList",""];
+
+ _splittedList = [_list, ","] call BIS_fnc_splitString;
+ _nilCheckPassedList = "";
+ {
+ _x = [_x] call cse_fnc_string_removeWhiteSpace;
+ if !(isnil _x) then {
+ if (_nilCheckPassedList == "") then {
+ _nilCheckPassedList = _x;
+ } else {
+ _nilCheckPassedList = _nilCheckPassedList + ","+ _x;
+ };
+ };
+ }foreach _splittedList;
+
+ _list = "[" + _nilCheckPassedList + "]";
+ _parsedList = [] call compile _list;
+ _setting = _logic getvariable ["class",0];
+ _objects = synchronizedObjects _logic;
+ if (!(_objects isEqualTo []) && _parsedList isEqualTo []) then {
+ /*
+ This has been enabled again to allow backwards compatability for older CSE missions.
+ */
+ [["synchronizedObjects for the 'Assign Medic Role' Module is deprecated. Please use the enable for list instead!"], 1] call cse_fnc_debug;
+ {
+ if (!isnil "_x") then {
+ if (typeName _x == typeName objNull) then {
+ if (local _x) then {
+ [_x,_setting] call cse_fnc_setMedicRole_CMS;
+ };
+ };
+ };
+ }foreach _objects;
+ };
+ {
+ if (!isnil "_x") then {
+ if (typeName _x == typeName objNull) then {
+ if (local _x) then {
+ [_x,_setting] call cse_fnc_setMedicRole_CMS;
+ };
+ };
+ };
+ }foreach _parsedList;
+ };
+
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalEquipment_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalEquipment_CMS.sqf
new file mode 100644
index 0000000000..ce72402043
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalEquipment_CMS.sqf
@@ -0,0 +1,83 @@
+/**
+ * fn_assignMedicalEquipment_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+#define ALL_PLAYERS 0
+#define ONLY_MEDICS 1
+
+
+// TODO add amount of to defines
+#define BASIC_BANDAGES "cse_bandage_basic"
+#define PACKING_BANDAGES "cse_packing_bandage"
+
+
+private ["_logic","_setting","_objects", "_medicsLoadout", "_nonMedics", "_code"];
+_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
+if (!isNull _logic) then {
+ _setting = _logic getvariable ["equipment",0];
+ waituntil {!isnil "cse_gui"}; // ensure the player unit is available.
+ waituntil {time>0};
+
+ _start = diag_tickTime;
+ waituntil {(["cse_sys_medical"] call cse_fnc_isModuleEnabled_F) || (diag_tickTime - _start > 10000)};
+
+ if (!(["cse_sys_medical"] call cse_fnc_isModuleEnabled_F)) exitwith {};
+ // TODO Create functions for adding multiple magazines to a unit
+ // TODO Check if unit can store more magazines (ie backpack/vest/uniform are not full)
+
+ _medicsLoadout = {
+ for "_i" from 1 to 8 do {
+ player addItem BASIC_BANDAGES;
+ player addItem PACKING_BANDAGES;
+ };
+ for "_i" from 1 to 3 do {
+ player addItem "cse_tourniquet";
+ };
+ for "_i" from 1 to 3 do {
+ player addItem "cse_morphine";
+ };
+ for "_i" from 1 to 2 do {
+ player addItem "cse_epinephrine";
+ };
+ };
+
+ _nonMedics = {
+ for "_i" from 1 to 3 do {
+ player addItem BASIC_BANDAGES;
+ };
+ player addItem "cse_tourniquet";
+ player addItem "cse_morphine";
+ };
+
+
+ // TODO make this neat code.
+ switch (_setting) do {
+ case ALL_PLAYERS: {
+ _code = if ([player] call cse_fnc_medicClass_CMS) then {
+ _medicsLoadout;
+ } else {
+ _nonMedics;
+ };
+
+ call _code;
+ player addEventhandler["Respawn", _code];
+ };
+ case ONLY_MEDICS: {
+ _code = if ([player] call cse_fnc_medicClass_CMS) then {
+ _medicsLoadout;
+ } else {
+ {};
+ };
+ call _code;
+ player addEventhandler["Respawn", _code];
+ };
+ default {};
+ };
+ };
+
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalFacility_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalFacility_CMS.sqf
new file mode 100644
index 0000000000..42bda85c80
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalFacility_CMS.sqf
@@ -0,0 +1,23 @@
+/**
+ * fn_assignMedicalFacility_CMS.sqf
+ * @Descr: Register synchronized objects from passed object as a medical facility for CMS.
+ * @Author: Glowbal
+ *
+ * @Arguments: [logic OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+private ["_logic","_setting","_objects"];
+_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
+if (!isNull _logic) then {
+ _setting = _logic getvariable ["class",0];
+ _objects = synchronizedObjects _logic;
+ {
+ if (local _x) then {
+ _x setvariable["cse_medical_facility", true, true];
+ };
+ }foreach _objects;
+ };
+
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalVehicle_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalVehicle_CMS.sqf
new file mode 100644
index 0000000000..8f26dcb8d3
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_assignMedicalVehicle_CMS.sqf
@@ -0,0 +1,60 @@
+/**
+ * fn_assignMedicalVehicle_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_logic","_setting", "_list", "_parsedList", "_splittedList","_nilCheckPassedList", "_objects"];
+_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
+
+ [format["AssignMedicalRoles called. Arguments are: %1 %2", _this]] call cse_fnc_debug;
+
+if (!isNull _logic) then {
+ _list = _logic getvariable ["EnableList",""];
+ _setting = _logic getvariable ["enabled",0];
+
+ _splittedList = [_list, ","] call BIS_fnc_splitString;
+ _nilCheckPassedList = "";
+ {
+ _x = [_x] call cse_fnc_string_removeWhiteSpace;
+ if !(isnil _x) then {
+ if (_nilCheckPassedList == "") then {
+ _nilCheckPassedList = _x;
+ } else {
+ _nilCheckPassedList = _nilCheckPassedList + ","+ _x;
+ };
+ };
+ }foreach _splittedList;
+
+ _list = "[" + _nilCheckPassedList + "]";
+ _parsedList = [] call compile _list;
+
+ _objects = synchronizedObjects _logic;
+ {
+ // assign the medical vehicle role for non man type objects that are local only.
+ if !(_x isKindOf "CAManBase") then {
+ if (local _x) then {
+ _x setvariable ["cse_medicalVehicle_CMS", _setting, true];
+ };
+ };
+ }foreach _objects;
+
+ {
+ if (!isnil "_x") then {
+ if (typeName _x == typeName objNull) then {
+ // assign the medical vehicle role for non man type objects that are local only.
+ if !(_x isKindOf "CAManBase") then {
+ if (local _x) then {
+ _x setvariable ["cse_medicalVehicle_CMS", _setting, true];
+ };
+ };
+ };
+ };
+ }foreach _parsedList;
+ };
+
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_canAccessMedicalEquipment_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_canAccessMedicalEquipment_CMS.sqf
new file mode 100644
index 0000000000..133899ea79
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_canAccessMedicalEquipment_CMS.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_canAccessMedicalEquipment_CMS.sqf
+ * @Descr: Check if caller can access targets medical equipment, based upon accessLevel
+ * @Author: Glowbal
+ *
+ * @Arguments: [target OBJECT, caller OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+private ["_target", "_caller", "_accessLevel", "_return"];
+_target = _this select 0;
+_caller = _this select 1;
+
+_accessLevel = _target getvariable ["cse_allowSharedEquipmentAccess_CMS", -1];
+
+_return = false;
+
+if (_accessLevel >= 0) then {
+ if (_accessLevel == 0) exitwith { _return = true; };
+ if (_accessLevel == 1) exitwith { _return = (side _target == side _caller); };
+ if (_accessLevel == 2) exitwith { _return = (group _target == group _caller); };
+};
+
+_return;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_canPutInBodyBag_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_canPutInBodyBag_CMS.sqf
new file mode 100644
index 0000000000..843b3c5d8b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_canPutInBodyBag_CMS.sqf
@@ -0,0 +1,15 @@
+/**
+ * fn_canPutInBodyBag_CMS.sqf
+ * @Descr:
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: true
+ */
+
+private ["_unit","_caller"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+([_caller, "cse_itemBodyBag"] call cse_fnc_hasItem && {(!(alive _unit) || (_unit getvariable ["cse_isDead",false]) || (_unit getvariable ["cse_inReviveState", false]))} && {(_unit distance _caller) < 7.5} && (vehicle _unit == _unit)); // return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_coreLoop_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_coreLoop_CMS.sqf
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_effectsLoop_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_effectsLoop_CMS.sqf
new file mode 100644
index 0000000000..4d0165b285
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_effectsLoop_CMS.sqf
@@ -0,0 +1,72 @@
+/**
+ * fn_effectsLoop_CMS.sqf
+ * @Descr: displays visual effects to user
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_bloodLoss","_bloodStatus","_painStatus"];
+_unit = player;
+if (!hasInterface || !isPlayer _unit || !local _unit) exitwith{};
+45 cutRsc ["RscCSEScreenEffectsBlack","PLAIN"];
+cseDisplayingBleedingEffect = false;
+cseDisplayingPainEffect = false;
+cseDisplayingUnconiciousEffect = false;
+
+_hb_effect = {
+ _heartRate = _this select 0;
+ if (_heartRate < 0.1) exitwith {};
+ _hbSoundsFast = ["cse_heartbeat_fast_1", "cse_heartbeat_fast_2", "cse_heartbeat_fast_3", "cse_heartbeat_norm_1", "cse_heartbeat_norm_2"];
+ _hbSoundsNorm = ["cse_heartbeat_norm_1", "cse_heartbeat_norm_2"];
+ _hbSoundsSlow = ["cse_heartbeat_slow_1", "cse_heartbeat_slow_2", "cse_heartbeat_norm_1", "cse_heartbeat_norm_2"];
+ if (isnil "CSE_PLAYING_HB_SOUND") then {
+ CSE_PLAYING_HB_SOUND = false;
+ };
+ if (CSE_PLAYING_HB_SOUND) exitwith {};
+ CSE_PLAYING_HB_SOUND = true;
+
+ _sleep = 60 / _heartRate;
+ if (_heartRate < 60) then {
+ _sound = _hbSoundsSlow select (random((count _hbSoundsSlow) -1));
+ playSound _sound;
+
+ sleep _sleep;
+ } else {
+ if (_heartRate > 120) then {
+ _sound = _hbSoundsFast select (random((count _hbSoundsFast) -1));
+ playSound _sound;
+ sleep _sleep;
+ };
+ };
+ CSE_PLAYING_HB_SOUND = false;
+};
+
+while {true} do {
+ _unit = player;
+ if ([_unit] call cse_fnc_isAwake) then {
+ sleep 0.25;
+ _bloodLoss = _unit call cse_fnc_getBloodLoss_CMS;
+ _bloodStatus = [_unit,"cse_bloodVolume",100] call cse_fnc_getVariable;
+ _painStatus = [_unit,"cse_pain",0] call cse_fnc_getVariable;
+
+ if (_bloodLoss >0) then {
+ //["cse_sys_medical_isBleeding", true, "cse\cse_sys_medical\data\icons\icon_bleeding.paa", [1,1,1,1]] call cse_fnc_gui_displayIcon;
+ [_bloodLoss] spawn cse_fnc_effectBleeding;
+ } else {
+ //["cse_sys_medical_isBleeding", false, "cse\cse_sys_medical\data\icons\icon_bleeding.paa", [1,1,1,1]] call cse_fnc_gui_displayIcon;
+ };
+ sleep 0.25 +(random(2));
+ if (_painStatus > 0) then {
+ [_painStatus] spawn cse_fnc_effectPain;
+ };
+ sleep 0.25 +(random(1));
+ _heartRate = [_unit,"cse_heartRate",70] call cse_fnc_getVariable;
+ [_heartRate] spawn _hb_effect;
+ } else {
+ cseDisplayingBleedingEffect = false;
+ };
+};
+
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getAdvancedOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getAdvancedOptions_CMS.sqf
new file mode 100644
index 0000000000..9c14b29db9
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getAdvancedOptions_CMS.sqf
@@ -0,0 +1,76 @@
+/**
+ * fn_getAdvancedOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return"];
+_return = [];
+
+if (CSE_SYS_MEDICAL_INTERACTION_TARGET != player && (isNull ([player] call cse_fnc_getCarriedObj))) then {
+
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET, 'cse_blood_iv'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_BLOODIV_1000ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_blood_iv'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_BLOODIV_1000ML_TOOLTIP"];
+ };
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET, 'cse_blood_iv_500'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_BLOODIV_500ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_blood_iv_500'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_BLOODIV_500ML_TOOLTIP"];
+ };
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_blood_iv_250'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_BLOODIV_250ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_blood_iv_250'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_BLOODIV_250ML_TOOLTIP"];
+ };
+
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_plasma_iv'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_PLASMAIV_1000ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_plasma_iv'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_PLASMAIV_1000ML_TOOLTIP"];
+ };
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_plasma_iv_500'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_PLASMAIV_500ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_plasma_iv_500'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_PLASMAIV_500ML_TOOLTIP"];
+ };
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_plasma_iv_250'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_PLASMAIV_250ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_plasma_iv_250'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_PLASMAIV_250ML_TOOLTIP"];
+ };
+
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_saline_iv'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_SALINEIV_1000ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_saline_iv'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_SALINEIV_1000ML_TOOLTIP"];
+ };
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_saline_iv_500'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_SALINEIV_500ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_saline_iv_500'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_SALINEIV_500ML_TOOLTIP"];
+ };
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_saline_iv_250'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_SALINEIV_250ml","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_saline_iv_250'] call cse_fnc_iv_CMS;",localize "STR_CSE_ACTION_SALINEIV_250ML_TOOLTIP"];
+ };
+
+ // TODO refactor this condition into a function.
+ if ((CSE_AID_KIT_RESTRICTIONS_CMS == 0 && ([player] call cse_fnc_inMedicalFacility_CMS)) ||
+ (CSE_AID_KIT_RESTRICTIONS_CMS == 1 && ([player] call cse_fnc_inMedicalFacility_CMS) && (!([CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_hasOpenWounds_CMS))) ||
+ (CSE_AID_KIT_RESTRICTIONS_CMS == 2) ||
+ (CSE_AID_KIT_RESTRICTIONS_CMS == 3 && (!([CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_hasOpenWounds_CMS)))) then {
+
+ if (CSE_AIDKITMEDICSONLY_CMS && [player] call cse_fnc_medicClass_CMS || !CSE_AIDKITMEDICSONLY_CMS) then {
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_personal_aid_kit'] call cse_fnc_hasEquipment_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_PERSONAL_AID_KIT","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_personal_aid_kit'] call cse_fnc_heal_CMS;",localize "STR_CSE_ACTION_PERSONAL_AID_KIT_TOOLTIP"];
+ };
+ };
+ };
+ if (isnil "cse_playerIsProvidingCPR_CMS") then {
+ cse_playerIsProvidingCPR_CMS = false;
+ };
+ if ((CSE_SYS_MEDICAL_INTERACTION_TARGET getvariable ["cse_cardiacArrest_CMS",false]) || !([CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_isAwake) && !cse_playerIsProvidingCPR_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_PERFORM_CPR","[_this select 0,_this select 1] call cse_fnc_performCPR_CMS;", localize "STR_CSE_ACTION_PERFORM_CPR_TOOLTIP"];
+ };
+ if (cse_playerIsProvidingCPR_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_STOP_CPR","cse_playerIsProvidingCPR_CMS = false;", localize "STR_CSE_ACTION_STOP_CPR_TOOLTIP"];
+ };
+
+ if ((CSE_STITCHING_ALLOW_CMS == 0 && [player] call cse_fnc_medicClass_CMS) || CSE_STITCHING_ALLOW_CMS == 1) then {
+ if ([player, CSE_SYS_MEDICAL_INTERACTION_TARGET, 'cse_surgical_kit'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_STITCHING","[_this select 0,_this select 1, call cse_fnc_getSelectedBodyPart_CMS, 'cse_surgical_kit'] call cse_fnc_performStitching_CMS;", localize "STR_CSE_ACTION_STITCHING_TOOLTIP"];
+ };
+ };
+
+ _return = [CSE_SYS_MEDICAL_INTERACTION_TARGET, "getAdvancedOptions_CMS", _return] call cse_fnc_getOptionsForCategory_CMS;
+};
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getAirwayOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getAirwayOptions_CMS.sqf
new file mode 100644
index 0000000000..6237a0ac3a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getAirwayOptions_CMS.sqf
@@ -0,0 +1,27 @@
+/**
+ * fn_getAirwayOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_return"];
+_return = [];
+
+
+if (CSE_SYS_MEDICAL_INTERACTION_TARGET != player && (isNull ([player] call cse_fnc_getCarriedObj))) then {
+ if (CSE_ALLOW_AIRWAY_INJURIES_CMS) then {
+ if (([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_nasopharyngeal_tube'] call cse_fnc_hasEquipment_CMS) && !([CSE_SYS_MEDICAL_INTERACTION_TARGET, "cse_airwayTreated"] call cse_fnc_getVariable) && !([CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_isAwake)) then {
+ _return pushback [localize "STR_CSE_ACTION_APPLY_NPA", "[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_nasopharyngeal_tube'] call cse_fnc_treatmentAirway_CMS;", localize "STR_CSE_ACTION_APPLY_NPA_TOOLTIP"];
+ };
+ if ([CSE_SYS_MEDICAL_INTERACTION_TARGET, "cse_airwayTreated"] call cse_fnc_getVariable) then {
+ _return pushback [localize "STR_CSE_ACTION_REMOVE_NPA", "CSE_SYS_MEDICAL_INTERACTION_TARGET setvariable ['cse_airwayTreated', nil, true]; player addMagazine 'cse_nasopharyngeal_tube';", localize "STR_CSE_ACTION_REMOVE_NPA_TOOLTIP"];
+ };
+ _return = [CSE_SYS_MEDICAL_INTERACTION_TARGET, "getAirwayOptions_CMS", _return] call cse_fnc_getOptionsForCategory_CMS;
+ };
+};
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getBandageOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getBandageOptions_CMS.sqf
new file mode 100644
index 0000000000..4edc0d7eb9
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getBandageOptions_CMS.sqf
@@ -0,0 +1,41 @@
+/**
+ * fn_getBandageOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#define HAS_EQUIPMENT(ITEM) [player,CSE_SYS_MEDICAL_INTERACTION_TARGET,ITEM] call cse_fnc_hasEquipment_CMS
+
+
+private ["_return"];
+_return = [];
+
+if (isNull ([player] call cse_fnc_getCarriedObj)) then {
+ if (HAS_EQUIPMENT('cse_bandage_basic')) then {
+ _return pushback [localize "STR_CSE_ACTION_BANDAGE_BASIC","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_bandage_basic', call cse_fnc_getCurrentSelectedInjuryData_CMS] call cse_fnc_bandage_CMS;",localize "STR_CSE_ACTION_BANDAGE_BASIC_TOOLTIP"];
+ };
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_quikclot'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_QUIKCLOT","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_quikclot', call cse_fnc_getCurrentSelectedInjuryData_CMS] call cse_fnc_bandage_CMS;",localize "STR_CSE_ACTION_QUIKCLOT_TOOLTIP"];
+ };
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_bandageElastic'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_BANDAGE_ELASTIC","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_bandageElastic', call cse_fnc_getCurrentSelectedInjuryData_CMS] call cse_fnc_bandage_CMS;",localize "STR_CSE_ACTION_BANDAGE_ELASTIC_TOOLTIP"];
+ };
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_packing_bandage'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_PACKING_BANDAGE","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_packing_bandage', call cse_fnc_getCurrentSelectedInjuryData_CMS] call cse_fnc_bandage_CMS;",localize "STR_CSE_ACTION_PACKING_BANDAGE_TOOLTIP"];
+ };
+
+ if (([CSE_SYS_MEDICAL_INTERACTION_TARGET, call cse_fnc_getSelectedBodyPart_CMS] call cse_fnc_hasTourniquetAppliedTo_CMS)) then {
+ _return pushback [localize "STR_CSE_ACTION_REMOVE_TOURNIQUET","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_tourniquet'] call cse_fnc_removeTourniquet_CMS;",localize "STR_CSE_ACTION_REMOVE_TOURNIQUET_TOOLTIP"];
+ } else {
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_tourniquet'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_APPLY_TOURNIQUET","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_tourniquet'] call cse_fnc_tourniquet_CMS;",localize "STR_CSE_ACTION_APPLY_TOURNIQUET_TOOLTIP"];
+ };
+ };
+ _return = [CSE_SYS_MEDICAL_INTERACTION_TARGET, "getBandageOptions_CMS", _return] call cse_fnc_getOptionsForCategory_CMS;
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getBloodLoss_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getBloodLoss_CMS.sqf
new file mode 100644
index 0000000000..a9ee1cab89
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getBloodLoss_CMS.sqf
@@ -0,0 +1,34 @@
+/**
+ * fn_getBloodLoss_CMS.sqf
+ * @Descr: Calculate the total blood loss of a unit.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: NUMBER Total blood loss of unit
+ * @PublicAPI: true
+ */
+
+#define BLOODLOSS_SMALL_WOUNDS 0.025
+#define BLOODLOSS_MEDIUM_WOUNDS 0.05
+#define BLOODLOSS_LARGE_WOUNDS 0.1
+
+/**
+* The default cardiac output when all stats are set to normal is 5.25.
+*/
+#define DEFAULT_CARDIAC_OUTPUT 5.25
+
+private ["_totalBloodLoss","_tourniquets","_openWounds", "_value", "_cardiacOutput"];
+
+_totalBloodLoss = 0;
+_tourniquets = [_this, "cse_tourniquets"] call cse_fnc_getvariable;
+_openWounds = [_this, "cse_openWounds"] call cse_fnc_getvariable;
+_cardiacOutput = [_this] call cse_fnc_getCardiacOutput_CMS;
+
+{
+ if ((_tourniquets select _foreachIndex) < 1) then {
+ _totalBloodLoss = _totalBloodLoss + (((BLOODLOSS_SMALL_WOUNDS * (_x select 0))) + ((BLOODLOSS_MEDIUM_WOUNDS * (_x select 1))) + ((BLOODLOSS_LARGE_WOUNDS * (_x select 2))) * (_cardiacOutput / DEFAULT_CARDIAC_OUTPUT));
+ };
+}foreach _openWounds;
+
+// cap the blood loss to be no greater as the current cardiac output
+(_totalBloodLoss min _cardiacOutput);
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getDragOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getDragOptions_CMS.sqf
new file mode 100644
index 0000000000..427dc219dc
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getDragOptions_CMS.sqf
@@ -0,0 +1,42 @@
+/**
+ * fn_getDragOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return","_nameOfUnit","_unit"];
+_return = [];
+
+if (hasInterface) then {
+ //_unit = [player] call cse_fnc_getInteractionTarget;
+ _unit = CSE_SYS_MEDICAL_INTERACTION_TARGET;
+ if (!isNull _unit) then {
+ if (_unit != player && (_unit isKindOf "CaManBase")) then {
+ _nameOfUnit = [_unit] call cse_fnc_getName;
+ if (vehicle _unit == _unit) then {
+ if (([player] call cse_fnc_getCarriedObj) != _unit && (isNull ([player] call cse_fnc_getCarriedObj))) then {
+
+ _return pushback [localize "STR_CSE_ACTION_DRAG_PATIENT","[_this select 1,_this select 0] call CSE_fnc_drag_CMS;",format[localize "STR_CSE_ACTION_DRAG_PATIENT_TOOLTIP",_nameOfUnit]];
+ _return pushback [localize "STR_CSE_ACTION_CARRY_PATIENT","[_this select 1,_this select 0] call cse_fnc_carry_CMS;",format[localize "STR_CSE_ACTION_CARRY_PATIENT_TOOLTIP",_nameOfUnit]];
+ if ([_unit, player] call cse_fnc_canPutInBodyBag_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_BODYBAG","[_this select 0,_this select 1] call cse_fnc_placeInBodyBag_CMS;",localize "STR_CSE_ACTION_BODYBAG_TOOLTIP"];
+ };
+ } else {
+ if (([player] call cse_fnc_getCarriedObj) == _unit) then {
+ _return pushback [localize "STR_CSE_ACTION_DROP_PATIENT","[_this select 1,_this select 0] call cse_fnc_drop_CMS;",format[localize "STR_CSE_ACTION_DROP_PATIENT_TOOLTIP",_nameOfUnit]];
+ };
+ };
+ _return pushback [localize "STR_CSE_ACTION_LOAD_PATIENT","[_this select 1,_this select 0] call cse_fnc_load_CMS;",format[localize "STR_CSE_ACTION_LOAD_PATIENT_TOOLTIP",_nameOfUnit]];
+ } else {
+ _return pushback [localize "STR_CSE_ACTION_UNLOAD_PATIENT","[_this select 1,_this select 0] call cse_fnc_unload_CMS;",format[localize "STR_CSE_ACTION_UNLOAD_PATIENT_TOOLTIP",_nameOfUnit]];
+ };
+ };
+ _return = [_unit, "getDragOptions_CMS", _return] call cse_fnc_getOptionsForCategory_CMS;
+ };
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getExamineOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getExamineOptions_CMS.sqf
new file mode 100644
index 0000000000..f5ef66b92b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getExamineOptions_CMS.sqf
@@ -0,0 +1,22 @@
+/**
+ * fn_getExamineOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return"];
+_return = [];
+
+_return pushback [localize "STR_CSE_ACTION_CHECK_PULSE","[_this select 1,_this select 0] call cse_fnc_checkPulse_CMS;",localize "STR_CSE_ACTION_CHECK_PULSE_TOOLTIP"];
+
+_return pushback [localize "STR_CSE_ACTION_CHECK_BP","[_this select 1,_this select 0] call cse_fnc_checkBloodPressure_CMS;",localize "STR_CSE_ACTION_CHECK_BP_TOOLTIP"];
+
+_return pushback [localize "STR_CSE_ACTION_CHECK_RESPONSE","[_this select 1,_this select 0] call cse_fnc_checkResponse_CMS;",localize "STR_CSE_ACTION_CHECK_RESPONSE_TOOLTIP"];
+
+_return = [CSE_SYS_MEDICAL_INTERACTION_TARGET, "getExamineOptions_CMS", _return] call cse_fnc_getOptionsForCategory_CMS;
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getMedicationOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getMedicationOptions_CMS.sqf
new file mode 100644
index 0000000000..3705d15099
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getMedicationOptions_CMS.sqf
@@ -0,0 +1,29 @@
+/**
+ * fn_getMedicationOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return"];
+_return = [];
+if (isNull ([player] call cse_fnc_getCarriedObj)) then {
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_morphine'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_MORPHINE","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_morphine'] call cse_fnc_medication_CMS;",localize "STR_CSE_ACTION_MORPHINE_TOOLTIP"];
+ };
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_atropine'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_ATROPINE","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_atropine'] call cse_fnc_medication_CMS;",localize "STR_CSE_ACTION_ATROPINE_TOOLTIP"];
+ };
+ if ([player,CSE_SYS_MEDICAL_INTERACTION_TARGET,'cse_epinephrine'] call cse_fnc_hasEquipment_CMS) then {
+ _return pushback [localize "STR_CSE_ACTION_EPINEPHRINE","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_epinephrine'] call cse_fnc_medication_CMS;",localize "STR_CSE_ACTION_EPINEPHRINE_TOOLTIP"];
+ };
+
+ _return = [CSE_SYS_MEDICAL_INTERACTION_TARGET, "getMedicationOptions_CMS", _return] call cse_fnc_getOptionsForCategory_CMS;
+
+ //_return set [count _return, ["Anti-Biotics","[_this select 0,_this select 1,call cse_fnc_getSelectedBodyPart_CMS,'cse_antiBiotics'] call cse_fnc_medication_CMS;","To counter infections"]];
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getOptionsForCategory_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getOptionsForCategory_CMS.sqf
new file mode 100644
index 0000000000..868aa53835
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getOptionsForCategory_CMS.sqf
@@ -0,0 +1,33 @@
+/**
+ * fn_getOptionsForCategory_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_target", "_category", "_return", "_allow", "_resultsOfEH"];
+_target = _this select 0;
+_category = _this select 1;
+_return = _this select 2;
+
+_resultsOfEH = [[_target],_category] call cse_fnc_customEventHandler_F;
+{
+ {
+ if (count _x == 3) then {
+ _allow = true;
+ {
+ if (typeName _x != typeName "") exitwith {
+ _allow = false;
+ };
+ }foreach _x;
+ if (_allow) then {
+ _return pushback _x;
+ };
+ };
+ }foreach _x;
+}foreach _resultsOfEH;
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getSelectedBodyPart_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getSelectedBodyPart_CMS.sqf
new file mode 100644
index 0000000000..f9ffa3ee22
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getSelectedBodyPart_CMS.sqf
@@ -0,0 +1,16 @@
+/**
+ * fn_getSelectedBodyPart_CMS.sqf
+ * @Descr: Get the current selected body part for client
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return: STRING bodyPart selected
+ * @PublicAPI: true
+ */
+
+
+ if (isnil "CSE_SELECTED_BODY_PART_CMS") then {
+ CSE_SELECTED_BODY_PART_CMS = "head";
+ };
+
+CSE_SELECTED_BODY_PART_CMS
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getToggleOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getToggleOptions_CMS.sqf
new file mode 100644
index 0000000000..eace6ef0ed
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getToggleOptions_CMS.sqf
@@ -0,0 +1,13 @@
+/**
+ * fn_getToggleOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return"];
+_return = [];
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_getTriageCardOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_getTriageCardOptions_CMS.sqf
new file mode 100644
index 0000000000..7e3ddd11d4
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_getTriageCardOptions_CMS.sqf
@@ -0,0 +1,16 @@
+/**
+ * fn_getTriageCardOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return"];
+_return = [];
+
+
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_hasMedicalEnabled_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_hasMedicalEnabled_CMS.sqf
new file mode 100644
index 0000000000..ba75151d6b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_hasMedicalEnabled_CMS.sqf
@@ -0,0 +1,20 @@
+/**
+ * fn_hasMedicalEnabled_CMS.sqf
+ * @Descr: Check if unit has CMS enabled.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+
+private ["_unit", "_medicalEnabled"];
+_unit = _this select 0;
+
+_medicalEnabled = _unit getvariable "cse_sys_medical_enabled";
+if (isnil "_medicalEnabled") then {
+ (((CSE_ENABLE_SETTING_FORUNITS_CMS == 0 && (isPlayer _unit || (_unit getvariable ["cse_isDeadPlayer", false])))) || (CSE_ENABLE_SETTING_FORUNITS_CMS == 1));
+} else {
+ _medicalEnabled;
+};
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_hasOpenWounds_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_hasOpenWounds_CMS.sqf
new file mode 100644
index 0000000000..3470e2f634
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_hasOpenWounds_CMS.sqf
@@ -0,0 +1,14 @@
+/**
+ * fn_hasOpenWounds_CMS.sqf
+ * @Descr: Check if unit has open wounds
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (The unit to check)]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+private "_openWounds";
+_openWounds = [_this select 0,"cse_openWounds"] call cse_fnc_getvariable;
+
+({(((_x select 0) + (_x select 1) + (_x select 2)) > 0)}count _openWounds > 0);
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_inMedicalFacility_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_inMedicalFacility_CMS.sqf
new file mode 100644
index 0000000000..f13c3e7d44
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_inMedicalFacility_CMS.sqf
@@ -0,0 +1,49 @@
+/**
+ * fn_inMedicalFacility_CMS.sqf
+ * @Descr: Checks if a unit is in a designated medical facility
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: BOOL true if unit is in a building or under a roof.
+ * @PublicAPI: true
+ */
+
+private ["_unit","_eyePos","_objects","_isInBuilding","_medicalFacility"];
+_unit = [_this, 0, ObjNull, [ObjNull]] call BIS_fnc_Param;
+
+_eyePos = eyePos _unit;
+_isInBuilding = false;
+
+_medicalFacility =
+ [
+ "TK_GUE_WarfareBFieldhHospital_Base_EP1",
+ "TK_GUE_WarfareBFieldhHospital_EP1",
+ "TK_WarfareBFieldhHospital_Base_EP1",
+ "TK_WarfareBFieldhHospital_EP1",
+ "US_WarfareBFieldhHospital_Base_EP1",
+ "US_WarfareBFieldhHospital_EP1",
+ "MASH_EP1",
+ "MASH",
+ "Land_A_Hospital",
+ "CDF_WarfareBFieldhHospital",
+ "GUE_WarfareBFieldhHospital",
+ "INS_WarfareBFieldhHospital",
+ "RU_WarfareBFieldhHospital",
+ "USMC_WarfareBFieldhHospital"
+ ];
+
+_objects = (lineIntersectsWith [_unit modelToWorld [0, 0, (_eyePos select 2)], _unit modelToWorld [0, 0, (_eyePos select 2) +10], _unit]);
+{
+ if (((typeOf _x) in _medicalFacility) || (_x getVariable ["cse_medical_facility",false])) exitwith {
+ _isInBuilding = true;
+ };
+}foreach _objects;
+if (!_isInBuilding) then {
+ _objects = position _unit nearObjects 7.5;
+ {
+ if (((typeOf _x) in _medicalFacility) || (_x getVariable ["cse_medical_facility",false])) exitwith {
+ _isInBuilding = true;
+ };
+ }foreach _objects;
+};
+_isInBuilding
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_initForUnit_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_initForUnit_CMS.sqf
new file mode 100644
index 0000000000..107fc20996
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_initForUnit_CMS.sqf
@@ -0,0 +1,33 @@
+/**
+ * fn_initForUnit_CMS.sqf
+ * @Descr: Deprecated. Is no longer used, as we dropped init eventhandler methods.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_handler"];
+ _unit = _this select 0;
+ if (!local _unit) exitwith {[format["UNIT IS NOT LOCAL: %1",_this]] call cse_fnc_debug;};
+ if !(_unit isKindOf "CAManBase") exitwith{[format["UNIT IS NOT CAManBase: %1",_this]] call cse_fnc_debug;};
+ if (isPlayer _unit) then {
+ [_unit] spawn {
+ disableSerialization;
+ _CMSFadingBlackUI = uiNamespace getVariable "CMSFadingBlackUI";
+ if (!isnil "_CMSFadingBlackUI") then {
+ _ctrlFadingBlackUI = _CMSFadingBlackUI displayCtrl 11112;
+ 2 fadeSound 1;
+ _ctrlFadingBlackUI ctrlSetTextColor [0.0,0.0,0.0,0.0];
+ };
+ waituntil {!isnil "cse_fnc_effectsLoop_CMS"};
+ [_this select 0] call cse_fnc_effectsLoop_CMS;
+ };
+ };
+
+{
+ if(_x == "FirstAidKit" || {_x == "Medikit" || {_x isKindOf "FirstAidKit" || {_x isKindOf "Medikit"}}}) then {
+ _unit removeItem _x;
+ };
+}foreach (items _unit);
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_isMedicalVehicle_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_isMedicalVehicle_CMS.sqf
new file mode 100644
index 0000000000..cf498be577
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_isMedicalVehicle_CMS.sqf
@@ -0,0 +1,15 @@
+/**
+ * fn_isMedicalVehicle_CMS.sqf
+ * @Descr: Check if vehicle is a medical vehicle
+ * @Author: Glowbal
+ *
+ * @Arguments: [vehicle OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+private ["_veh"];
+_veh = _this select 0;
+
+if !(_veh getvariable ["cse_medicalVehicle_CMS", true]) exitwith {false}; // exit in case the false is set.
+((getNumber(configFile >> "CfgVehicles" >> typeOf _veh >> "cse_medicalVehicle") == 1) || (_veh getvariable ["cse_medicalVehicle_CMS", false]));
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_medicClass_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_medicClass_CMS.sqf
new file mode 100644
index 0000000000..b13c9b0c20
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_medicClass_CMS.sqf
@@ -0,0 +1,31 @@
+/**
+ * fn_medicClass_CMS.sqf
+ * @Descr: Check if a unit is any medical class above normal.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+private ["_unit","_class","_return"];
+_unit = [_this, 0, objNull,[ObjNull]] call BIS_fnc_Param;
+
+if (isnil "CSE_ADVANCED_MEDICAL_ROLES_CMS") exitwith {
+ true;
+};
+
+if (CSE_ADVANCED_MEDICAL_ROLES_CMS) then {
+ _class = [_unit,"cse_medicClass"] call cse_fnc_getVariable;
+ _return = switch (_class) do {
+ case 0: {false};
+ case 1: {true};
+ case 2: {true};
+ default {false};
+
+ };
+} else {
+ _return = true;
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_onUnconscious_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_onUnconscious_CMS.sqf
new file mode 100644
index 0000000000..a859c8b996
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_onUnconscious_CMS.sqf
@@ -0,0 +1,14 @@
+
+private ["_unit", "_state"];
+_unit = _this select 0;
+_state = _this select 1;
+
+if (_state) then {
+ if (CSE_ALLOW_AIRWAY_INJURIES_CMS) then {
+ if (random(1) >= 0.3) then {
+ _unit setvariable ["cse_airwayOccluded", true, true];
+ };
+ };
+} else {
+
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_placeInBodyBag_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_placeInBodyBag_CMS.sqf
new file mode 100644
index 0000000000..0b385fa7a0
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_placeInBodyBag_CMS.sqf
@@ -0,0 +1,41 @@
+/**
+ * fn_placeInBodyBag_CMS.sqf
+ * @Descr:
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: true
+ */
+
+private ["_unit","_caller"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+if !([_caller, "cse_itemBodyBag"] call cse_fnc_hasItem) exitwith {};
+
+[_caller, "cse_itemBodyBag"] call cse_fnc_useItem;
+
+_nameOfUnit = [_unit] call cse_fnc_getName;
+if (alive _unit) then {
+ // force kill the unit.
+ [_unit, true] call cse_fnc_setDead;
+};
+_onPosition = getPos _unit;
+_allVariables = [_unit] call cse_fnc_getAllSetVariables;
+deleteVehicle _unit;
+
+_bodyBagCreated = createVehicle ["cse_bodyBag", _onPosition, [], 0, "NONE"];
+_bodyBagCreated setvariable ["cse_nameOfBody", _nameOfUnit, true];
+
+{
+// [_bodyBagCreated,_x select 0, _x select 2] call cse_fnc_setVariable;
+}foreach _allVariables;
+// reset the position to ensure it is on the correct one.
+_bodyBagCreated setPos _onPosition;
+
+[[_bodyBagCreated], "cse_fnc_revealObject_f", true] spawn bis_fnc_MP;
+
+_bodyBagCreated setvariable ["CSE_Logistics_Enable_drag", true, true];
+
+_bodyBagCreated;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_playInjuredSound_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_playInjuredSound_CMS.sqf
new file mode 100644
index 0000000000..06991a7497
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_playInjuredSound_CMS.sqf
@@ -0,0 +1,74 @@
+/**
+ * fn_playInjuredSound_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit","_amountOfDamage","_bodyPartStatus","_availableSounds_A","_availableSounds_B","_availableSounds_C","_sound"];
+_unit = _this select 0;
+if (!local _unit) exitwith{};
+
+if ((_unit getvariable ["CSE_PLAYING_INJURED_SOUND_CMS",false])) exitwith {};
+_unit setvariable ["CSE_PLAYING_INJURED_SOUND_CMS",true];
+_availableSounds_A = [
+ "WoundedGuyA_01",
+ "WoundedGuyA_02",
+ "WoundedGuyA_03",
+ "WoundedGuyA_04",
+ "WoundedGuyA_05",
+ "WoundedGuyA_06",
+ "WoundedGuyA_07",
+ "WoundedGuyA_08"
+];
+_availableSounds_B = [
+ "WoundedGuyB_01",
+ "WoundedGuyB_02",
+ "WoundedGuyB_03",
+ "WoundedGuyB_04",
+ "WoundedGuyB_05",
+ "WoundedGuyB_06",
+ "WoundedGuyB_07",
+ "WoundedGuyB_08"
+];
+_availableSounds_C = [
+ "WoundedGuyC_01",
+ "WoundedGuyC_02",
+ "WoundedGuyC_03",
+ "WoundedGuyC_04",
+ "WoundedGuyC_05"
+];
+
+_bodyPartStatus = [_unit,"cse_bodyPartStatus"] call cse_fnc_getvariable;
+
+_amountOfDamage = 0;
+{
+ _amountOfDamage = _amountOfDamage + _x;
+}foreach _bodyPartStatus;
+
+
+if (_amountOfDamage > 0) then {
+ _sound = "";
+ if (_amountOfDamage > 1) then {
+ if (random(1) > 0.5) then {
+ _sound = _availableSounds_A select (round(random((count _availableSounds_A) - 1)));
+ } else {
+ _sound = _availableSounds_B select (round(random((count _availableSounds_B) - 1)));
+ };
+ } else {
+ _sound = _availableSounds_B select (round(random((count _availableSounds_B) - 1)));
+ };
+ [[_unit,_sound], "cse_fnc_broadcastSound3D_F", true, false] spawn BIS_fnc_MP;
+ if (_amountOfDamage < 1) then {
+ sleep 10;
+ sleep (random(50));
+ } else {
+ sleep (60 / _amountOfDamage);
+ };
+
+};
+_unit setvariable ["CSE_PLAYING_INJURED_SOUND_CMS",nil];
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_setDead_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_setDead_CMS.sqf
new file mode 100644
index 0000000000..c049473ae8
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_setDead_CMS.sqf
@@ -0,0 +1,22 @@
+/**
+ * fn_setDead_CMS.sqf
+ * @Descr: Set a unit dead from within CMS.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+private ["_unit"];
+_unit = _this select 0;
+
+if (!alive _unit) exitwith{};
+if (!local _unit) exitwith {};
+
+[_unit, "cse_pain",0,true] call cse_fnc_setVariable;
+[_unit, "cse_heartRate",0,true] call cse_fnc_setVariable;
+[_unit, "cse_bloodPressure", [0,0],true] call cse_fnc_setVariable;
+[_unit, "cse_airway", 3, true] call cse_fnc_setVariable;
+
+[_unit] call cse_fnc_setDead; // calling framework function
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_setMedicRole_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_setMedicRole_CMS.sqf
new file mode 100644
index 0000000000..3459341faf
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_setMedicRole_CMS.sqf
@@ -0,0 +1,19 @@
+/**
+ * fn_setMedicRole_CMS.sqf
+ * @Descr: Register a unit as a medic
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (Any unit of type CAManBase), value NUMBER (0 is normal. 1 or above is medic)]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+private ["_unit","_value"];
+_unit = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
+_value = [_this, 1, false,[false]] call BIS_fnc_param;
+
+if (_unit isKindOf "CaManBase") then {
+ if (_value) then {
+ _unit setvariable ["cse_medicClass",1,true];
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/fn_updateAttributes_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/fn_updateAttributes_CMS.sqf
new file mode 100644
index 0000000000..c68b15c954
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/fn_updateAttributes_CMS.sqf
@@ -0,0 +1,209 @@
+/**
+ * fn_updateAttributes_CMS.sqf
+ * @Descr: This is the old update vitals script. It is here just in case we need to make the switch back to the old version but is not used.
+ * @Author: Glowbal
+ * @DEPRECATED
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+
+// OLD ALGHORIM
+private ["_unit","_bloodVolume","_bloodPressure","_bloodPressureLow","_bloodPressureHigh","_heartRate","_totalBloodLoss","_hrIncrease","_bpIncreaseHigh","_bpIncreaseLow","_speed","_ivVolume","_painStatus","_showedHint", "_modifier"];
+_unit = _this select 0;
+
+_bloodVolume = [_unit,"cse_bloodVolume"] call cse_fnc_getVariable;
+_bloodPressure = [_unit,"cse_bloodPressure"] call cse_fnc_getVariable;
+_bloodPressureLow = _bloodPressure select 0;
+_bloodPressureHigh = _bloodPressure select 1;
+_heartRate = [_unit,"cse_heartRate"] call cse_fnc_getVariable;
+_painStatus = [_unit,"cse_pain",0] call cse_fnc_getVariable;
+_totalBloodLoss = _unit call cse_fnc_getBloodLoss_CMS;
+_hrIncrease = 0;
+_bpIncreaseHigh = 0;
+_bpIncreaseLow = 0;
+
+// _totalBloodLoss affecting Heart Rate and bloodpressure
+
+ if (_totalBloodLoss >0.0) then {
+ if (_totalBloodLoss <0.5) then {
+ if (_heartRate < 126) then {
+ _hrIncrease = _hrIncrease + 0.5;
+ };
+ } else {
+ if (_totalBloodLoss < 1) then {
+ if (_heartRate < 161) then {
+ _hrIncrease = _hrIncrease + 1;
+ };
+ if (_bloodPressureLow > 60 && _bloodVolume < 95) then {
+ _bpIncreaseLow = _bpIncreaseLow - 0.5;
+ };
+ } else {
+ if (_heartRate < 220) then {
+ _hrIncrease = _hrIncrease + 1.5;
+ };
+ if (_bloodPressureLow > 60 && _bloodVolume < 95) then {
+ _bpIncreaseLow = _bpIncreaseLow - 2;
+ };
+ };
+ };
+ };
+
+ if ((_totalBloodLoss == 0) && _bloodVolume > 80) then {
+ if (_bloodPressureLow < 80) then {
+ _bpIncreaseLow = _bpIncreaseLow + 1;
+ };
+ if (_bloodPressureHigh < 120) then {
+ _bpIncreaseHigh = _bpIncreaseHigh + 1;
+ };
+ if (_bloodPressureLow > 100) then {
+ _bpIncreaseLow = _bpIncreaseLow - 1;
+ };
+ if (_bloodPressureHigh > 120) then {
+ _bpIncreaseHigh = _bpIncreaseHigh - 1;
+ };
+ };
+
+ // affecting Heart Rate
+ if !(_unit getvariable ["cse_cardiacArrest",false]) then {
+ if (_bloodPressureLow > 50 && _bloodPressureHigh < 130) then {
+ if (_bloodPressureHigh > 70 && _bloodPressureHigh < 190) then {
+ _speed = abs(speed _unit);
+ if (_speed > 0 && _bloodVolume > 60) then {
+ if (_speed > 10 && (vehicle _unit == _unit)) then {
+ if (_heartRate <100) then {
+ _hrIncrease = _hrIncrease + (_speed/200);
+ };
+ };
+ } else {
+ if (_bloodVolume > 60 && _totalBloodLoss == 0) then {
+ if (_heartRate < (60 + round(random(10)))) then {
+ _hrIncrease = _hrIncrease + 0.2;
+ } else {
+ if (_heartRate > (77 + round(random(10)))) then {
+ _hrIncrease = _hrIncrease - 0.2;
+ };
+ };
+ };
+ };
+ if (_bloodVolume < 60 && _bloodPressureLow<60 && _bloodPressureHigh < 90 && _hrIncrease <1) then {
+ _hrIncrease = _hrIncrease + 1;
+ };
+ if (_bloodVolume < 40) then {
+ _hrIncrease = _hrIncrease - 3;
+ };
+ };
+ } else {
+ };
+ };
+
+ if (_heartRate > 10) then {
+ if (_totalBloodLoss == 0 && _hrIncrease>0) then {
+ _bpIncreaseLow = _bpIncreaseLow + (_hrIncrease/2);
+ _bpIncreaseHigh = _bpIncreaseHigh + (_hrIncrease/2)
+ };
+
+ if (_hrIncrease<0) then {
+ _bpIncreaseLow = _bpIncreaseLow - 0.5;
+ _bpIncreaseHigh = _bpIncreaseHigh - 1.5;
+ };
+ if (_totalBloodLoss > 0 && _totalBloodLoss < 1 && _hrIncrease>0) then {
+ _bpIncreaseLow = _bpIncreaseLow + 0.03;
+ _bpIncreaseHigh = _bpIncreaseHigh + 0.03;
+ };
+ };
+ _showedHint = false;
+ if (_totalBloodLoss >0) then {
+ if !(_unit getvariable ["cse_isBleeding_CMS",false]) then {
+ [_unit, "cse_isBleeding_CMS",true] call cse_fnc_setVariable;
+ if (CSE_DISPLAY_ADDITIONAL_HINTS_CMS) then {
+ _showedHint = true;
+ [_unit,"Injured","You are bleeding!",1] call cse_fnc_sendDisplayMessageTo;
+ };
+ };
+ } else {
+ if (_unit getvariable ["cse_isBleeding_CMS",false]) then {
+ [_unit, "cse_isBleeding_CMS",false] call cse_fnc_setVariable;
+ };
+ };
+ if (_painStatus > 0) then {
+ if !(_unit getvariable ["cse_hasPain_CMS",false]) then {
+ [_unit, "cse_hasPain_CMS",true] call cse_fnc_setVariable;
+ if (CSE_DISPLAY_ADDITIONAL_HINTS_CMS && !_showedHint) then {
+ [_unit,"Injured","You are in Pain!",1] call cse_fnc_sendDisplayMessageTo;
+ };
+ };
+
+ } else {
+ if (_unit getvariable ["cse_hasPain_CMS",false]) then {
+ [_unit, "cse_hasPain_CMS",false] call cse_fnc_setVariable;
+ };
+ };
+
+_modifier = 1;
+if (!([_unit] call cse_fnc_isAwake)) then {
+ _modifier = 0.5;
+};
+
+_bloodVolume = _bloodVolume - (_totalBloodLoss * _modifier);
+
+ _heartRate = _heartRate + (_hrIncrease * _modifier);
+ _bloodPressureLow = _bloodPressureLow + (_bpIncreaseLow * _modifier);
+ _bloodPressureHigh = _bloodPressureHigh + (_bpIncreaseHigh * _modifier);
+ // Safety checks, prefent values below zero
+ if (_bloodPressureLow <0) then {
+ _bloodPressureLow = 0;
+ };
+ if (_bloodPressureHigh < _bloodPressureLow) then {
+ _bloodPressureHigh = _bloodPressureLow + 10;
+ };
+ _bloodPressure = [_bloodPressureLow, _bloodPressureHigh];
+
+ if (_heartRate <0) then {
+ _heartRate = 0;
+ };
+
+if (_bloodVolume < 100.0) then {
+ if (_bloodVolume <0) then {
+ _bloodVolume = 0;
+ };
+ if (([_unit,"cse_salineIVVolume",0] call cse_fnc_getvariable) > 0) then {
+ _bloodVolume = _bloodVolume + 0.2;
+ _ivVolume = ([_unit,"cse_salineIVVolume",0] call cse_fnc_getvariable) - 0.2;
+ _unit setvariable ["cse_salineIVVolume",_ivVolume];
+ };
+ if (([_unit,"cse_plasmaIVVolume",0] call cse_fnc_getvariable) > 0) then {
+ _bloodVolume = _bloodVolume + 0.2;
+ _ivVolume = ([_unit,"cse_plasmaIVVolume",0] call cse_fnc_getvariable) - 0.2;
+ _unit setvariable ["cse_plasmaIVVolume",_ivVolume];
+ };
+ if (([_unit,"cse_bloodIVVolume",0] call cse_fnc_getvariable) > 0) then {
+ _bloodVolume = _bloodVolume + 0.2;
+ _ivVolume = ([_unit,"cse_bloodIVVolume",0] call cse_fnc_getvariable) - 0.2;
+ _unit setvariable ["cse_bloodIVVolume",_ivVolume];
+ };
+
+} else {
+ if (_bloodVolume > 100) then {
+ _bloodVolume = 100;
+ };
+};
+
+if (_bloodVolume < 90) then {
+ if !(_unit getvariable ["cse_hasLostBlood_CMS",false]) then {
+ [_unit, "cse_hasLostBlood_CMS",true] call cse_fnc_setVariable;
+ };
+} else {
+ if (_unit getvariable ["cse_hasLostBlood_CMS",false]) then {
+ [_unit, "cse_hasLostBlood_CMS",false] call cse_fnc_setVariable;
+ };
+};
+
+[_unit,"cse_bloodVolume",_bloodVolume] call cse_fnc_setVariable;
+[_unit,"cse_bloodPressure",_bloodPressure] call cse_fnc_setVariable;
+[_unit,"cse_heartRate",_heartRate] call cse_fnc_setVariable;
+
+
+[_unit,_bloodVolume,_bloodPressure,_heartRate] call cse_fnc_bloodConditions_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignAirwayStatus_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignAirwayStatus_CMS.sqf
new file mode 100644
index 0000000000..920dd3166c
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignAirwayStatus_CMS.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_assignAirwayStatus_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit", "_amountOfDamage", "_typeOfInjury", "_bodyPartn","_airwayItem","_airwayStatus","_selection", "_airwayIncrease"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_typeOfInjury = _this select 2;
+_bodyPartn = _this select 3;
+
+// only the head
+if (_bodyPartn != 0) exitwith {};
+
+if (_amountOfDamage > 0.4) then {
+ if (random(1) >= 0.8) then {
+ _unit setvariable ["cse_airwayCollapsed", true, true];
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignFractures_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignFractures_CMS.sqf
new file mode 100644
index 0000000000..6c180b81c0
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignFractures_CMS.sqf
@@ -0,0 +1,69 @@
+/**
+ * fn_assignFractures_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit", "_amountOfDamage", "_typeOfInjury", "_bodyPartn","_amountOfBrokenBones","_fractures","_size","_selection"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_typeOfInjury = _this select 2;
+_bodyPartn = _this select 3;
+_amountOfBrokenBones = 1;
+_size = 1;
+if (_amountOfDamage > 0.05) then {
+ switch (_typeOfInjury) do {
+ case "Bullet": {
+ _amountOfBrokenBones = 1;
+ _size = round(random(2));
+ };
+ case "Grenade": {
+ _amountOfBrokenBones = 1;
+ _size = round(random(2));
+ if (_size < 1) then {
+ _size = 1;
+ };
+ };
+ case "Explosive": {
+ _amountOfBrokenBones = 1;
+ _size = round(random(2));
+ if (_size < 1) then {
+ _size = 1;
+ };
+ };
+ case "Shell": {
+ _amountOfBrokenBones = 1;
+ _size = round(random(2));
+ if (_size < 1) then {
+ _size = 1;
+ };
+ };
+ case "Unknown": {
+ _amountOfBrokenBones = 1;
+ _size = round(random(1));
+ };
+ case "Crash": {
+ _amountOfBrokenBones = 0;
+ _size = round(random(0));
+ };
+ default {
+ _amountOfBrokenBones = 1;
+ _size = round(random(1));
+ };
+ };
+ if (_size > 2) then {
+ _size = 3;
+ };
+
+ _fractures = [_unit,"cse_fractures"] call cse_fnc_getVariable;
+ _selection = _fractures select _bodyPartn;
+ _selection set [ _size, (_selection select _size) + _amountOfBrokenBones ];
+ _fractures set [ _bodyPartn , _selection];
+
+ [_unit, "cse_fractures",_fractures] call cse_fnc_setVariable;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignOpenWounds_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignOpenWounds_CMS.sqf
new file mode 100644
index 0000000000..17727c581f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_assignOpenWounds_CMS.sqf
@@ -0,0 +1,70 @@
+/**
+ * fn_assignOpenWounds_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit", "_amountOfDamage", "_typeOfInjury", "_bodyPartn","_sizeOfWound","_amountOfNewWounds", "_return"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_typeOfInjury = _this select 2;
+_bodyPartn = _this select 3;
+_sizeOfWound = 0;
+_amountOfNewWounds = 0;
+
+_return = false;
+if (_amountOfDamage > 0.05) then {
+ switch (_typeOfInjury) do {
+ case "Bullet": {
+ _amountOfNewWounds = 1;
+ _sizeOfWound = round(random(2));
+ };
+ case "Grenade": {
+ _amountOfNewWounds = 1;
+ _sizeOfWound = round(random(2));
+ if (_sizeOfWound < 1) then {
+ _sizeOfWound = 1;
+ };
+ };
+ case "Explosive": {
+ _amountOfNewWounds = 1;
+ _sizeOfWound = round(random(2));
+ if (_sizeOfWound < 1) then {
+ _sizeOfWound = 1;
+ };
+ };
+ case "Shell": {
+ _amountOfNewWounds = 1;
+ _sizeOfWound = round(random(2));
+ if (_sizeOfWound < 1) then {
+ _sizeOfWound = 1;
+ };
+ };
+ case "Unknown": {
+ _amountOfNewWounds = 1;
+ _sizeOfWound = round(random(1));
+ };
+ case "VehicleCrash": {
+ _amountOfNewWounds = if (random(1)>=0.5) then{0}else{1};
+ _sizeOfWound = round(random(1));
+ };
+ default {
+ _amountOfNewWounds = 1;
+ _sizeOfWound = round(random(1));
+ };
+ };
+ if (_sizeOfWound > 2) then {
+ _sizeOfWound = 3;
+ };
+ if (_amountOfNewWounds>0) then {
+ [_unit, _bodyPartn, _sizeOfWound, _amountOfNewWounds] call cse_fnc_addOpenWounds_CMS;
+ _return = true;
+ };
+};
+
+_return;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_damageBodyPart_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_damageBodyPart_CMS.sqf
new file mode 100644
index 0000000000..6796d65f3a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_damageBodyPart_CMS.sqf
@@ -0,0 +1,24 @@
+
+private ["_unit", "_bodyPart", "_amountOfDamage"];
+_unit = _this select 0;
+_bodyPart = _this select 1;
+_amountOfDamage = _this select 2;
+if (alive _unit) then {
+ _hitPointName = switch (_bodyPart) do {
+ case 0: {"hitHead"};
+ case 1: {"hitBody"};
+ case 2: {"hitHands"};
+ case 3: {"hitHands"};
+ case 4: {"hitLegs"};
+ case 5: {"hitLegs"};
+ default {"hitLegs"};
+ };
+
+ if (_amountOfDamage < 0.95) then {
+ _unit setHitPointDamage [_hitPointName, _amountOfDamage];
+ _unit setHit [_selectionName, _amountOfDamage];
+ } else {
+ _unit setHitPointDamage [_hitPointName, 0.95];
+ _unit setHit [_selectionName, 0.95];
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_determineIfFatal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_determineIfFatal_CMS.sqf
new file mode 100644
index 0000000000..ba0f005d9f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_determineIfFatal_CMS.sqf
@@ -0,0 +1,41 @@
+/**
+ * fn_determineIfFatal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#define DEFAULT_DAMAGE_THRESHOLD 1
+
+private ["_unit","_part","_damageThreshold"];
+_unit = _this select 0;
+_part = _this select 1;
+
+if (!alive _unit) exitwith {true};
+
+if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true };
+
+// Find the correct Damage threshold for unit.
+_damageThreshold = [1,1,1];
+if (isPlayer _unit) then {
+ _damageThreshold =_unit getvariable["cse_damageThresholds_players_cms", [CSE_DAMAGE_THRESHOLD_PLAYERS_DMG, CSE_DAMAGE_THRESHOLD_PLAYERS_DMG, CSE_DAMAGE_THRESHOLD_PLAYERS_DMG]];
+} else {
+ _damageThreshold =_unit getvariable["cse_damageThresholds_AI_cms", [CSE_DAMAGE_THRESHOLD_AI_DMG, CSE_DAMAGE_THRESHOLD_AI_DMG, CSE_DAMAGE_THRESHOLD_AI_DMG]];
+};
+
+_damageBodyPart = ([_unit,"cse_bodyPartStatus",[0,0,0,0,0,0]] call cse_fnc_getVariable) select _part;
+
+// Check if damage to body part is higher as damage head
+if (_part == 0) exitwith {
+ (_damageBodyPart >= (_damageThreshold select 0) && {(random(1) > 0.2)});
+};
+
+// Check if damage to body part is higher as damage torso
+if (_part == 1) exitwith {
+ (_damageBodyPart >= (_damageThreshold select 1) && {(random(1) > 0.2)});
+};
+// Check if damage to body part is higher as damage limbs
+(_damageBodyPart >= (_damageThreshold select 2) && {(random(1) > 0.95)});
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_determineIfUnconscious_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_determineIfUnconscious_CMS.sqf
new file mode 100644
index 0000000000..dd0ece2d92
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_determineIfUnconscious_CMS.sqf
@@ -0,0 +1,38 @@
+/**
+ * fn_determineIfUnconscious_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_part","_damageThreshold"];
+_unit = _this select 0;
+_part = _this select 1;
+
+if (!alive _unit) exitwith { true };
+
+if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitwith { true };
+
+// Find the correct Damage threshold for unit.
+_damageThreshold = if (isPlayer _unit) then {
+ missionNamespace getvariable["cse_damageThresholds_players_cms", [CSE_DAMAGE_THRESHOLD_PLAYERS_DMG, CSE_DAMAGE_THRESHOLD_PLAYERS_DMG, CSE_DAMAGE_THRESHOLD_PLAYERS_DMG]];
+} else {
+ missionNamespace getvariable["cse_damageThresholds_AI_cms", [CSE_DAMAGE_THRESHOLD_AI_DMG, CSE_DAMAGE_THRESHOLD_AI_DMG, CSE_DAMAGE_THRESHOLD_AI_DMG]];
+};
+
+_damageBodyPart = ([_unit,"cse_bodyPartStatus",[0,0,0,0,0,0]] call cse_fnc_getVariable) select _part;
+
+// Check if damage to body part is higher as damage head
+if (_part == 0) exitwith {
+ ((_damageBodyPart * CSE_MEDICAL_DIFFICULTY) >= ((_damageThreshold select 0) * 0.7) && {(random(1) > 0.35)});
+};
+
+// Check if damage to body part is higher as damage torso
+if (_part == 1) exitwith {
+ ((_damageBodyPart * CSE_MEDICAL_DIFFICULTY) >= ((_damageThreshold select 1) * 0.5) && {(random(1) > 0.4)});
+};
+// Check if damage to body part is higher as damage limbs
+((_damageBodyPart * CSE_MEDICAL_DIFFICULTY) >= ((_damageThreshold select 2) * 0.8) && {(random(1) > 0.7)});
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getBodyPartNumber_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getBodyPartNumber_CMS.sqf
new file mode 100644
index 0000000000..fbd8e3b0c1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getBodyPartNumber_CMS.sqf
@@ -0,0 +1,53 @@
+/**
+ * fn_getBodyPartNumber_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_selectionName","_part"];
+_selectionName = _this select 0;
+
+ _part = -1;
+ _part = switch (_selectionName) do {
+ case "head": {
+ 0
+ };
+ case "body": {
+ 1
+ };
+ case "hands": {
+ if (random(1)>0.499) then {
+ 2
+ } else {
+ 3
+ };
+ };
+ case "hand_l": {
+ 2
+ };
+ case "hand_r": {
+ 3
+ };
+ case "legs": {
+ if (random(1)>0.499) then {
+ 4
+ } else {
+ 5
+ };
+ };
+ case "leg_l": {
+ 4
+ };
+ case "leg_r": {
+ 5
+ };
+ default {
+ -1
+ };
+ };
+_part
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getNewDamageBodyPart_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getNewDamageBodyPart_CMS.sqf
new file mode 100644
index 0000000000..4408d288f1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getNewDamageBodyPart_CMS.sqf
@@ -0,0 +1,27 @@
+/**
+ * fn_getNewDamageBodyPart_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit","_selectionName","_newDamage", "_previousDamage", "_origDamage"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_number = _this select 2;
+
+_previousDamage = _unit getvariable ["cse_bodyPartStatusPrevious_cms", [0,0,0,0,0,0]];
+_newDamage = _amountOfDamage - (_previousDamage select _number);
+_previousDamage set [_number, _newDamage];
+[_unit,"cse_bodyPartStatusPrevious_cms",_previousDamage] call cse_fnc_setVariable;
+
+
+_origDamage = [_unit,"cse_bodyPartStatus",[0,0,0,0,0,0]] call cse_fnc_getVariable;
+_origDamage set [_number, (_origDamage select _number) + _newDamage]; /* We are storing the total Damage done on a body part for determining the damage properly */
+[_unit,"cse_bodyPartStatus",_origDamage] call cse_fnc_setVariable;
+
+_newDamage
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getTypeOfDamage_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getTypeOfDamage_CMS.sqf
new file mode 100644
index 0000000000..9adbcfb217
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_getTypeOfDamage_CMS.sqf
@@ -0,0 +1,29 @@
+/**
+ * fn_getTypeOfDamage_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_typeOfProjectile","_typeOfInjury"];
+_typeOfProjectile = _this select 0;
+_typeOfInjury = switch (true) do {
+ case (_typeOfProjectile iskindof "BulletBase"): {"Bullet"};
+ case (_typeOfProjectile iskindof "GrenadeCore"): {"Grenade"};
+ case (_typeOfProjectile iskindof "TimeBombCore"): {"Explosive"};
+ case (_typeOfProjectile iskindof "MineCore"): {"Explosive"};
+ case (_typeOfProjectile iskindof "FuelExplosion"): {"Explosive"};
+ case (_typeOfProjectile iskindof "ShellBase"): {"Shell"};
+ case (_typeOfProjectile iskindof "RocketBase"): {"Explosive"};
+ case (_typeOfProjectile iskindof "MissileBase"): {"Explosive"};
+ case (_typeOfProjectile iskindof "LaserBombCore"): {"Explosive"};
+ case (_typeOfProjectile iskindof "BombCore"): {"Explosive"};
+ case (_typeOfProjectile iskindof "Grenade"): {"Grenade"};
+ case (_typeOfProjectile == "VehicleCrash"): {"VehicleCrash"};
+ default {"Unknown"};
+};
+_typeOfInjury
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_handleDamage_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_handleDamage_CMS.sqf
new file mode 100644
index 0000000000..12979ebf57
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_handleDamage_CMS.sqf
@@ -0,0 +1,81 @@
+/**
+ * fn_handleDamage_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_selectionName","_amountOfDamage","_sourceOfDamage", "_typeOfProjectile","_bodyPartn","_newDamage","_typeOfDamage","_caliber", "_hitPointName", "_returnDamage", "_varCheck"];
+_unit = _this select 0;
+_selectionName = _this select 1;
+_amountOfDamage = _this select 2;
+_sourceOfDamage = _this select 3;
+_typeOfProjectile = _this select 4;
+_returnDamage = _amountOfDamage;
+
+_bodyPartn = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+
+
+// Check for vehicle crash
+if (vehicle _unit != _unit && {_bodyPartn < 0} && {isNull _sourceOfDamage} && {_typeOfProjectile == ""} && {_selectionName == ""}) then {
+ if (CSE_ALLOW_VEH_CRASH_INJURIES_CMS) then {
+ _bodyPartn = if (random(1)>=0.5) then { 0 } else { 1 };
+ _typeOfProjectile = "VehicleCrash";
+ };
+};
+
+// If it is not a valid bodyPart number, exit because we cannot do anything with it.
+if (_bodyPartn < 0) exitwith {0};
+
+// Most likely taking exessive fire damage. Lets exit.
+if (isNull _sourceOfDamage && (_selectionName == "head" || isBurning _unit) && _typeOfProjectile == "" && vehicle _unit == _unit) exitwith {
+ 0
+}; // Prefent excessive fire damage
+
+if (local _unit && {([_unit] call cse_fnc_hasMedicalEnabled_CMS)}) then {
+ if (_amountOfDamage < 0) then {
+ _amountOfDamage = 0;
+ };
+
+ // Ensure damage is being handled correctly.
+ [_unit, _bodyPartn, _amountOfDamage] call cse_fnc_damageBodyPart_CMS;
+ _newDamage = [_unit, _amountOfDamage, _bodyPartn] call cse_fnc_getNewDamageBodyPart_CMS;
+
+ // figure out the type of damage so we can use that to determine what injures should be given.
+ _typeOfDamage = [_typeOfProjectile] call cse_fnc_getTypeOfDamage_CMS;
+
+ if !([_unit, _newDamage, _typeOfDamage, _bodyPartn] call cse_fnc_assignOpenWounds_CMS) then {
+ _returnDamage = 0;
+ };
+
+ //[_unit,_newDamage,_typeOfDamage,_bodyPartn] call cse_fnc_assignFractures_CMS;
+ if (CSE_ALLOW_AIRWAY_INJURIES_CMS) then {
+ [_unit, _amountOfDamage, _typeOfDamage, _bodyPartn] call cse_fnc_assignAirwayStatus_CMS;
+ };
+ [_unit,_newDamage,_bodyPartn] call cse_fnc_increasePain_CMS;
+
+ if (([_unit, _bodyPartn] call cse_fnc_determineIfFatal_CMS) || !(alive (vehicle _unit))) then {
+ [_unit] call cse_fnc_setDead_CMS;
+ _returnDamage = 1;
+ } else {
+ [_unit] call cse_fnc_unitLoop_CMS;
+ if ([_unit, _bodyPartn] call cse_fnc_determineIfUnconscious_CMS) then {
+ [_unit] call cse_fnc_setUnconsciousState;
+ } else {
+ [_unit,_newDamage] call cse_fnc_reactionToHit_CMS;
+ };
+ if (_returnDamage > 0.95) then {
+ _returnDamage = 0.95;
+ };
+ };
+
+ if (!(alive (vehicle _unit))) then {
+ _returnDamage = 1;
+ [_unit] call cse_fnc_setDead_CMS;
+ };
+};
+
+_returnDamage
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_increasePain_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_increasePain_CMS.sqf
new file mode 100644
index 0000000000..b41934f512
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_increasePain_CMS.sqf
@@ -0,0 +1,40 @@
+/**
+ * fn_increasePain_CMS.sqf
+ * @Descr: Increase the pain level of a unit
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT, amount NUMBER, sectionName NUMBER (Also supports string representation of bodyparts)]
+ * @Return: nil
+ * @PublicAPI: true
+ */
+
+private ["_unit","_amountOfDamage","_selectionName","_sourceOfDamage","_painStatus"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_selectionName = _this select 2;
+_amountOfDamage = _amountOfDamage * 10;
+if (!alive _unit || (_amountOfDamage <= 0)) exitwith{};
+_painStatus = [_unit,"cse_pain",0] call cse_fnc_getVariable;
+
+if (typeName _selectionName == "STRING") then {
+ _selectionName = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+};
+
+_painStatus = switch (_selectionName) do {
+ case 0: {
+ _painStatus + (_amountOfDamage*1.5);
+ };
+ case 1: {
+ _painStatus + (_amountOfDamage*0.9);
+ };
+ case 2: {
+ _painStatus + (_amountOfDamage*0.8);
+ };
+ case 3: {
+ _painStatus + (_amountOfDamage*0.7);
+ };
+ default {_painStatus};
+};
+
+[_unit,"cse_pain",_painStatus] call cse_fnc_setVariable;
+nil;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/handledamage/fn_reactionToHit_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_reactionToHit_CMS.sqf
new file mode 100644
index 0000000000..b3d7959654
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/handledamage/fn_reactionToHit_CMS.sqf
@@ -0,0 +1,49 @@
+/**
+ * fn_reactionToHit_CMS.sqf
+ * @Descr: triggers a reaction to being hit for a unit and spawns on screen effects.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_amountOfDamage"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+
+if (_amountOfDamage > 0.2) then {
+ [_unit] spawn cse_fnc_playInjuredSound_CMS;
+ if ((vehicle _unit) isKindOf "StaticWeapon") exitwith {
+ if (_amountOfDamage > 1) then {
+ _unit action ["eject", vehicle _unit];
+ unassignVehicle _unit;
+ };
+ };
+ if (animationState _unit in ["ladderriflestatic","laddercivilstatic"]) exitwith {
+ _unit action ["ladderOff", (nearestBuilding _unit)];
+ };
+
+ if (vehicle _unit == _unit && [_unit] call cse_fnc_isAwake) then {
+ if (random(1) > 0.5) then {
+ _unit setDir ((getDir _unit) + 1 + random(30));
+ } else {
+ _unit setDir ((getDir _unit) - (1 + random(30)));
+ };
+ };
+ if (_amountOfDamage > 0.6) then {
+ if (random(1)>0.6) then {
+ [_unit] call cse_fnc_setProne;
+ };
+ };
+ if (isPlayer _unit) then {
+ 76 cutRsc ["RscCSEScreenEffectsHit","PLAIN"];
+ addCamShake [3, 5, _amountOfDamage + random 10];
+ };
+} else {
+ if (_amountOfDamage > 0) then {
+ if (isPlayer _unit) then {
+ 76 cutRsc ["RscCSEScreenEffectsHit","PLAIN"];
+ };
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_addInjury.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_addInjury.sqf
new file mode 100644
index 0000000000..d72d5dd393
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_addInjury.sqf
@@ -0,0 +1,11 @@
+
+
+_unit = _this select 0;
+_injury = _this select 1;
+// TODO implement injury vertifying check - is this a correct form of the injury?
+/* Injury map:
+
+*/
+_injuryVector = _unit getvariable ["cse_injuryVector",[]];
+_injuryVector pushback _injury;
+[_unit,"cse_injuryVector",_injuryVector] call cse_fnc_setVariable;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_createInjury.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_createInjury.sqf
new file mode 100644
index 0000000000..c0a6bb1a4d
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_createInjury.sqf
@@ -0,0 +1,22 @@
+
+private ["_injury","_injuryType","_bodyPart","_id"];
+
+_bodyPart = _this select 0;
+_injuryType = _this select 1;
+_souceType = _this select 2;
+
+/* Injury map:
+
+*/
+if (isnil "CSE_INJURY_ID_COUNTER_CMS") then {
+ CSE_INJURY_ID_COUNTER_CMS = 0;
+ CSE_INJURY_CREATION_MUTEX_CMS = false;
+};
+waituntil{!CSE_INJURY_CREATION_MUTEX_CMS};
+CSE_INJURY_CREATION_MUTEX_CMS = true;
+ _id = CSE_INJURY_ID_COUNTER_CMS + round(random(100)); /* implement ID creation check */
+ _injury = [_id, _bodyPart, _injuryType, _souceType , 1];
+ CSE_INJURY_ID_COUNTER_CMS = _id;
+CSE_INJURY_CREATION_MUTEX_CMS = false;
+
+_injury
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findBlastDamageInjury.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findBlastDamageInjury.sqf
new file mode 100644
index 0000000000..3ef1ffc258
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findBlastDamageInjury.sqf
@@ -0,0 +1,169 @@
+#include "cse\cse_sys_medical\injuryTypes.h"
+#include "cse\cse_sys_medical\bodyParts.h"
+
+private ["_bodyPart","_damage","_injuryTypeReturn"];
+_bodyPart = _this select 0;
+_damage = _this select 1;
+_distance = _this select 2;
+
+_injuryTypeReturn = [];
+if (_damage >0.2) then {
+ switch (_bodyPart) do {
+ case HEAD: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ };
+ };
+ };
+ };
+
+ case TORSO: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ };
+ };
+ };
+ };
+
+ case ARM_R: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ };
+ };
+ };
+ };
+
+ case ARM_L: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ };
+ };
+ };
+ };
+
+ case LEG_R: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ };
+ };
+ };
+ };
+
+ case LEG_L: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, HIGH_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ };
+ };
+ };
+ };
+
+ default {};
+ };
+} else {
+ if (_damage >0.01) then {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_BURN];
+ };
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCHRAPNEL_WOUND];
+ };
+ };
+};
+
+_injuryTypeReturn
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findBulletInjury.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findBulletInjury.sqf
new file mode 100644
index 0000000000..0a4a65a23b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findBulletInjury.sqf
@@ -0,0 +1,119 @@
+#include "cse\cse_sys_medical\injuryTypes.h"
+#include "cse\cse_sys_medical\bodyParts.h"
+
+private ["_bodyPart","_damage","_injuryTypeReturn"];
+_bodyPart = _this select 0;
+_damage = _this select 1;
+_distance = _this select 2;
+
+_injuryTypeReturn = [];
+if (_damage >0.2) then {
+ switch (_bodyPart) do {
+ case HEAD: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_GSW];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, GRAZE_WOUND];
+ };
+ };
+ };
+ };
+ case TORSO: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_GSW];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, GRAZE_WOUND];
+ };
+ };
+ };
+ };
+ case ARM_R: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_GSW];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, GRAZE_WOUND];
+ };
+ };
+ };
+ };
+ case ARM_L: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_GSW];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, GRAZE_WOUND];
+ };
+ };
+ };
+ };
+ case LEG_R: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_GSW];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, GRAZE_WOUND];
+ };
+ };
+ };
+ };
+ case LEG_L: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, LARGE_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_GSW];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_GSW];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_BURN];
+ _injuryTypeReturn set [count _injuryTypeReturn, GRAZE_WOUND];
+ };
+ };
+ };
+ };
+ default {};
+ };
+} else {
+ if (_damage >0.01) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_BURN];
+ };
+ };
+};
+
+_injuryTypeReturn
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findInjuryType.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findInjuryType.sqf
new file mode 100644
index 0000000000..fb67efde9f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findInjuryType.sqf
@@ -0,0 +1,32 @@
+
+private ["_bodyPart","_typeOfInjury","_distance","_damage","_return"];
+_bodyPart = _this select 0;
+_typeOfInjury = _this select 1;
+_damage = _this select 2;
+_distance = _this select 3;
+
+_return = [];
+switch (_typeOfInjury) do {
+ case "Bullet": {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findBulletInjury;
+ };
+ case "Grenade": {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findBlastDamageInjury;
+ };
+ case "Explosive": {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findBlastDamageInjury;
+ };
+ case "Shell": {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findBlastDamageInjury;
+ };
+ case "Unknown": {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findUnknownTypeInjury;
+ };
+ case "Crash": {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findUnknownTypeInjury;
+ };
+ default {
+ _return = [_bodyPart, _damage,_distance] call cse_fnc_findUnknownTypeInjury;
+ };
+};
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findUknownTypeInjury.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findUknownTypeInjury.sqf
new file mode 100644
index 0000000000..5430ea7da3
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_findUknownTypeInjury.sqf
@@ -0,0 +1,112 @@
+#include "cse\cse_sys_medical\injuryTypes.h"
+#include "cse\cse_sys_medical\bodyParts.h"
+
+private ["_bodyPart","_damage","_injuryTypeReturn"];
+_bodyPart = _this select 0;
+_damage = _this select 1;
+_distance = _this select 2;
+
+_injuryTypeReturn = [];
+if (_damage >0.2) then {
+ switch (_bodyPart) do {
+ case HEAD: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_CUT];
+ };
+ };
+ };
+ };
+ case TORSO: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_CUT];
+ };
+ };
+ };
+ };
+ case ARM_R: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_CUT];
+ };
+ };
+ };
+ };
+ case ARM_L: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_CUT];
+ };
+ };
+ };
+ };
+ case LEG_R: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_CUT];
+ };
+ };
+ };
+ };
+ case LEG_L: {
+ if (_damage > 0.4) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MEDIUM_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_OPEN_WOUND];
+ } else {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ } else {
+ _injuryTypeReturn set [count _injuryTypeReturn, MINOR_CUT];
+ };
+ };
+ };
+ };
+ default {};
+ };
+} else {
+ if (_damage >0.01) then {
+ if (random(1)>0.5) then {
+ _injuryTypeReturn set [count _injuryTypeReturn, SCRATCH];
+ };
+ };
+};
+
+_injuryTypeReturn
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_getAllIInjuriesOnBodyPart.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_getAllIInjuriesOnBodyPart.sqf
new file mode 100644
index 0000000000..c913b441d7
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_getAllIInjuriesOnBodyPart.sqf
@@ -0,0 +1,16 @@
+_unit = _this select 0;
+_bodyPart = _this select 1;
+
+
+/* Injury map:
+
+*/
+_injuryVector = _unit getvariable ["cse_injuryVector",[]];
+_return = [];
+{
+ if (_bodyPart == (_x select 1)) then {
+ _return set [ count _return, _x];
+ };
+}foreach _injuryVector;
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_removeInjury.sqf b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_removeInjury.sqf
new file mode 100644
index 0000000000..ec5c561942
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/injuryVector/fn_removeInjury.sqf
@@ -0,0 +1,20 @@
+
+private ["_unit","_injuryID","_toRemove"];
+_unit = _this select 0;
+_injuryID = _this select 1;
+/* Injury map:
+
+*/
+_injuryVector = _unit getvariable ["cse_injuryVector",[]];
+_toRemove = -1;
+{
+ if (_injuryID == (_x select 0)) then {
+ _toRemove = _forEachIndex;
+ };
+}foreach _injuryVector;
+
+if (_toRemove > 0) then {
+ _injuryVector set [_toRemove, objNull];
+ _injuryVector = _injuryVector - [ObjNull];
+ [_unit,"cse_injuryVector",_injuryVector] call cse_fnc_setVariable;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/loading/fn_loadLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/loading/fn_loadLocal_CMS.sqf
new file mode 100644
index 0000000000..a327bfec1a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/loading/fn_loadLocal_CMS.sqf
@@ -0,0 +1,42 @@
+/**
+ * fn_loadLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+// NO LONGER USED.
+
+private ["_unit","_vehicle","_caller"];
+_unit = _this select 0;
+_vehicle = _this select 1;
+_caller = _this select 2;
+
+[_unit,_vehicle,_caller] spawn {
+ [_this] call cse_fnc_debug;
+ private ["_unit","_vehicle","_caller"];
+ _unit = _this select 0;
+ _vehicle = _this select 1;
+ _caller = _this select 2;
+
+ //_dead = false;
+ //if !(alive _unit) then {
+ //_dead = true;
+ //_unit = [_unit,_caller] call cms_fnc_switchDeadBody;
+ //_unit setvariable ["cms_isDead", true,true];
+ //};
+
+ _unit moveInCargo _vehicle;
+ _loaded = _vehicle getvariable ["cse_loaded_casualties_CMS",[]];
+ _loaded pushback _unit;
+ _vehicle setvariable ["cse_loaded_casualties_CMS",_loaded,true];
+
+ if (!([_unit] call cse_fnc_isAwake)) then {
+ waituntil {vehicle _unit == _vehicle};
+ [_unit,([_unit] call cse_fnc_getDeathAnim)] call cse_fnc_broadcastAnim;
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/loading/fn_load_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/loading/fn_load_CMS.sqf
new file mode 100644
index 0000000000..9a21063660
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/loading/fn_load_CMS.sqf
@@ -0,0 +1,34 @@
+/**
+ * fn_load_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller", "_unit","_vehicle", "_loaded"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+if ([_unit] call cse_fnc_isAwake) exitwith {
+ hintSilent "This person is awake and cannot be loaded";
+};
+
+[_caller,objNull] call cse_fnc_carryObj;
+[_unit,objNull] call cse_fnc_carryObj;
+waituntil {(isNull (_unit getvariable ["cse_beingCarried_CMS", objNull]))};
+
+_vehicle = [_caller, _unit] call cse_fnc_loadPerson_F;
+if (!isNull _vehicle) then {
+ _loaded = _vehicle getvariable ["cse_loaded_casualties_CMS",[]];
+ _loaded pushback _unit;
+ _vehicle setvariable ["cse_loaded_casualties_CMS",_loaded,true];
+
+ if (!isnil "CSE_DROP_ADDACTION_CMS") then {
+ _caller removeAction CSE_DROP_ADDACTION_CMS;
+ CSE_DROP_ADDACTION_CMS = nil;
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/loading/fn_unload_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/loading/fn_unload_CMS.sqf
new file mode 100644
index 0000000000..31317da65f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/loading/fn_unload_CMS.sqf
@@ -0,0 +1,37 @@
+/**
+ * fn_unload_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller", "_unit","_vehicle", "_drag", "_handle"];
+_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
+_unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
+_drag = [_this, 2, false, [false]] call BIS_fnc_Param;
+
+// cannot unload a unit not in a vehicle.
+if (vehicle _unit == _unit) exitwith {};
+
+if (([_unit] call cse_fnc_isAwake)) exitwith {};
+
+_vehicle = vehicle _unit;
+if ([_caller, _unit] call cse_fnc_unloadPerson_F) then {
+ _loaded = _vehicle getvariable ["cse_loaded_casualties_CMS",[]];
+ _loaded = _loaded - [_unit];
+ _vehicle setvariable ["cse_loaded_casualties_CMS",_loaded,true];
+ if (_drag) then {
+ if ((vehicle _caller) == _caller) then {
+ _handle = [_caller, _unit] spawn {
+ _caller = _this select 0;
+ _unit = _this select 1;
+ waituntil {(vehicle _unit == _unit)};
+ [[_caller,_unit], "cse_fnc_drag_CMS", _caller, false] spawn BIS_fnc_MP;
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandageLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandageLocal_CMS.sqf
new file mode 100644
index 0000000000..de07ff3034
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandageLocal_CMS.sqf
@@ -0,0 +1,120 @@
+/**
+ * fn_bandageLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_treatingPerson","_injuredPerson","_part","_selectionName","_openWounds","_woundsArray","_highest_amount","_highestSpot","_collectiveImpact", "_highestTotal","_totalNumber", "_selectedData"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_selectedData = [_this, 4, "", [""]] call BIS_fnc_Param;
+
+if (!local _injuredPerson) exitwith{["fnc_bandageLocal called on non local machine",3] call cse_fnc_debug; };
+[_injuredPerson] spawn cse_fnc_unitLoop_CMS;
+if (_treatingPerson != _injuredPerson) then {
+ [_injuredPerson,"STR_CSE_CMS_BANDAGING", "STR_CSE_CMS_IS_BANDAGING_YOU", 0, [[_treatingPerson] call cse_fnc_getName]] call cse_fnc_sendDisplayMessageTo;
+};
+[_this] call cse_fnc_debug;
+
+[_injuredPerson,_removeItem] call cse_fnc_addToTriageList_CMS;
+_collectiveImpact = switch (_removeItem) do {
+ case "cse_packing_bandage": {[1.0, 1.5, 1.2]};
+ case "cse_bandageElastic": {[1.3, 0.9, 0.9]};
+ case "cse_bandage_basic": {[1.5, 1.0, 0.6]};
+ case "cse_stitching": {[2.0, 2.0, 2.0]};
+ case "cse_quikclot": {[0.9, 0.3, 0.3]};
+ default {[0.9, 0.5, 0.5]};
+ };
+ _part = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+
+ _openWounds = [_injuredPerson,"cse_openWounds"] call cse_fnc_getvariable;
+ _woundsArray = _openWounds select _part;
+
+ _highestSpot = 0;
+ _highest_amount = 0;
+ {
+ if (_x > _highest_amount) then {
+ _highestSpot = _foreachIndex;
+ _highest_amount = _x;
+ };
+ }foreach _woundsArray;
+
+ if (_selectedData != "") then {
+ [format["CUSTOM STUFF: %1", _selectedData]] call cse_fnc_debug;
+ _highestSpot = switch (_selectedData) do {
+ case "open_wound_0": {0};
+ case "open_wound_1": {1};
+ case "open_wound_2": {2};
+ default {_highestSpot};
+ };
+ };
+
+ if (_highest_amount == 0 && CSE_BANDAGING_AID_CMS) then {
+ _highestTotal = 0;
+ {
+ _totalNumber = 0;
+ {
+ _totalNumber = _totalNumber + _x;
+ }foreach _x;
+ if (_totalNumber > _highestTotal) then {
+ _part = _foreachIndex;
+ _highestTotal = _totalNumber;
+ };
+ }foreach _openWounds;
+ _woundsArray = _openWounds select _part;
+ _highestSpot = 0;
+ _highest_amount = 0;
+ {
+ if (_x > _highest_amount) then {
+ _highestSpot = _foreachIndex;
+ _highest_amount = _x;
+ };
+ }foreach _woundsArray;
+ };
+
+ _impactOfBandage = (_collectiveImpact select _highestSpot);
+
+ _wounds = _woundsArray select _highestSpot;
+ _amountOfInpact = 0;
+ if (_wounds >0) then {
+ [_injuredPerson,"treatment",format["%2 has bandaged a wound on %1",[_part] call cse_fnc_fromNumberToBodyPart_CMS,[_treatingPerson] call cse_fnc_getName]] call cse_fnc_addActivityToLog_CMS;
+
+ _amountOfInpact = _impactOfBandage;
+ if (_impactOfBandage > _wounds) then {
+ _amountOfInpact = _wounds;
+ };
+ };
+ _wounds = (_wounds - _impactOfBandage);
+ if (_wounds < 0) then {
+ _wounds = 0;
+ };
+ _woundsArray set[_highestSpot, _wounds];
+ _openWounds set [_part, _woundsArray];
+ [_injuredPerson,"cse_openWounds",_openWounds] call cse_fnc_setvariable;
+ if (isnil "CSE_ADVANCED_WOUNDS_SETTING_CMS") then {
+ CSE_ADVANCED_WOUNDS_SETTING_CMS = true;
+ };
+ if (_amountOfInpact > 0.0 && CSE_ADVANCED_WOUNDS_SETTING_CMS) then {
+ _bandagedWounds = [_injuredPerson,"cse_bandagedWounds"] call cse_fnc_getvariable;
+ _bandagedPart = _bandagedWounds select _part;
+ if (_highestSpot > 0) then {
+ _bandagedWound = _bandagedPart select _highestSpot;
+ _bandagedWound = _bandagedWound + _amountOfInpact;
+ _bandagedPart set [_highestSpot,_bandagedWound];
+ _bandagedWounds set[_part,_bandagedPart];
+ [_injuredPerson,"cse_bandagedWounds",_bandagedWounds] call cse_fnc_setvariable;
+ [_injuredPerson, _amountOfInpact,_part,_highestSpot, _removeItem] spawn cse_fnc_bandageOpening_CMS;
+ };
+ };
+
+ if (!([_injuredPerson] call cse_fnc_hasOpenWounds_CMS)) then {
+ _injuredPerson setDamage 0;
+ };
+
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandageOpening_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandageOpening_CMS.sqf
new file mode 100644
index 0000000000..b1af816d23
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandageOpening_CMS.sqf
@@ -0,0 +1,76 @@
+/**
+ * fn_bandageOpening_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#define CFG_DEFAULT_WAITING_TIME 900 + random(120)
+#define WAITINGTIME 1
+#define RATIO 2
+#define CHANCE 3
+
+private ["_person","_amount","_bodyPart","_woundClass","_item","_config","_found"];
+_person = _this select 0;
+_amount = _this select 1;
+_bodyPart = _this select 2;
+_woundClass = _this select 3;
+_item = _this select 4;
+
+// classname, waiting time until wound opens, ratio in which it start bleeding again, chance of the wound ever opening up //
+_config = [
+ ["cse_bandage_basic", 900 + random (120), 0.75, 0.4],
+ ["cse_packing_bandage", 1200 + random (120), 0.5, 0.6],
+ ["cse_bandageElastic", 900 + random (900), 0.75, 0.2],
+ ["cse_quikclot", 1, 0.1, 0]
+];
+_found = false;
+{
+ if (_item == _x select 0) exitwith {
+ if (random(1)> (1 - (_x select CHANCE))) then {
+ _found = true;
+ sleep (_x select WAITINGTIME);
+ _bandagedWounds = [_person,"cse_bandagedWounds"] call cse_fnc_getVariable;
+ _bandagedBodyPart = _bandagedWounds select _bodyPart;
+ _bandagedWoundClass = _bandagedBodyPart select _woundClass;
+ if (_bandagedWoundClass >= _amount) then {
+ _openWounds =[_person,"cse_openWounds"] call cse_fnc_getVariable;
+ _openWoundsBodyPart = _openWounds select _bodyPart;
+ _openWoundClass = _openWoundsBodyPart select _woundClass;
+
+ _bandagedBodyPart set [_woundClass,_bandagedWoundClass - (_amount * (_x select RATIO))];
+ _openWoundsBodyPart set [_woundClass,_openWoundClass + (_amount * (_x select RATIO))];
+
+ _bandagedWounds set[_bodyPart,_bandagedBodyPart];
+ _openWounds set[_bodyPart,_openWoundsBodyPart];
+ [_person,"cse_openWounds",_openWounds] call cse_fnc_setVariable;
+ [_person,"cse_bandagedWounds",_bandagedWounds] call cse_fnc_setVariable;
+ };
+ };
+ };
+}foreach _config;
+
+if (!_found && (random(1)>0.2)) then {
+ sleep CFG_DEFAULT_WAITING_TIME;
+ _bandagedWounds = [_person,"cse_bandagedWounds"] call cse_fnc_getVariable;
+ _bandagedBodyPart = _bandagedWounds select _bodyPart;
+ _bandagedWoundClass = _bandagedBodyPart select _woundClass;
+
+ if (_bandagedWoundClass >= _amount) then {
+ _openWounds =[_person,"cse_openWounds"] call cse_fnc_getVariable;
+ _openWoundsBodyPart = _openWounds select _bodyPart;
+ _openWoundClass = _openWoundsBodyPart select _woundClass;
+
+ _bandagedBodyPart set [_woundClass,_bandagedWoundClass - _amount];
+ _openWoundsBodyPart set [_woundClass,_openWoundClass + _amount];
+
+ _bandagedWounds set[_bodyPart,_bandagedBodyPart];
+ _openWounds set[_bodyPart,_openWoundsBodyPart];
+ [_person,"cse_openWounds",_openWounds] call cse_fnc_setVariable;
+ [_person,"cse_bandagedWounds",_bandagedWounds] call cse_fnc_setVariable;
+ };
+};
+
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandage_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandage_CMS.sqf
new file mode 100644
index 0000000000..db34f55b89
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_bandage_CMS.sqf
@@ -0,0 +1,53 @@
+/**
+ * fn_bandage_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_treatingPerson","_injuredPerson","_part","_selectionName","_openWounds","_woundsArray","_highest_amount","_highestSpot", "_selectedData", "_continue", "_prevAnim"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_selectedData = [_this, 4, "", [""]] call BIS_fnc_Param;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_treatingPerson] call cse_fnc_treatmentMutex_CMS;
+
+if (!([_treatingPerson, _injuredPerson, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith { [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS; };
+
+_prevAnim = "";
+if (vehicle _treatingPerson == _treatingPerson && (vehicle _injuredPerson == _injuredPerson) && !(stance _treatingPerson == "PRONE")) then {
+ if (primaryWeapon _treatingPerson == "") then {
+ _prevAnim = animationState _treatingPerson;
+ };
+ [_treatingPerson,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+
+[_treatingPerson,"STR_CSE_CMS_BANDAGING","STR_CSE_CMS_APPLY_BANDAGE", 0, [[_injuredPerson] call cse_fnc_getName, _selectionName]] call cse_fnc_sendDisplayMessageTo;
+
+if (isnil "CSE_BANDAGE_WAITING_TIME_CMS") then {
+ CSE_BANDAGE_WAITING_TIME_CMS = 5;
+};
+
+["cse_sys_medical_treatment", true, "cse\cse_sys_medical\data\icons\bandage_fracture_small.paa", [1,1,1,1]] call cse_fnc_gui_displayIcon;
+
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _treatingPerson;
+if ([CSE_BANDAGE_WAITING_TIME_CMS,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{[player, "STR_CSE_CMS_CANCELED", ["STR_CSE_CMS_ACTION_CANCELED","STR_CSE_CMS_YOU_MOVED_AWAY"]] call cse_fnc_sendDisplayInformationTo;}] call cse_fnc_gui_loadingBar) then {
+
+ [_treatingPerson, _injuredPerson, _removeItem] call cse_fnc_useEquipment_CMS;
+
+ [_this, "cse_fnc_bandageLocal_CMS", _injuredPerson, false] spawn BIS_fnc_MP;
+};
+
+if (_prevAnim != "") then {
+ _treatingPerson switchMove _prevAnim;
+};
+["cse_sys_medical_treatment", false, "cse\cse_sys_medical\data\icons\bandage_fracture_small.paa", [1,1,1,1]] call cse_fnc_gui_displayIcon;
+
+[_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_handleHeal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_handleHeal_CMS.sqf
new file mode 100644
index 0000000000..7121c9e04b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_handleHeal_CMS.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_handleHeal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit",'_healer'];
+_unit = _this select 0;
+_healer = _this select 1;
+
+if (!(isPlayer _healer) && CSE_ALLOW_AI_FULL_HEAL_CMS && !([_unit] call cse_Fnc_isUnconscious)) then {
+ [_unit, "cse_openWounds",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call cse_fnc_setVariable;
+ [_unit, "cse_bandagedWounds",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call cse_fnc_setVariable;
+
+ if (_unit != _healer) then {
+ [_unit,"STR_CSE_CMS_BANDAGED","STR_CSE_CMS_IS_BANDAGING_YOU", 0, [[_healer] call cse_fnc_getName]] call cse_fnc_sendDisplayMessageTo;
+ };
+ [_unit,"treatment",format["%1 has patched up the patient",[_healer] call cse_fnc_getName]] call cse_fnc_addActivityToLog_CMS;
+};
+
+true;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_hasEquipment_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_hasEquipment_CMS.sqf
new file mode 100644
index 0000000000..f27f7521a8
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_hasEquipment_CMS.sqf
@@ -0,0 +1,37 @@
+/**
+ * fn_hasEquipment_CMS.sqf
+ * @Descr: Check if the medic or patient have the right equipment for treatment.
+ * @Author: Glowbal
+ *
+ * @Arguments: [medic OBJECT, patient OBJECT, item STRING (Classname of the item. Expects magazine type.)]
+ * @Return: BOOL
+ * @PublicAPI: false
+ */
+
+private ["_medic", "_patient", "_item", "_return"];
+_medic = _this select 0;
+_patient = _this select 1;
+_item = _this select 2;
+
+if (isnil "CSE_ALLOW_SHARED_EQUIPMENT_CMS") then {
+ CSE_ALLOW_SHARED_EQUIPMENT_CMS = true;
+};
+if (CSE_ALLOW_SHARED_EQUIPMENT_CMS && {[_patient, _item] call cse_fnc_hasItem}) exitwith {
+ true;
+};
+
+if ([_medic, _item] call cse_fnc_hasItem) exitwith {
+ true;
+};
+
+_return = false;
+if ([vehicle _medic] call cse_fnc_isMedicalVehicle_CMS && {(vehicle _medic != _medic)}) then {
+ _crew = crew vehicle _medic;
+ {
+ if ([_x, _medic] call cse_fnc_canAccessMedicalEquipment_CMS && {([_x, _item] call cse_fnc_hasItem)}) exitwith {
+ _return = true;
+ };
+ }foreach _crew;
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_hasTourniquetAppliedTo_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_hasTourniquetAppliedTo_CMS.sqf
new file mode 100644
index 0000000000..91d51f1441
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_hasTourniquetAppliedTo_CMS.sqf
@@ -0,0 +1,16 @@
+/**
+ * fn_hasTourniquetAppliedTo_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_part","_selectionName","_tourniquets"];
+_unit = _this select 0;
+_selectionName = _this select 1;
+_part = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+_tourniquets = [_unit,"cse_tourniquets"] call cse_fnc_getVariable;
+((_tourniquets select _part) > 0)
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_healLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_healLocal_CMS.sqf
new file mode 100644
index 0000000000..b732249af1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_healLocal_CMS.sqf
@@ -0,0 +1,73 @@
+/**
+ * fn_healLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit", "_caller", "_wasUnconscious"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+if (alive _unit) then {
+ _wasUnconscious = [_unit] call cse_fnc_isUnconscious;
+ [_unit,"treatment",format["%1 used a personal aid kit",[_caller] call cse_fnc_getName]] call cse_fnc_addActivityToLog_CMS;
+
+ [_unit,"cse_openWounds",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call cse_fnc_setVariable;
+ [_unit,"cse_bandagedWounds",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call cse_fnc_setVariable;
+ [_unit,"cse_fractures",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call cse_fnc_setVariable;
+ [_unit,"cse_airway",0] call cse_fnc_setVariable;
+ [_unit,"cse_tourniquets",[0,0,0,0,0,0]] call cse_fnc_setVariable;
+ [_unit,"cse_splints",0] call cse_fnc_setVariable;
+
+ //["cse_activityLog_CMS",[]] call cse_fnc_setVariable;
+ [_unit,"cse_triageLevel",0] call cse_fnc_setVariable;
+ [_unit,"cse_triageCard",[]] call cse_fnc_setVariable;
+
+ // private variables
+ [_unit,"cse_bloodVolume",100] call cse_fnc_setVariable;
+ [_unit,"cse_bloodIVVolume",0] call cse_fnc_setVariable;
+ [_unit,"cse_plasmaIVVolume",0] call cse_fnc_setVariable;
+ [_unit,"cse_salineIVVolume",0] call cse_fnc_setVariable;
+
+ [_unit,"cse_pain",0] call cse_fnc_setVariable;
+ [_unit,"cse_heartRate",80] call cse_fnc_setVariable;
+ [_unit,"cse_andrenaline",0] call cse_fnc_setVariable;
+ [_unit,"cse_bloodPressure",[80,120]] call cse_fnc_setVariable;
+
+ [_unit,"cse_givenMorphine",0] call cse_fnc_setVariable;
+ [_unit,"cse_givenAtropine",0] call cse_fnc_setVariable;
+ [_unit,"cse_givenEpinephrine",0] call cse_fnc_setVariable;
+
+ [_unit,"cse_bodyPartStatus",[0,0,0,0,0,0]] call cse_fnc_setVariable;
+ [_unit,"CSE_ENABLE_REVIVE_SETDEAD_F", 0] call cse_fnc_setVariable;
+ [_unit,"CSE_ENABLE_REVIVE_COUNTER", 0] call cse_fnc_setVariable;
+
+ _unit setDamage 0;
+ if (!CSE_ALLOW_INSTANT_DEAD_CMS) then {
+ [_unit, "cse_noInstantDeath", false] call cse_fnc_setVariable;
+ };
+
+ if (isPlayer _unit) then {
+ [false] call cse_fnc_effectBlackOut;
+ [true] call cse_fnc_setVolume_f;
+ ["unconscious", false] call cse_fnc_disableUserInput_f;
+ };
+ if (_wasUnconscious) then {
+ ["waiting until no longer unconscious"] call cse_fnc_debug;
+ waituntil {!([_unit] call cse_fnc_isUnconscious)};
+ sleep 0.1;
+
+ if (vehicle _unit == _unit) then {
+ if (!([_unit] call cse_fnc_beingCarried)) then {
+ ["Resetting animation"] call cse_fnc_debug;
+ [_unit,"",false] call cse_fnc_broadcastAnim;
+ [_unit,"amovppnemstpsnonwnondnon",false] call cse_fnc_broadcastAnim;
+ };
+ };
+ };
+ ["Completed healLocal"] call cse_fnc_debug;
+};
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_heal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_heal_CMS.sqf
new file mode 100644
index 0000000000..be403202a6
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_heal_CMS.sqf
@@ -0,0 +1,50 @@
+/**
+ * fn_heal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit", "_caller", "_selectionName", "_removeItem", "_prevAnim"];
+_unit = _this select 0;
+_caller = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+if !((CSE_AID_KIT_RESTRICTIONS_CMS == 0 && ([_caller] call cse_fnc_inMedicalFacility_CMS)) || (CSE_AID_KIT_RESTRICTIONS_CMS == 1 && ([_caller] call cse_fnc_inMedicalFacility_CMS) && (!([_unit] call cse_fnc_hasOpenWounds_CMS))) || (CSE_AID_KIT_RESTRICTIONS_CMS == 2) || (CSE_AID_KIT_RESTRICTIONS_CMS == 3 && (!([_unit] call cse_fnc_hasOpenWounds_CMS)))) exitwith {};
+
+if (!([_caller, _unit, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith {};
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+
+_prevAnim = "";
+if (vehicle _caller == _caller && (vehicle _unit == _unit) && !(stance _caller == "PRONE")) then {
+ if (primaryWeapon _caller == "") then {
+ _prevAnim = animationState _caller;
+ };
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _caller;
+if !([5,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{hint "Action aborted. You moved away";}] call cse_fnc_gui_loadingBar) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+CSE_ORIGINAL_POSITION_PLAYER_CMS = nil;
+
+if (CSE_AID_KIT_REMOVED_UPON_USAGE_CMS) then {
+ [_caller, _unit,_removeItem] call cse_fnc_useEquipment_CMS;
+};
+
+if (_prevAnim != "") then {
+ _caller switchMove _prevAnim;
+};
+
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+
+if (!(_unit getvariable ["cms_isDead",false]) && alive _unit) then {
+ [[_unit,_caller], "cse_fnc_healLocal_CMS", _unit, false] spawn BIS_fnc_MP;
+};
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_isSetTreatmentMutex_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_isSetTreatmentMutex_CMS.sqf
new file mode 100644
index 0000000000..6d34ae3abd
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_isSetTreatmentMutex_CMS.sqf
@@ -0,0 +1,15 @@
+/**
+ * fn_isSetTreatmentMutex_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+if (isnil "CSE_PERFORMING_TREATMENT_CMS_MUTEX") then {
+ CSE_PERFORMING_TREATMENT_CMS_MUTEX = false;
+};
+
+CSE_PERFORMING_TREATMENT_CMS_MUTEX
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_ivLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_ivLocal_CMS.sqf
new file mode 100644
index 0000000000..8988dfd51c
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_ivLocal_CMS.sqf
@@ -0,0 +1,49 @@
+/**
+ * fn_ivLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_selectionName","_removeItem","_attributes","_patient", "_value"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+
+
+_attributes = switch (_removeItem) do {
+ case "cse_blood_iv": {["cse_bloodIVVolume",1000,"Blood IV"]};
+ case "cse_saline_iv": {["cse_salineIVVolume",1000,"Saline IV"]};
+ case "cse_plasma_iv": {["cse_plasmaIVVolume",1000,"Plasma IV"]};
+
+ case "cse_blood_iv_500": {["cse_bloodIVVolume",500,"Blood IV"]};
+ case "cse_saline_iv_500": {["cse_salineIVVolume",500,"Saline IV"]};
+ case "cse_plasma_iv_500": {["cse_plasmaIVVolume",500,"Plasma IV"]};
+
+ case "cse_blood_iv_250": {["cse_bloodIVVolume",250,"Blood IV"]};
+ case "cse_saline_iv_250": {["cse_salineIVVolume",250,"Saline IV"]};
+ case "cse_plasma_iv_250": {["cse_plasmaIVVolume",250,"Plasma IV"]};
+
+ default {[]};
+};
+if (count _attributes > 1) then {
+
+ _value = [_injuredPerson,(_attributes select 0)] call cse_fnc_getVariable;
+ _value = _value + (_attributes select 1);
+ [format["Has given patient: %1",[_value, _attributes select 0, _attributes select 1]]] call cse_fnc_debug;
+ [_injuredPerson,(_attributes select 0),_value] call cse_fnc_setVariable;
+ [format["Confirm: %1",[_injuredPerson getvariable [_attributes select 0, 0], _injuredPerson]]] call cse_fnc_debug;
+
+ _patient = "patient";
+ if (_injuredPerson == _treatingPerson) then {
+ _patient = "himself";
+ };
+ [_injuredPerson,"treatment",format["%1 has given %4 a %2(%3ml)",[_treatingPerson] call cse_fnc_getName,_attributes select 2,_attributes select 1,_patient]] call cse_fnc_addActivityToLog_CMS;
+ [_injuredPerson,_removeItem] call cse_fnc_addToTriageList_CMS;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_iv_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_iv_CMS.sqf
new file mode 100644
index 0000000000..d365c6400d
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_iv_CMS.sqf
@@ -0,0 +1,43 @@
+/**
+ * fn_iv_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_selectionName","_removeItem","_attributes","_patient", "_continue", "_prevAnim"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_treatingPerson,"set"] call cse_fnc_treatmentMutex_CMS;
+
+if (!([_treatingPerson, _injuredPerson, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith { [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS; };
+
+
+_prevAnim = "";
+if (vehicle _treatingPerson == _treatingPerson && (vehicle _injuredPerson == _injuredPerson) && !(stance _treatingPerson == "PRONE")) then {
+ if (primaryWeapon _treatingPerson == "") then {
+ _prevAnim = animationState _treatingPerson;
+ };
+ [_treatingPerson,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _treatingPerson;
+if !([5,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{hint "Action aborted. You moved away";}] call cse_fnc_gui_loadingBar) exitwith {
+ [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+
+[_treatingPerson, _injuredPerson,_removeItem] call cse_fnc_useEquipment_CMS;
+[_this, "cse_fnc_ivLocal_CMS", _injuredPerson, false] spawn BIS_fnc_MP;
+
+if (_prevAnim != "") then {
+ _treatingPerson switchMove _prevAnim;
+};
+
+[_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_medicationLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_medicationLocal_CMS.sqf
new file mode 100644
index 0000000000..51beb092ac
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_medicationLocal_CMS.sqf
@@ -0,0 +1,170 @@
+/**
+ * fn_medicationLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_selectionName","_removeItem","_patient","_attributes","_value"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+_attributes = switch (_removeItem) do {
+ case "cse_morphine": {
+ ["cse_givenMorphine",1,"Morphine"]
+ };
+ case "cse_atropine": {
+ ["cse_givenAtropine",1,"Atropine"]
+ };
+ case "cse_epinephrine": {
+ ["cse_givenEpinephrine",1,"Epinephrine"]
+ };
+ case "cse_antiBiotics": {
+ []
+ };
+ default {[]};
+};
+
+if (count _attributes > 1) then {
+ [_injuredPerson] spawn cse_fnc_unitLoop_CMS;
+ _value = [_injuredPerson,(_attributes select 0)] call cse_fnc_getVariable;
+ _value = _value + (_attributes select 1);
+ [_injuredPerson,(_attributes select 0),_value] call cse_fnc_setVariable;
+
+ _patient = "patient";
+ if (_injuredPerson == _treatingPerson) then {
+ _patient = "himself";
+ };
+ [_injuredPerson,"treatment",format["%1 has given %3 %2",[_treatingPerson] call cse_fnc_getName, (_attributes select 2),_patient]] call cse_fnc_addActivityToLog_CMS;
+[_injuredPerson,_removeItem] call cse_fnc_addToTriageList_CMS;
+
+ _usedMedication = {
+ private ["_injuredPerson","_var","_usedMed","_morphineUsed","_epiUsed","_atroUsed","_totalUsed"];
+ _injuredPerson = _this select 0;
+ _var = _this select 1;
+ _overDose = 5;
+ _wearOff = 120;
+
+ if (!alive _injuredPerson) exitwith{};
+ if (count _this > 2) then {
+ _overDose = _this select 2;
+ if (count _this > 3) then {
+ _wearOff = _this select 3;
+ };
+ };
+ _usedMed = [_injuredPerson, _var, 0] call cse_fnc_getVariable;
+ if (isnil "_usedMed") then {
+ _usedMed = 0;
+ };
+ if (_usedMed > (_overDose + round(random(2)))) then {
+ [_injuredPerson] spawn cse_fnc_setDead;
+ };
+
+ _morphineUsed = _injuredPerson getvariable ["cse_givenMorphine", 0];
+ _epiUsed = _injuredPerson getvariable ["cse_givenEpinephrine", 0];
+ _atroUsed = _injuredPerson getvariable ["cse_givenAtropine", 0];
+ _totalUsed = _morphineUsed + _epiUsed + _atroUsed;
+ if (_totalUsed > 10) then {
+ [_injuredPerson] spawn cse_fnc_setDead;
+ };
+ [_injuredPerson,_wearOff,_var] spawn {
+ sleep ((_this select 1) + (round(random(30))));
+ _amountDecreased = 0;
+ _usedMed = [_this select 0, _this select 2] call cse_fnc_getVariable;
+ if (typeName _usedMed != typeName 0) then {
+ _usedMed = 0;
+ };
+ while {(_usedMed > 0.000000 && _amountDecreased < 1.000000)} do {
+ _usedMed = ([_this select 0, _this select 2] call cse_fnc_getVariable);
+ if ( typeName _usedMed != typeName 0) then {
+ _usedMed = 0;
+ };
+ [_this select 0, _this select 2,_usedMed - 0.001] call cse_fnc_setVariable;
+ _amountDecreased = _amountDecreased + 0.001;
+ sleep 1;
+ };
+ };
+ };
+
+
+ switch (_removeItem) do {
+ case "cse_atropine": {
+
+ _heartRate = [_injuredPerson, "cse_heartRate"] call cse_fnc_getVariable;
+ //_heartRate = [_injuredPerson, "cse_heartRate"] call cse_fnc_getVariable;
+ if (alive _injuredPerson) then {
+ if (_heartRate > 0) then {
+ if (_heartRate <= 40) then {
+ [_injuredPerson, -(10 + random(20)), 30] call cse_fnc_addHeartRateAdjustment_CMS;
+ };
+
+ if (_heartRate > 40) then {
+ if (_heartRate > 120) then {
+ [_injuredPerson, -(10 + random(50)), 30] call cse_fnc_addHeartRateAdjustment_CMS;
+ } else {
+ [_injuredPerson, -(10 + random(40)), 30] call cse_fnc_addHeartRateAdjustment_CMS;
+ };
+ };
+ };
+ //[_injuredPerson, "cse_heartRate",_heartRate] call cse_fnc_setVariable;
+ [_injuredPerson,(_attributes select 0),5] call _usedMedication;
+ };
+ };
+ case "cse_epinephrine": {
+ _heartRate = [_injuredPerson, "cse_heartRate"] call cse_fnc_getVariable;
+ if (alive _injuredPerson) then {
+ if (_heartRate > 0) then {
+ if (_heartRate <= 40) then {
+ [_injuredPerson, (10 + random(20)), 30] call cse_fnc_addHeartRateAdjustment_CMS;
+ };
+
+ if (_heartRate > 40) then {
+ if (_heartRate > 120) then {
+ [_injuredPerson, (10 + random(50)), 30] call cse_fnc_addHeartRateAdjustment_CMS;
+ } else {
+ [_injuredPerson, (10 + random(40)), 30, {}] call cse_fnc_addHeartRateAdjustment_CMS;
+ };
+ };
+ };
+ [_injuredPerson,(_attributes select 0),3] call _usedMedication;
+ };
+ };
+ case "cse_morphine": {
+ private ["_usedMorphine"];
+ _pain = [_injuredPerson, "cse_pain"] call cse_fnc_getVariable;
+ _pain = 0;
+ //_pain = _pain - 35;
+ if (_pain <= 0) then {
+ _pain = 0;
+ };
+ _heartRate = [_injuredPerson, "cse_heartRate"] call cse_fnc_getVariable;
+ [format["used morphine: %1",_heartRate]] call cse_fnc_debug;
+ if (alive _injuredPerson) then {
+ if (_heartRate > 0) then {
+ if (_heartRate <= 40) then {
+ [_injuredPerson, -(10 + random(20)), 40] call cse_fnc_addHeartRateAdjustment_CMS;
+ };
+ if (_heartRate > 40) then {
+ if (_heartRate > 120) then {
+ [_injuredPerson, -(10 + random(50)), 40] call cse_fnc_addHeartRateAdjustment_CMS;
+ } else {
+ [_injuredPerson, -(10 + random(40)), 40] call cse_fnc_addHeartRateAdjustment_CMS;
+ };
+ };
+ };
+ };
+ [_injuredPerson, "cse_pain",_pain] call cse_fnc_setVariable;
+ [_injuredPerson,(_attributes select 0),4,120] call _usedMedication;
+ };
+ default {
+ [format["default got triggered for medication. %1",_this]] call cse_fnc_debug;
+ };
+ };
+};
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_medication_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_medication_CMS.sqf
new file mode 100644
index 0000000000..fe5030b527
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_medication_CMS.sqf
@@ -0,0 +1,62 @@
+/**
+ * fn_medication_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_selectionName","_removeItem","_patient","_attributes","_value", "_prevAnim"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_treatingPerson,"set"] call cse_fnc_treatmentMutex_CMS;
+
+if (!([_treatingPerson, _injuredPerson, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith { [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS; };
+
+
+_attributes = switch (_removeItem) do {
+ case "cse_morphine": {
+ ["cse_givenMorphine",1,"Morphine"]
+ };
+ case "cse_atropine": {
+ ["cse_givenAtropine",1,"Atropine"]
+ };
+ case "cse_epinephrine": {
+ ["cse_givenEpinephrine",1,"Epinephrine"]
+ };
+ case "cse_antiBiotics": {
+ []
+ };
+ default {[]};
+};
+
+if (count _attributes > 1) then {
+ _prevAnim = "";
+ if (vehicle _treatingPerson == _treatingPerson && (vehicle _injuredPerson == _injuredPerson) && !(stance _treatingPerson == "PRONE")) then {
+ if (primaryWeapon _treatingPerson == "") then {
+ _prevAnim = animationState _treatingPerson;
+ };
+ [_treatingPerson,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+ };
+
+ ["cse_sys_medical_treatment", true, "cse\cse_sys_medical\data\icons\medication_small.paa", [1,1,1,1]] call cse_fnc_gui_displayIcon;
+
+ CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _treatingPerson;
+ if ([2,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{hint "Action aborted. You moved away";}] call cse_fnc_gui_loadingBar) then {
+ [_treatingPerson, _injuredPerson,_removeItem] call cse_fnc_useEquipment_CMS;
+ [_this, "cse_fnc_medicationLocal_CMS", _injuredPerson, false] spawn BIS_fnc_MP;
+ };
+
+ if (_prevAnim != "") then {
+ _treatingPerson switchMove _prevAnim;
+ };
+ ["cse_sys_medical_treatment", false, "cse\cse_sys_medical\data\icons\medication_small.paa", [1,1,1,1]] call cse_fnc_gui_displayIcon;
+};
+[_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRLocal_CMS.sqf
new file mode 100644
index 0000000000..f62975b15d
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRLocal_CMS.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_performCPRLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller","_unit"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+[_unit] call cse_fnc_unitLoop_CMS;
+/*if (([_unit, "cse_heartRate"] call cse_fnc_getVariable) > 0) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+ [_caller,"No need for CPR"] call cse_fnc_sendHintTo;
+};*/
+
+if (vehicle _unit == _unit) then {
+ [_unit,"AinjPpneMstpSnonWrflDnon_rolltoback"] call cse_fnc_localAnim;
+};
+
+if (vehicle _caller == _caller) then {
+ //[_caller,"AinvPknlMstpSnonWrflDr_medic0"] call cse_fnc_broadcastAnim;
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+
+[_this, "cse_fnc_performCPRProvider_CMS", _caller, false] spawn BIS_fnc_MP;
+_n = _unit getvariable ["CSE_ENABLE_REVIVE_COUNTER",0];
+if (_n > 0) then {
+ _n = _n - random(20);
+ if (_n < 0) then {
+ _n = 0;
+ };
+ _unit setvariable ["CSE_ENABLE_REVIVE_COUNTER", _n];
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRProvider_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRProvider_CMS.sqf
new file mode 100644
index 0000000000..437b3fc786
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRProvider_CMS.sqf
@@ -0,0 +1,61 @@
+/**
+ * fn_performCPRProvider_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller","_unit","_timer","_succesValueCPR"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+cse_playerIsProvidingCPR_CMS = true;
+_timer = 0;
+_succesValueCPR = 0;
+
+[_caller,"You start providing CPR"] call cse_fnc_sendHintTo;
+
+while {cse_playerIsProvidingCPR_CMS} do {
+ // [_caller,"Acts_TreatingWounded01"] call cse_fnc_localAnim;
+ if (vehicle _caller == _caller) then {
+ _caller playMove "AinvPknlMstpSnonWrflDr_medic0";
+ };
+ sleep 0.1;
+ if (alive _unit) then {
+ if (random(10) > 6) then {
+ _succesValueCPR = _succesValueCPR + random(2);
+ } else {
+ _succesValueCPR = _succesValueCPR - random(1);
+ if (_succesValueCPR < 0) then {
+ _succesValueCPR = 0;
+ };
+ };
+ };
+ _timer = _timer + 1;
+ sleep 0.1;
+ if (_succesValueCPR > 20 && ((_unit getvariable ["CSE_ENABLE_REVIVE_SETDEAD_F",0]) == 0)) exitwith {
+ _succesValueCPR = 40;
+ };
+ if (_succesValueCPR > 35 && ((_unit getvariable ["CSE_ENABLE_REVIVE_SETDEAD_F",0]) > 0)) exitwith {
+ _succesValueCPR = 40;
+ };
+
+ if (_timer > 160) exitwith{_succesValueCPR = 0;};
+};
+cse_playerIsProvidingCPR_CMS = nil;
+if (vehicle _caller == _caller) then {
+ [_caller,"AinvPknlMstpSnonWrflDnon_medicEnd"] call cse_fnc_localAnim;
+};
+
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+if (_succesValueCPR > 20 && alive _unit) then {
+ _unit setvariable ["cse_cardiacArrest_CMS", nil, true];
+ [_caller,"CPR Success"] call cse_fnc_sendHintTo;
+ [_this, "cse_fnc_performCPRSuccess_CMS", _unit, false] spawn BIS_fnc_MP;
+} else {
+ [_caller,"You stopped giving CPR"] call cse_fnc_sendHintTo;
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRSuccess_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRSuccess_CMS.sqf
new file mode 100644
index 0000000000..9544d6b4e1
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPRSuccess_CMS.sqf
@@ -0,0 +1,21 @@
+/**
+ * fn_performCPRSuccess_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller","_unit"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+[_unit, "cse_heartRate",40] call cse_fnc_setVariable;
+[_unit, "cse_bloodPressure",[50,70]] call cse_fnc_setVariable;
+
+// setting this to waken up unconscious revivable units
+[_unit, "CSE_ENABLE_REVIVE_SETDEAD_F", 0] call cse_fnc_setVariable;
+[_unit, "CSE_ENABLE_REVIVE_COUNTER", 0] call cse_fnc_setVariable;
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPR_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPR_CMS.sqf
new file mode 100644
index 0000000000..8d152dda83
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performCPR_CMS.sqf
@@ -0,0 +1,34 @@
+/**
+ * fn_performCPR_CMS.sqf
+ * @Descr: Start the CPR action from CMS. Caller unit will attempt to restart the targets heart using CPR.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (The unit that cPR will be performed upon), caller OBJECT (The unit that does the CPR action)]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+
+private ["_caller","_unit"];
+_unit = _this select 0;
+_caller = _this select 1;
+if (isnil "cse_playerIsProvidingCPR_CMS") then {
+ cse_playerIsProvidingCPR_CMS = false;
+};
+
+[_this] call cse_Fnc_Debug;
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {cse_playerIsProvidingCPR_CMS = false;};
+[_caller] call cse_fnc_treatmentMutex_CMS;
+
+if (cse_playerIsProvidingCPR_CMS) exitwith {
+ [_caller,"You are already providing CPR"] call cse_fnc_sendHintTo;
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+ cse_playerIsProvidingCPR_CMS = false; // stop giving CPR
+};
+
+if (_unit == _caller) exitwith{[_caller,"You cannot give yourself CPR"] call cse_fnc_sendHintTo; [_caller,"release"] call cse_fnc_treatmentMutex_CMS;};
+
+ //_name = _unit getvariable ["cse_nameUnit",[_unit] call cse_fnc_getName];
+[_caller,"You start providing CPR"] call cse_fnc_sendHintTo;
+
+[_this, "cse_fnc_performCPRLocal_CMS", _unit, false] spawn BIS_fnc_MP;
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_performStitching_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performStitching_CMS.sqf
new file mode 100644
index 0000000000..1389858e8c
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performStitching_CMS.sqf
@@ -0,0 +1,83 @@
+/**
+ * fn_performStitching_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#define WAITING_TIME_SMALL 2.5
+#define WAITING_TIME_MEDIUM 3.5
+#define WAITING_TIME_LARGE 4.5
+
+#define WAITING_TIMES_WOUNDS [WAITING_TIME_SMALL, WAITING_TIME_MEDIUM, WAITING_TIME_LARGE]
+
+private ["_injuredPerson", "_treatingPerson", "_selectionName", "_removeItem", "_prevAnim", "_bandagedWounds", "_bodyPartN", "_allWounds", "_totalWoundsCount", "_totalTime", "_startTimeOfStitching", "_indexStitch", "_woundstoStitchOf", "_afterStitchingWoundsCount", "_waitingTime", "_i", "_startTime", "_messageSend"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+if (!([_treatingPerson, _injuredPerson, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith {};
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_treatingPerson,"set"] call cse_fnc_treatmentMutex_CMS;
+
+[_treatingPerson,"STR_CSE_CMS_STITCHING","STR_CSE_CMS_START_STITCHING_INJURIES", 0, [[_injuredPerson] call cse_fnc_getName,_selectionName]] call cse_fnc_sendDisplayMessageTo;
+
+
+_prevAnim = "";
+if (vehicle _treatingPerson == _treatingPerson && (vehicle _injuredPerson == _injuredPerson)) then {
+ if (primaryWeapon _treatingPerson == "") then {
+ _prevAnim = animationState _treatingPerson;
+ };
+ [_treatingPerson,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+_bandagedWounds = [_injuredPerson,"cse_bandagedWounds"] call cse_fnc_getVariable;
+_bodyPartN = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+
+_allWounds = _bandagedWounds select _bodyPartN;
+_totalWoundsCount = (_allWounds select 0) + (_allWounds select 1) + (_allWounds select 2);
+_totalTime = ((_allWounds select 0) * 2.5) + ((_allWounds select 1) * 3.5) + ((_allWounds select 2) * 4.5);
+
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _treatingPerson;
+CSE_CONDITION_STITCHING_CMS = {((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)};
+CSE_RUNNING_STITCHING_CMS = true;
+
+_startTimeOfStitching = diag_tickTime;
+_totalTime spawn {
+ CSE_RUNNING_STITCHING_CMS = [_this, CSE_CONDITION_STITCHING_CMS, {},{[player, "STR_CSE_CMS_CANCELED", ["STR_CSE_CMS_ACTION_CANCELED","STR_CSE_CMS_YOU_MOVED_AWAY"]] call cse_fnc_sendDisplayInformationTo;}] call cse_fnc_gui_loadingBar;
+};
+
+_indexStitch = 0;
+while {CSE_RUNNING_STITCHING_CMS && _indexStitch < 3} do {
+ _woundstoStitchOf = _allWounds select _indexStitch;
+ _afterStitchingWoundsCount = _woundstoStitchOf;
+ _waitingTime = WAITING_TIMES_WOUNDS select _indexStitch;
+
+ for [{_i=0}, {_i< (ceil _woundstoStitchOf)}, {_i=_i+1}] do {
+ _startTime = diag_tickTime;
+ waitUntil {(diag_tickTime - _startTime > _waitingTime) || !CSE_RUNNING_STITCHING_CMS};
+ if (CSE_RUNNING_STITCHING_CMS) then {
+ // TODO play sound
+ _afterStitchingWoundsCount = _afterStitchingWoundsCount - 1;
+ };
+ };
+
+ if (_afterStitchingWoundsCount < 0) then {
+ _afterStitchingWoundsCount = 0;
+ };
+ _allWounds set [_indexStitch, _afterStitchingWoundsCount];
+ _indexStitch = _indexStitch + 1;
+};
+_bandagedWounds set [_bodyPartN, _allWounds];
+[_injuredPerson, "cse_bandagedWounds", _bandagedWounds] call cse_fnc_setVariable;
+
+[_injuredPerson,"treatment",format["%1 has stitched up some bandages wounds",[_treatingPerson] call cse_fnc_getName]] call cse_fnc_addActivityToLog_CMS;
+
+if (_prevAnim != "") then {
+ _treatingPerson switchMove _prevAnim;
+};
+
+[_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_performTreatment_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performTreatment_CMS.sqf
new file mode 100644
index 0000000000..323fec5ee9
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_performTreatment_CMS.sqf
@@ -0,0 +1,30 @@
+/**
+ * fn_performTreatment_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_unit","_caller","_treatment","_removeOnSuccess","_params"];
+_caller = _this select 0;
+_unit = _this select 1;
+_treatment = _this select 2;
+_removeOnSuccess = _this select 3;
+
+CMS_PERFORMING_TREATMENT = true;
+if (!isnil "_removeOnSuccess") then {
+
+ if (([_caller,_removeOnSuccess] call cse_fnc_hasMagazine)) then {
+ _params = [_unit,_caller, (call cse_fnc_getSelectedBodyPart_CMS),_removeOnSuccess];
+ [_params, _treatment, _unit, false] spawn BIS_fnc_MP;
+ };
+ [//-1, cms_fnc_clutter, [_unit, _removeOnSuccess]] call CBA_fnc_globalExecute;
+};
+call cms_ui_hideSubMenus;
+// waituntil {(!CMS_PERFORMING_TREATMENT || time>5 seconds)};
+//sleep 5;
+CMS_PERFORMING_TREATMENT = false;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_removeTourniquet_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_removeTourniquet_CMS.sqf
new file mode 100644
index 0000000000..90e23877cb
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_removeTourniquet_CMS.sqf
@@ -0,0 +1,41 @@
+/**
+ * fn_removeTourniquet_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_caller","_unit","_part","_selectionName","_removeItem","_tourniquets"];
+_unit = _this select 0;
+_caller = _this select 1;
+_selectionName = _this select 2;
+
+[_caller,"You attempt to remove a tourniquet"] call cse_fnc_sendHintTo;
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {["MUTEX HAS BEEN SET - EXITING"] call cse_fnc_debug;};
+ [_caller,"set"] call cse_fnc_treatmentMutex_CMS;
+
+
+if !([_unit, _selectionName] call cse_fnc_hasTourniquetAppliedTo_CMS) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+ [_caller,"There is no tourniquet on this body part!"] call cse_fnc_sendHintTo;
+};
+
+if (vehicle _caller == _caller && (vehicle _unit == _unit)) then {
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _caller;
+if !([5,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{hint "Action aborted. You moved away";}] call cse_fnc_gui_loadingBar) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+_part = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+_tourniquets = [_unit,"cse_tourniquets"] call cse_fnc_getVariable;
+_tourniquets set[_part,0];
+[_unit,"cse_tourniquets",_tourniquets] call cse_fnc_setVariable;
+
+_caller addMagazine "cse_tourniquet";
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+
+[_unit,"treatment",format["%1 removed a tourniquet on %2",[_caller] call cse_fnc_getName,_selectionName]] call cse_fnc_addActivityToLog_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_tourniquetLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_tourniquetLocal_CMS.sqf
new file mode 100644
index 0000000000..dce56d6175
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_tourniquetLocal_CMS.sqf
@@ -0,0 +1,52 @@
+/**
+ * fn_tourniquetLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_selectionName","_removeItem"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+ [_injuredPerson,"treatment",format["%1 applied a tourniquet on %2",[_treatingPerson] call cse_fnc_getName,_selectionName]] call cse_fnc_addActivityToLog_CMS;
+ [_injuredPerson,_removeItem] call cse_fnc_addToTriageList_CMS;
+ [_injuredPerson] spawn cse_fnc_unitLoop_CMS;
+ _part = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+ _tourniquets = [_injuredPerson,"cse_tourniquets"] call cse_fnc_getVariable;
+ _applyingTo = (_tourniquets select _part) +1 + round(random(100));
+ _tourniquets set[_part,_applyingTo];
+ [_injuredPerson,"cse_tourniquets",_tourniquets] call cse_fnc_setVariable;
+
+ [_injuredPerson,_part,_applyingTo] spawn {
+ private ["_injuredPerson","_part","_tourniquets","_appliedTo","_totalAmountOfPainAdded"];
+ _injuredPerson = _this select 0;
+ _part = _this select 1;
+ _key = _this select 2;
+ sleep 300 + (random(1800));
+ _tourniquets = [_injuredPerson,"cse_tourniquets"] call cse_fnc_getVariable;
+ _totalAmountOfPainAdded = 0;
+ while {((_tourniquets select _part) == _key)} do {
+ // increase pain level
+ _pain = [_injuredPerson, "cse_pain"] call cse_fnc_getVariable;
+ _pain = _pain + 0.005;
+ _totalAmountOfPainAdded = _totalAmountOfPainAdded + 0.005;
+ [_injuredPerson, "cse_pain",_pain] call cse_fnc_setVariable;
+ sleep 5;
+ };
+
+ _pain = [_injuredPerson, "cse_pain"] call cse_fnc_getVariable;
+ if (_pain < _totalAmountOfPainAdded) then {
+ _pain = 0;
+ } else {
+ _pain = _pain - _totalAmountOfPainAdded;
+ };
+ [_injuredPerson, "cse_pain",_pain] call cse_fnc_setVariable;
+ };
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_tourniquet_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_tourniquet_CMS.sqf
new file mode 100644
index 0000000000..f71b0a32ff
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_tourniquet_CMS.sqf
@@ -0,0 +1,47 @@
+/**
+ * fn_tourniquet_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_caller","_unit","_part","_selectionName","_removeItem", "_tourniquets", "_continue"];
+_unit = _this select 0;
+_caller = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+[_caller,"You attempt to apply a tourniquet"] call cse_fnc_sendHintTo;
+
+if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+[_caller,"set"] call cse_fnc_treatmentMutex_CMS;
+if (!([_caller, _unit, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith { [_caller,"release"] call cse_fnc_treatmentMutex_CMS; };
+
+_part = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+if (_part == 0 || _part == 1) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+ [_caller,"You cannot apply a CAT on this body part!"] call cse_fnc_sendHintTo;
+};
+
+_tourniquets = [_unit,"cse_tourniquets"] call cse_fnc_getVariable;
+if ((_tourniquets select _part) >0) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+ [_caller,"There is already a tourniquet on this body part!"] call cse_fnc_sendHintTo;
+};
+
+if (vehicle _caller == _caller && (vehicle _unit == _unit) && !(stance _caller == "PRONE")) then {
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+};
+CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _caller;
+if !([5,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{hint "Action aborted. You moved away";}] call cse_fnc_gui_loadingBar) exitwith {
+ [_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+};
+["Now uses the magazine"] call cse_fnc_debug;
+[_caller, _unit,_removeItem] call cse_fnc_useEquipment_CMS;
+
+[_this, "cse_fnc_tourniquetLocal_CMS", _unit, false] spawn BIS_fnc_MP;
+[_caller,"release"] call cse_fnc_treatmentMutex_CMS;
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentAirwayLocal_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentAirwayLocal_CMS.sqf
new file mode 100644
index 0000000000..df79d5fa45
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentAirwayLocal_CMS.sqf
@@ -0,0 +1,40 @@
+/**
+ * fn_treatmentAirwayLocal_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_part","_selectionName","_openWounds","_woundsArray","_highest_amount","_highestSpot","_collectiveImpact", "_highestTotal","_totalNumber"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+if (!local _injuredPerson) exitwith{["cse_fnc_treatmentAirwayLocal_CMS called on non local machine",3] call cse_fnc_debug; };
+[_injuredPerson] spawn cse_fnc_unitLoop_CMS;
+if (_treatingPerson == _injuredPerson) exitwith {};
+
+
+[_injuredPerson,"STR_CSE_CMS_AIRWAY","STR_CSE_CMS_IS_TREATING_YOUR_AIRWAY",0, [([_treatingPerson] call cse_fnc_getName)]] call cse_fnc_sendDisplayMessageTo;
+[_injuredPerson,_removeItem] call cse_fnc_addToTriageList_CMS;
+
+_airwayStatus = [_injuredPerson,"cse_airway"] call cse_fnc_getVariable;
+if (_airwayStatus > 0) then {
+ if (!([_treatingPerson] call cse_fnc_medicClass_CMS)) then {
+ _injuredPerson setvariable ["cse_airwayTreated", true, true];
+ // [_injuredPerson,"cse_airway", _airwayStatus - 1] call cse_fnc_getVariable;
+
+ } else {
+ if (random (1) > 0.35) then {
+ _injuredPerson setvariable ["cse_airwayTreated", true, true];
+ // [_injuredPerson,"cse_airway", _airwayStatus - 1] call cse_fnc_getVariable;
+ } else {
+ [_injuredPerson] call cse_fnc_setDead_CMS;
+ };
+ };
+};
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentAirway_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentAirway_CMS.sqf
new file mode 100644
index 0000000000..8dd5730b8b
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentAirway_CMS.sqf
@@ -0,0 +1,45 @@
+/**
+ * fn_treatmentAirway_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_treatingPerson","_injuredPerson","_part","_selectionName","_openWounds","_woundsArray","_highest_amount","_highestSpot"];
+_injuredPerson = _this select 0;
+_treatingPerson = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+[format["Treatment Airway: %1",_this]] call cse_fnc_debug;
+
+_part = [_selectionName] call cse_fnc_getBodyPartNumber_CMS;
+if (_part == 0 || _part == 1) then {
+ if (call cse_fnc_isSetTreatmentMutex_CMS) exitwith {};
+ [_treatingPerson] call cse_fnc_treatmentMutex_CMS;
+ if (!([_treatingPerson, _injuredPerson, _removeItem] call cse_fnc_hasEquipment_CMS)) exitwith { [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS; };
+
+ [_treatingPerson, _injuredPerson,_removeItem] call cse_fnc_useEquipment_CMS;
+
+ if (vehicle _treatingPerson == _treatingPerson && (vehicle _injuredPerson == _injuredPerson)) then {
+ [_treatingPerson,"AinvPknlMstpSlayWrflDnon_medic"] call cse_fnc_localAnim;
+ };
+ _name = [_injuredPerson] call cse_fnc_getName;
+
+ [_treatingPerson,"STR_CSE_CMS_AIRWAY","STR_CSE_CMS_YOU_TREAT_AIRWAY", 0, [_name]] call cse_fnc_sendDisplayMessageTo;
+
+ CSE_ORIGINAL_POSITION_PLAYER_CMS = getPos _treatingPerson;
+ if !([5,{((vehicle player != player) ||((getPos player) distance CSE_ORIGINAL_POSITION_PLAYER_CMS) < 1)}, {},{[player, "STR_CSE_CMS_CANCELED", ["STR_CSE_CMS_ACTION_CANCELED","STR_CSE_CMS_YOU_MOVED_AWAY"]] call cse_fnc_sendDisplayInformationTo;}] call cse_fnc_gui_loadingBar) exitwith {
+ [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
+ };
+
+ [_this, "cse_fnc_treatmentAirwayLocal_CMS", _injuredPerson, false] spawn BIS_fnc_MP;
+ [_treatingPerson,"release"] call cse_fnc_treatmentMutex_CMS;
+} else {
+ hintSilent "Cannot apply item on this body part";
+};
+true
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentMutex_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentMutex_CMS.sqf
new file mode 100644
index 0000000000..82c0cd4d10
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_treatmentMutex_CMS.sqf
@@ -0,0 +1,33 @@
+/**
+ * fn_treatmentMutex_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: [client OBJECT, action STRING ("release" releases the mutex if it has been set. "set" for setting the mutex)]
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+private ["_client","_action"];
+_client = _this select 0;
+
+if (!local _client) exitwith {
+ [_this, "cse_fnc_treatmentMutex_CMS", _client, false] spawn BIS_fnc_MP;
+};
+if (isnil "CSE_PERFORMING_TREATMENT_CMS_MUTEX") then {
+ CSE_PERFORMING_TREATMENT_CMS_MUTEX = false;
+};
+if (count _this > 1) exitwith {
+ _action = _this select 1;
+ if (_action == "release" || _action == "RELEASE") then {
+ ["RELEASING TREATMENT MUTEX"] call cse_fnc_debug;
+ CSE_PERFORMING_TREATMENT_CMS_MUTEX = false;
+ } else {
+ waituntil {!CSE_PERFORMING_TREATMENT_CMS_MUTEX};
+ CSE_PERFORMING_TREATMENT_CMS_MUTEX = true;
+ ["SETTING TREATMENT MUTEX 2"] call cse_fnc_debug;
+ };
+};
+waituntil {!CSE_PERFORMING_TREATMENT_CMS_MUTEX};
+CSE_PERFORMING_TREATMENT_CMS_MUTEX = true;
+["SETTING TREATMENT MUTEX 1"] call cse_fnc_debug;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/treatment/fn_useEquipment_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/treatment/fn_useEquipment_CMS.sqf
new file mode 100644
index 0000000000..65c6e99625
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/treatment/fn_useEquipment_CMS.sqf
@@ -0,0 +1,41 @@
+/**
+ * fn_useEquipment_CMS.sqf
+ * @Descr: Use Equipment if any is available. Priority: 1) Medic, 2) Patient. If in vehicle: 3) Crew
+ * @Author: Glowbal
+ *
+ * @Arguments: [medic OBJECT, patient OBJECT, item STRING (ClassName of magazine item)]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+private ["_medic", "_patient", "_item", "_return","_crew"];
+_medic = _this select 0;
+_patient = _this select 1;
+_item = _this select 2;
+
+if (isnil "CSE_ALLOW_SHARED_EQUIPMENT_CMS") then {
+ CSE_ALLOW_SHARED_EQUIPMENT_CMS = true;
+};
+
+if (CSE_ALLOW_SHARED_EQUIPMENT_CMS && {[_patient, _item] call cse_fnc_hasItem}) exitwith {
+ [[_patient, _item], "cse_fnc_useItem", _patient] call BIS_fnc_MP;
+ true;
+};
+
+if ([_medic, _item] call cse_fnc_hasItem) exitwith {
+ [[_medic, _item], "cse_fnc_useItem", _medic] call BIS_fnc_MP;
+ true;
+};
+
+_return = false;
+if ([vehicle _medic] call cse_fnc_isMedicalVehicle_CMS && {vehicle _medic != _medic}) then {
+ _crew = crew vehicle _medic;
+ {
+ if ([_x, _medic] call cse_fnc_canAccessMedicalEquipment_CMS && {([_x, _item] call cse_fnc_hasItem)}) exitwith {
+ _return = true;
+ [[_x, _item], "cse_fnc_useItem", _x] call BIS_fnc_MP;
+ };
+ }foreach _crew;
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/triage/fn_addToTriageList_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/triage/fn_addToTriageList_CMS.sqf
new file mode 100644
index 0000000000..0d3afb17bb
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/triage/fn_addToTriageList_CMS.sqf
@@ -0,0 +1,34 @@
+/**
+ * fn_addToTriageList_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_caller","_type","_activity","_log"];
+_unit = _this select 0;
+_newItem = _this select 1;
+
+if (!local _unit) exitwith {
+ [_this, "cse_fnc_addToTriageList_CMS", _unit, false] spawn BIS_fnc_MP;
+};
+
+_log = [_unit,"cse_triageCard"] call cse_fnc_getVariable;
+_inList = false;
+_counter = 0;
+{
+ if ((_x select 0) == _newItem) exitwith {
+ _info = _log select _counter;
+ _info set [1,(_info select 1) + 1];
+ _log set [ _counter, _info];
+ _inList = true;
+ };
+ _counter = _counter + 1;
+}foreach _log;
+if (!_inList) then {
+ _log pushback [_newItem,1];
+};
+[_unit,"cse_triageCard",_log] call cse_fnc_setVariable;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/triage/fn_getTriageList_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/triage/fn_getTriageList_CMS.sqf
new file mode 100644
index 0000000000..e0bca66e81
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/triage/fn_getTriageList_CMS.sqf
@@ -0,0 +1,20 @@
+/**
+ * fn_getTriageList_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private["_unit"];
+_unit = _this select 0;
+_log = [_unit,"cse_triageCard"] call cse_fnc_getVariable;
+if (isnil "_log") then {
+ _log = [];
+};
+if (typeName _log != typeName []) then {
+ _log = [];
+};
+_log
diff --git a/TO_MERGE/cse/sys_medical/functions/triage/fn_getTriageStatus_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/triage/fn_getTriageStatus_CMS.sqf
new file mode 100644
index 0000000000..d1c3c63029
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/triage/fn_getTriageStatus_CMS.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_getTriageStatus_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_return","_status"];
+_unit = _this select 0;
+//_status = [_unit,"cse_triageLevel"] call cse_fnc_getVariable;
+ _status = _unit getvariable ["cse_triageLevel", -1];
+
+_return = switch (_status) do {
+ case 0: {["None",0,[0,0,0,0.7]]}; // none
+ case 1: {["Minor",1,[0,0.5,0,0.7]]};
+ case 2: {["Delayed",2,[0.77,0.51,0.08,0.7]]};
+ case 3: {["Immediate",3,[1,0.2,0.2,0.7]]};
+ case 4: {["Deceased",4,[0,0,0,0.7]]};
+ default {["None",0,[0,0,0,0.7]]};
+};
+
+_return
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/triage/fn_setTriageStatus_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/triage/fn_setTriageStatus_CMS.sqf
new file mode 100644
index 0000000000..1ed3564e89
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/triage/fn_setTriageStatus_CMS.sqf
@@ -0,0 +1,19 @@
+/**
+ * fn_setTriageStatus_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit","_caller","_type","_activity","_status"];
+
+_unit = _this select 0;
+_status = _this select 1;
+
+if (!local _unit) exitwith {
+ [_this, "cse_fnc_setTriageStatus_CMS", _unit, false] spawn BIS_fnc_MP;
+};
+[_unit,"cse_triageLevel",_status] call cse_fnc_setVariable;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_displayOptions_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_displayOptions_CMS.sqf
new file mode 100644
index 0000000000..a5df521c7d
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_displayOptions_CMS.sqf
@@ -0,0 +1,92 @@
+/**
+ * fn_displayOptions_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#define START_IDC 20
+#define END_IDC 27
+#define AMOUNT_OF_ENTRIES (count _entries)
+
+private ["_name","_entries","_display","_newTarget","_counter","_card","_ctrl","_code"];
+_name = _this select 0;
+if (isDedicated) exitwith{};
+_entries = switch (_name) do {
+ case "advanced": {[_name] call cse_fnc_getAdvancedOptions_CMS};
+ case "examine": {[_name] call cse_fnc_getExamineOptions_CMS};
+ case "bandage": {[_name] call cse_fnc_getBandageOptions_CMS};
+ case "medication": {[_name] call cse_fnc_getMedicationOptions_CMS};
+ case "airway": {[_name] call cse_fnc_getAirwayOptions_CMS};
+ case "triage": {[_name] call cse_fnc_getTriageCardOptions_CMS};
+ case "drag": {[_name] call cse_fnc_getDragOptions_CMS};
+ case "toggle": {[_name] call cse_fnc_getToggleOptions_CMS};
+ default {[]};
+};
+
+disableSerialization;
+_display = uiNamespace getVariable 'cse_sys_medicalMenu';
+if ((_name == "toggle")) exitwith {
+
+ if (CSE_SYS_MEDICAL_INTERACTION_TARGET != player) then {
+ _newTarget = player;
+ } else {
+ _newTarget = CSE_SYS_MEDICAL_INTERACTION_TARGET_PREVIOUS;
+ };
+
+ CSE_SYS_MEDICAL_INTERACTION_TARGET_PREVIOUS = CSE_SYS_MEDICAL_INTERACTION_TARGET;
+ [_newTarget] spawn {
+ closeDialog 0;
+ sleep 0.1;
+ [_this select 0] call cse_fnc_openMenu_CMS;
+ };
+};
+
+CSE_LATEST_DISPLAY_OPTION_MENU_CMS = _name;
+lbClear 212;
+if (_name == "triage") then {
+ ctrlEnable[212,true];
+ _card = ([CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_getTriageList_CMS);
+ {
+ lbadd[212,format["%1 x%2",getText(configFile >> "CfgMagazines" >> (_x select 0) >> "displayName"),_x select 1]];
+ }foreach _card;
+ if (count _card == 0) then {
+ lbadd[212,"No Entries"];
+ };
+} else {
+ ctrlEnable[212,false];
+};
+
+
+for [{_x=START_IDC},{_x <= END_IDC},{_x=_x+1}] do {
+ _ctrl = (_display displayCtrl (_x));
+ _ctrl ctrlSetText "";
+ //_ctrl ctrlSetPosition[-100,-100];
+ _ctrl ctrlShow false;
+ _ctrl ctrlSetEventHandler ["ButtonClick",""];
+ _ctrl ctrlSetTooltip "";
+ _ctrl ctrlCommit 0;
+
+};
+
+{
+ //player sidechat format["TRIGGERED: %1",_x];
+ if (_foreachIndex > END_IDC) exitwith {};
+ _ctrl = (_display displayCtrl (START_IDC + _foreachIndex));
+ if (!(_foreachIndex > AMOUNT_OF_ENTRIES)) then {
+ _ctrl ctrlSetText (_x select 0);
+ _code = format["[CSE_SYS_MEDICAL_INTERACTION_TARGET,PLAYER] spawn { %1 };",(_x select 1),CSE_SYS_MEDICAL_INTERACTION_TARGET,player];
+ _ctrl ctrlSetEventHandler ["ButtonClick", _code];
+ _ctrl ctrlSetTooltip (_x select 2);
+ _ctrl ctrlShow true;
+ } else {
+ _ctrl ctrlSetText "";
+ _ctrl ctrlSetEventHandler ["ButtonClick",""];
+ };
+ _ctrl ctrlCommit 0;
+}foreach _entries;
+
+[] call cse_fnc_updateIcons_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_dropDownTriageCard_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_dropDownTriageCard_CMS.sqf
new file mode 100644
index 0000000000..7392e0d818
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_dropDownTriageCard_CMS.sqf
@@ -0,0 +1,27 @@
+/**
+ * fn_dropDownTriageCard_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_display","_pos","_ctrl","_curPos","_idc"];
+disableSerialization;
+_display = uiNamespace getVariable 'cse_sys_medicalMenu';
+_pos = [ 0,0,0,0];
+_curPos = ctrlPosition (_display displayCtrl 2002);
+if ((_curPos select 0) == 0 && (_curPos select 1) == 0) then {
+ _pos = ctrlPosition (_display displayCtrl 2001);
+};
+
+for "_idc" from 2002 to 2006 step 1 do
+{
+ _pos set [1, (_pos select 1) + (_pos select 3)];
+ _ctrl = (_display displayCtrl _idc);
+ _ctrl ctrlSetPosition _pos;
+ _ctrl ctrlCommit 0;
+};
+
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_getCurrentSelectedInjuryData_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_getCurrentSelectedInjuryData_CMS.sqf
new file mode 100644
index 0000000000..bc2f6e74f3
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_getCurrentSelectedInjuryData_CMS.sqf
@@ -0,0 +1,18 @@
+/**
+ * fn_getCurrentSelectedInjuryData_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_return", "_current"];
+
+_return = "";
+if (dialog) then {
+ _current = lbCurSel 213;
+ _return = lbData [213,_current];
+};
+_return;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_onMenuOpen_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_onMenuOpen_CMS.sqf
new file mode 100644
index 0000000000..74aaef6d10
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_onMenuOpen_CMS.sqf
@@ -0,0 +1,67 @@
+/**
+ * fn_onMenuOpen_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+if (isnil "CSE_LATEST_DISPLAY_OPTION_MENU_CMS") then {
+ CSE_LATEST_DISPLAY_OPTION_MENU_CMS = "triage";
+} else {
+ if (CSE_LATEST_DISPLAY_OPTION_MENU_CMS == "toggle") then {
+ CSE_LATEST_DISPLAY_OPTION_MENU_CMS = "triage";
+ CSE_SYS_MEDICAL_INTERACTION_TARGET = CSE_SYS_MEDICAL_INTERACTION_TARGET_PREVIOUS;
+ };
+};
+
+private ["_display","_target"];
+_target = CSE_SYS_MEDICAL_INTERACTION_TARGET;
+CSE_SYS_MEDICAL_INTERACTION_TARGET = _target;
+if (isnil "CSE_SYS_MEDICAL_INTERACTION_TARGET_PREVIOUS") then {
+ CSE_SYS_MEDICAL_INTERACTION_TARGET_PREVIOUS = _target;
+};
+[CSE_LATEST_DISPLAY_OPTION_MENU_CMS] call cse_fnc_displayOptions_CMS;
+
+[] call cse_fnc_updateActivityLog_CMS;
+[_target] call cse_fnc_updateUIInfo_CMS;
+
+// 11 till 18
+disableSerialization;
+_display = uiNamespace getVariable 'cse_sys_medicalMenu';
+(_display displayCtrl 11) ctrlSetTooltip localize "STR_CSE_UI_VIEW_TRIAGE_CARD";
+(_display displayCtrl 12) ctrlSetTooltip localize "STR_CSE_UI_EXAMINE_PATIENT";
+(_display displayCtrl 13) ctrlSetTooltip localize "STR_CSE_UI_BANDAGE_FRACTURES";
+(_display displayCtrl 14) ctrlSetTooltip localize "STR_CSE_UI_MEDICATION";
+(_display displayCtrl 15) ctrlSetTooltip localize "STR_CSE_UI_AIRWAY_MANAGEMENT";
+(_display displayCtrl 16) ctrlSetTooltip localize "STR_CSE_UI_ADVANCED_TREATMENT";
+(_display displayCtrl 17) ctrlSetTooltip localize "STR_CSE_UI_DRAG_CARRY";
+(_display displayCtrl 18) ctrlSetTooltip localize "STR_CSE_UI_TOGGLE_SELF";
+
+(_display displayCtrl 301) ctrlSetTooltip localize "STR_CSE_UI_SELECT_HEAD";
+(_display displayCtrl 302) ctrlSetTooltip localize "STR_CSE_UI_SELECT_TORSO";
+(_display displayCtrl 303) ctrlSetTooltip localize "STR_CSE_UI_SELECT_ARM_R";
+(_display displayCtrl 304) ctrlSetTooltip localize "STR_CSE_UI_SELECT_ARM_L";
+(_display displayCtrl 305) ctrlSetTooltip localize "STR_CSE_UI_SELECT_LEG_R";
+(_display displayCtrl 306) ctrlSetTooltip localize "STR_CSE_UI_SELECT_LEG_L";
+//if (_target != player) then {
+ (_display displayCtrl 2001) ctrlSetTooltip localize "STR_CSE_UI_SELECT_TRIAGE_STATUS";
+//};
+(_display displayCtrl 1) ctrlSetText format["%1",[_target] call cse_fnc_getName];
+setMousePosition [ 0.4, 0.4];
+
+["cse_onMenuOpen_CMS", "onEachFrame", {
+ _display = _this select 0;
+ if (isNull CSE_SYS_MEDICAL_INTERACTION_TARGET) then {
+ CSE_SYS_MEDICAL_INTERACTION_TARGET = player;
+ };
+ [CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_updateUIInfo_CMS;
+ [] call cse_fnc_updateActivityLog_CMS;
+ [CSE_LATEST_DISPLAY_OPTION_MENU_CMS] call cse_fnc_displayOptions_CMS;
+ _status = [CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_getTriageStatus_CMS;
+ (_display displayCtrl 2000) ctrlSetText (_status select 0);
+ (_display displayCtrl 2000) ctrlSetBackgroundColor (_status select 2);
+
+ }, [_display]] call BIS_fnc_addStackedEventHandler;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_openMenu_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_openMenu_CMS.sqf
new file mode 100644
index 0000000000..14808565ed
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_openMenu_CMS.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_openMenu_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_interactionTarget"];
+_interactionTarget = objNull;
+if (count _this > 0) then {
+ _interactionTarget = _this select 0;
+
+} else {
+ _interactionTarget = cursortarget;
+ if (isNull _interactionTarget) then {
+ _interactionTarget = player;
+ };
+ if (_interactionTarget distance player > 5 || !(_interactionTarget isKindOf "CaManBase")) then {
+ _interactionTarget = player;
+ };
+};
+
+if (isNull _interactionTarget) then { // _interactionTarget undefined here. WTF?
+ _interactionTarget = player;
+};
+
+[format["INTERACTION WITH: %1",_interactionTarget]] call cse_fnc_Debug;
+[player,_interactionTarget] call cse_fnc_registerInteractingWith;
+CSE_SYS_MEDICAL_INTERACTION_TARGET = _interactionTarget;
+createDialog "cse_sys_medicalMenu";
+//[player,"release"] call cse_fnc_treatmentMutex_CMS; // Do we want to force release the treatment event, to prefent deadlock within the CMS Module?
+
+[_interactionTarget] spawn {
+ waituntil {sleep 0.1; !dialog};
+ [player,_this select 0] call cse_fnc_unregisterInteractingWith;
+};
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_updateActivityLog_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateActivityLog_CMS.sqf
new file mode 100644
index 0000000000..2b65b5e630
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateActivityLog_CMS.sqf
@@ -0,0 +1,46 @@
+/**
+ * fn_updateActivityLog_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+[] spawn {
+ _log = [CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_getActivityLog_CMS;
+ _counter = 0;
+ lbclear 214;
+ {
+
+ //[_caller,_moment,_activity,_type]
+ lbadd[214, _x select 1]; // moment
+ lbadd[214, _x select 0]; // name, caller
+ //lbadd[214, _x select 2]; // activity
+ lbSetData [214,_counter,_x select 2];
+
+ _counter = _counter + 1;
+ }foreach _log;
+ if (count _log < 1) then {
+ lbadd[214, "No Activity recorded.."];
+ lbadd[214, ""];
+ };
+
+ _log = [CSE_SYS_MEDICAL_INTERACTION_TARGET] call cse_fnc_getQuickViewLog_CMS;
+ _counter = 0;
+ lbclear 215;
+ {
+
+ //[_caller,_moment,_activity,_type]
+ lbadd[215, _x select 1]; // moment
+ lbadd[215, _x select 0]; // name, caller
+ lbSetData [215,_counter,_x select 2];
+ _counter = _counter + 1;
+ }foreach _log;
+ if (count _log < 1) then {
+ lbadd[215, "No Data recorded.."];
+ lbadd[215, ""];
+ };
+
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_updateBodyImg_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateBodyImg_CMS.sqf
new file mode 100644
index 0000000000..4b61cfacc3
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateBodyImg_CMS.sqf
@@ -0,0 +1,66 @@
+/**
+ * fn_updateBodyImg_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_unit", "_interactionDialog", "_openWounds", "_part", "_total", "_amountOfWoundsSmall", "_amountOfWoundsMedium", "_amountOfWoundsLarge", "_bandagedWounds","_alphaLevel"];
+_openWounds = _this select 0;
+_bandagedWounds = _this select 1;
+
+disableSerialization;
+_interactionDialog = uiNamespace getvariable "cse_sys_medicalMenu";
+_colorCalculationsOpenWounds = {
+ if (_total >0) then {
+ _green = 0.9;
+ _blue = 0.9;
+ for [{_i = 0},{ _i < round(_total)},{ _i = _i +1;}] do {
+ _green = _green - 0.75;
+ _blue = _blue - 0.75;
+ };
+ if (_green < 0.0) then {
+ _green = 0.0;
+ _blue = 0.0;
+ };
+ _damaged set[_part,true];
+ };
+};
+_alphaLevel = 1.0;
+_damaged = [false,false,false,false,false,false];
+_availableSelections = [50,51,52,53,54,55];
+_part = 0;
+ {
+ private ["_red", "_green", "_blue"];
+ _amountOfWoundsSmall = (_x select 0);
+ _amountOfWoundsMedium = (_x select 1);
+ _amountOfWoundsLarge = (_x select 2);
+ _total = (_amountOfWoundsSmall) + _amountOfWoundsMedium + (_amountOfWoundsLarge);
+
+ _red = 1;
+ _green = 1;
+ _blue = 1;
+ call _colorCalculationsOpenWounds;
+ (_interactionDialog displayCtrl (_availableSelections select _part)) ctrlSetTextColor [_red,_green,_blue,_alphaLevel];
+ _part = _part + 1;
+ }foreach _openWounds;
+
+ {
+ if (!(_damaged select _foreachIndex)) then {
+ _amountOfWoundsSmall = (_x select 0);
+ _amountOfWoundsMedium = (_x select 1);
+ _amountOfWoundsLarge = (_x select 2);
+
+ _total = (_amountOfWoundsSmall) + _amountOfWoundsMedium + (_amountOfWoundsLarge);
+ if (_total>0) then {
+ private ["_red", "_green", "_blue"];
+ _red = 1.0;
+ _green = 0.7;
+ _blue = 0.7;
+ (_interactionDialog displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red,_green,_blue,_alphaLevel];
+ };
+ };
+ }foreach _bandagedWounds;
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_updateIcons_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateIcons_CMS.sqf
new file mode 100644
index 0000000000..66d5ba34a7
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateIcons_CMS.sqf
@@ -0,0 +1,36 @@
+/**
+ * fn_updateIcons_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+private ["_display","_startIDC","_idc","_options","_name","_amount"];
+disableSerialization;
+_display = uiNamespace getVariable 'cse_sys_medicalMenu';
+_startIDC = 111;
+
+_options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"];
+for "_idc" from _startIDC to 118 step 1 do
+{
+ _name = _options select (_idc - 111);
+ _amount = switch (_name) do {
+ case "advanced": {[_name] call cse_fnc_getAdvancedOptions_CMS};
+ case "examine": {[_name] call cse_fnc_getExamineOptions_CMS};
+ case "bandage": {[_name] call cse_fnc_getBandageOptions_CMS};
+ case "medication": {[_name] call cse_fnc_getMedicationOptions_CMS};
+ case "airway": {[_name] call cse_fnc_getAirwayOptions_CMS};
+ case "triage": {[_name] call cse_fnc_getTriageCardOptions_CMS};
+ case "drag": {[_name] call cse_fnc_getDragOptions_CMS};
+ case "toggle": {[_name] call cse_fnc_getToggleOptions_CMS};
+ default {[]};
+ };
+ if ((count _amount) > 0 || _idc == 111 || _idc == 118) then {
+ (_display displayCtrl _idc) ctrlSettextColor [1,1,1,1];
+ } else {
+ (_display displayCtrl _idc) ctrlSettextColor [0.4,0.4,0.4,1];
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/ui/fn_updateUIInfo_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateUIInfo_CMS.sqf
new file mode 100644
index 0000000000..fa5967549c
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/ui/fn_updateUIInfo_CMS.sqf
@@ -0,0 +1,218 @@
+/**
+ * fn_updateUIInfo_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+
+private ["_targetObj","_bodyPartText","_bodyPartN","_openWounds","_bandagedWounds","_fractures","_listOfWounds","_listOfBandagedWounds","_listOfFractures","_counter","_nameEntry","_untreatedWounds" ,"_remainder", "_numberOf", "_airwayStatus", "_airwayTreated"];
+_targetObj = _this select 0;
+
+_bodyPartText = (call cse_fnc_getSelectedBodyPart_CMS);
+_bodyPartN = [_bodyPartText] call cse_fnc_getBodyPartNumber_CMS;
+
+if (_bodyPartN < 0 || _bodyPartN > 5) exitwith {};
+_openWounds = [_targetObj,"cse_openWounds"] call cse_fnc_getVariable;
+_bandagedWounds = [_targetObj,"cse_bandagedWounds"] call cse_fnc_getVariable;
+_fractures = [_targetObj,"cse_fractures"] call cse_fnc_getVariable;
+_airwayStatus = [_targetObj,"cse_airway"] call cse_fnc_getVariable;
+/*_openWounds = [_targetObj,"cse_openWounds"] call cse_fnc_getMonitoredVariableValue;
+_bandagedWounds = [_targetObj,"cse_bandagedWounds"] call cse_fnc_getMonitoredVariableValue;
+_fractures = [_targetObj,"cse_fractures"] call cse_fnc_getMonitoredVariableValue;*/
+
+if (count _this > 1) then {
+ switch (_this select 1) do {
+ case "cse_openWounds": { _openWounds = _this select 2; };
+ case "cse_bandagedWounds": { _bandagedWounds = _this select 2; };
+ case "cse_fractures": { _fractures = _this select 2; };
+ };
+};
+
+[_openWounds,_bandagedWounds] spawn cse_fnc_updateBodyImg_CMS;
+_listOfWounds = _openWounds select _bodyPartN;
+_listOfBandagedWounds = _bandagedWounds select _bodyPartN;
+_listOfFractures = _fractures select _bodyPartN;
+
+// TODO collect all information first, then clear the lb and fill in with details. Also; use ctrl instead of IDC.
+_numberOf = 0;
+lbClear 213;
+
+_displayBodyPartText = switch (_bodyPartText) do {
+ case "head": {
+ localize "STR_CSE_UI_HEAD";
+ };
+ case "body": {
+ localize "STR_CSE_UI_TORSO";
+ };
+ case "hand_r": {
+ localize "STR_CSE_UI_ARM_R";
+ };
+ case "hand_l": {
+ localize "STR_CSE_UI_ARM_L";
+ };
+ case "leg_r": {
+ localize "STR_CSE_UI_LEG_R";
+ };
+ case "leg_l": {
+ localize "STR_CSE_UI_LEG_L";
+ };
+ default {"-"};
+};
+
+
+lbadd[213,format[localize "STR_CSE_UI_SELECTED_BODY_PART",_displayBodyPartText]];
+lbSetData [213, _numberOf, ""];
+lbSetColor [213, _numberOf, [0.27, 0.40, 0.26, 1]];
+//[] spawn cse_fnc_updateActivityLog_CMS;
+_numberOf = _numberOf + 1;
+
+if (CSE_ALLOW_AIRWAY_INJURIES_CMS) then {
+ _airwayTreated = _targetObj getvariable ["cse_airwayTreated", false];
+
+ if (_airwayStatus > 0) then {
+ _nameEntry = switch (_airwayStatus) do {
+ case 0: {localize "STR_CSE_UI_NORMAL_BREATHING"};
+ case 1: {localize "STR_CSE_UI_DIFFICULT_BREATHING"};
+ case 2: {localize "STR_CSE_UI_ALMOST_NO_BREATHING"};
+ default {localize "STR_CSE_UI_NO_BREATHING"};
+ };
+
+ if (!(alive _targetObj) || (_targetObj getvariable ["cse_isDead", false])) then {
+ lbadd[213,format["%1",localize "STR_CSE_UI_NO_BREATHING"]];
+ } else {
+ lbadd[213,format["%1",_nameEntry]];
+ };
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+ } else {
+ if (!(alive _targetObj) || (_targetObj getvariable ["cse_isDead", false])) then {
+ lbadd[213,format["%1",localize "STR_CSE_UI_NO_BREATHING"]];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+ };
+ };
+
+ if (_airwayTreated) then {
+ lbadd[213,localize "STR_CSE_UI_STATUS_NPA_APPLIED"];
+ lbSetData [213, _numberOf, ""];
+ lbSetColor [213, _numberOf, [0.5, 0.5, 0, 1]];
+ _numberOf = _numberOf + 1;
+ };
+};
+
+if (([_targetObj,"cse_isBleeding_CMS"] call cse_fnc_getVariable)) then {
+ lbadd[213,localize "STR_CSE_UI_STATUS_BLEEDING"];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+if (([_targetObj,"cse_hasLostBlood_CMS"] call cse_fnc_getVariable)) then {
+ lbadd[213,localize "STR_CSE_UI_STATUS_LOST_BLOOD"];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+
+if (([_targetObj,"cse_hasPain_CMS"] call cse_fnc_getVariable)) then {
+ lbadd[213,localize "STR_CSE_UI_STATUS_PAIN"];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+if (([_targetObj, _bodyPartText] call cse_fnc_hasTourniquetAppliedTo_CMS)) then {
+ lbadd[213,localize "STR_CSE_UI_STATUS_TOURNIQUET_APPLIED"];
+ lbSetColor [213, _numberOf, [0.5, 0.5, 0, 1]];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+
+_counter = 0;
+{
+ if (_x > 0) then {
+
+ _untreatedWounds = floor _x;
+ _remainder = _x - (floor _x);
+
+ _nameEntry = switch (_counter) do {
+ case 0: {localize "STR_CSE_UI_SMALL"};
+ case 1: {localize "STR_CSE_UI_MEDIUM"};
+ case 2: {localize "STR_CSE_UI_LARGE"};
+ default {localize "STR_CSE_UI_SMALL"};
+ };
+
+ if (_untreatedWounds > 1) then {
+ lbadd[213,format[localize "STR_CSE_UI_MULTIPLE_OPEN_WOUNDS",_nameEntry,_untreatedWounds]];
+ lbSetData [213, _numberOf, format["open_wound_%1",_counter]];
+ lbSetColor [213, _numberOf, [0.6, 0, 0, 1]];
+ _numberOf = _numberOf + 1;
+ } else {
+ if (_untreatedWounds == 1) then {
+ lbadd[213,format[localize "STR_CSE_UI_SINGLE_OPEN_WOUND",_nameEntry]];
+ lbSetData [213, _numberOf, format["open_wound_%1",_counter]];
+ lbSetColor [213, _numberOf, [0.6, 0, 0, 1]];
+ _numberOf = _numberOf + 1;
+ };
+ };
+
+ if (_remainder > 0) then {
+ lbadd[213,format[localize "STR_CSE_UI_PARTIAL_OPEN_WOUND",_nameEntry]];
+ lbSetData [213, _numberOf, format["open_wound_%1",_counter]];
+ lbSetColor [213, _numberOf, [0.6, 0, 0, 1]];
+ _numberOf = _numberOf + 1;
+ };
+ };
+ _counter = _counter + 1;
+}foreach _listOfWounds;
+
+_counter = 0;
+{
+ if (_x > 0) then {
+
+ _untreatedWounds = floor _x;
+ _remainder = _x - (floor _x);
+
+ _nameEntry = switch (_counter) do {
+ case 0: {localize "STR_CSE_UI_SMALL"};
+ case 1: {localize "STR_CSE_UI_MEDIUM"};
+ case 2: {localize "STR_CSE_UI_LARGE"};
+ default {localize "STR_CSE_UI_SMALL"};
+ };
+
+ if (_untreatedWounds > 1) then {
+ lbadd[213,format[localize "STR_CSE_UI_MULTIPLE_BANDAGED_WOUNDS",_nameEntry,_untreatedWounds]];
+ lbSetData [213, _numberOf, format["bandaged_wound_%1",_counter]];
+ _numberOf = _numberOf + 1;
+ } else {
+ if (_untreatedWounds == 1) then {
+ lbadd[213,format[localize "STR_CSE_UI_SINGLE_BANDAGED_WOUND",_nameEntry]];
+ lbSetData [213, _numberOf, format["bandaged_wound_%1",_counter]];
+ _numberOf = _numberOf + 1;
+ };
+ };
+
+ if (_remainder > 0) then {
+ lbadd[213,format[localize "STR_CSE_UI_PARTIAL_BANDAGED_WOUND",_nameEntry]];
+ lbSetData [213, _numberOf, format["bandaged_wound_%1",_counter]];
+ _numberOf = _numberOf + 1;
+ };
+ };
+ _counter = _counter + 1;
+}foreach _listOfBandagedWounds;
+
+_counter = 0;
+{
+ if (_x > 0) then {
+ _nameEntry = switch (_counter) do {
+ case 0: {localize "STR_CSE_UI_SMALL"};
+ case 1: {localize "STR_CSE_UI_MEDIUM"};
+ case 2: {localize "STR_CSE_UI_LARGE"};
+ default {localize "STR_CSE_UI_SMALL"};
+ };
+ lbadd[213,format["%1 Fracture x%2",_nameEntry,_x]];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+ };
+ _counter = _counter + 1;
+}foreach _listOfFractures;
+
diff --git a/TO_MERGE/cse/sys_medical/functions/vitals/fn_addHeartRateAdjustment_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/vitals/fn_addHeartRateAdjustment_CMS.sqf
new file mode 100644
index 0000000000..15bc298b87
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/vitals/fn_addHeartRateAdjustment_CMS.sqf
@@ -0,0 +1,19 @@
+/**
+ * fn_addHeartRateAdjustment_CMS.sqf
+ * @Descr: Increase the Heart Rate of a local unit by given number within given amount of seconds.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT, value NUMBER, time NUMBER (Amount of seconds), callBack CODE (Called when adjustment is completed)]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+private ["_unit", "_value", "_time", "_adjustment", "_callBack"];
+_unit = [_this, 0, objNull, [objNull]] call BIS_fnc_Param;
+_value = [_this, 1, 0, [0]] call BIS_fnc_Param;
+_time = [_this, 2, 1, [0]] call BIS_fnc_Param;
+_callBack = [_this, 3, {}, [{}]] call BIS_fnc_Param;
+
+_adjustment = [_unit, "cse_heartRateAdjustments"] call cse_fnc_getVariable;
+_adjustment pushback [_value, _time, _callBack];
+_unit setvariable ["cse_heartRateAdjustments", _adjustment ];
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/vitals/fn_getBloodPressure_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getBloodPressure_CMS.sqf
new file mode 100644
index 0000000000..cae57c32a5
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getBloodPressure_CMS.sqf
@@ -0,0 +1,29 @@
+/**
+ * fn_getBloodPressure_CMS.sqf
+ * @Descr: Calculate the current blood pressure of a unit.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (The unit to get the blood pressure from.)]
+ * @Return: ARRAY Blood Pressure. Format [low NUMBER, high NUMBER]
+ * @PublicAPI: true
+ */
+
+/*
+ Value is taken because with cardic output and resistance at default values, it will put blood pressure High at 120.
+*/
+#define MODIFIER_BP_HIGH 0.229
+
+/*
+ Value is taken because with cardic output and resistance at default values, it will put blood pressure Low at 80.
+*/
+#define MODIFIER_BP_LOW 0.1524
+
+private ["_unit", "_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistance"];
+_unit = _this select 0;
+_cardiacOutput = [_unit] call cse_fnc_getCardiacOutput_CMS;
+_resistance = [_unit, "cse_peripheralResistance"] call cse_fnc_getVariable;
+
+_bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
+_bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
+
+[_bloodPressureLow, _bloodPressureHigh];
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/vitals/fn_getBloodVolumeChange_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getBloodVolumeChange_CMS.sqf
new file mode 100644
index 0000000000..241da785b9
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getBloodVolumeChange_CMS.sqf
@@ -0,0 +1,57 @@
+/**
+ * fn_getBloodVolumeChange_CMS.sqf
+ * @Descr: Calculates the blood volume change and decreases the IVs given to the unit.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return: NUMBER Bloodvolume change
+ * @PublicAPI: false
+ */
+
+/*
+ IV Change per second calculation:
+ 250ml should take 60 seconds to fill. 250/60 = 4.166.
+*/
+#define IV_CHANGE_PER_SECOND -4.166
+
+/*
+ Blood Change per second calculation for IVs:
+ 250ml should take 60 seconds to fill in. Total blood volume is 7000ml = 100%.
+ 7000/100 = 70 = 1%
+ 250 / 70 = 3.571428571%
+ 3.571428571 / 60 = 0.0595% per second.
+*/
+#define BLOOD_CHANGE_PER_SECOND 0.0595
+
+
+
+private ["_unit","_bloodVolume","_bloodVolumeChange", "_ivVolume"];
+_unit = _this select 0;
+
+_bloodVolume = _unit getvariable ["cse_bloodVolume", 100];
+_bloodVolumeChange = -(_unit call cse_fnc_getBloodLoss_CMS);
+
+if (_bloodVolume < 100.0) then {
+ if ((_unit getvariable ["cse_salineIVVolume", 0]) > 0) then {
+ _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
+ _ivVolume = (_unit getvariable ["cse_salineIVVolume", 0]) + IV_CHANGE_PER_SECOND;
+ _unit setvariable ["cse_salineIVVolume",_ivVolume];
+ if (["cse_sys_field_rations"] call cse_fnc_isModuleEnabled_F) then {
+ if ([_unit] call cse_fnc_canDrink_FR) then {
+ _unit setvariable ["cse_drink_status_fr", (_unit getvariable ["cse_drink_status_fr", 100]) + 0.2];
+ };
+ };
+ };
+ if ((_unit getvariable ["cse_plasmaIVVolume", 0]) > 0) then {
+ _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
+ _ivVolume = (_unit getvariable ["cse_plasmaIVVolume", 0]) + IV_CHANGE_PER_SECOND;
+ _unit setvariable ["cse_plasmaIVVolume",_ivVolume];
+ };
+ if ((_unit getvariable ["cse_bloodIVVolume", 0]) > 0) then {
+ _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
+ _ivVolume = (_unit getvariable ["cse_bloodIVVolume", 0]) + IV_CHANGE_PER_SECOND;
+ _unit setvariable ["cse_bloodIVVolume",_ivVolume];
+ };
+};
+
+_bloodVolumeChange
diff --git a/TO_MERGE/cse/sys_medical/functions/vitals/fn_getCardiacOutput_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getCardiacOutput_CMS.sqf
new file mode 100644
index 0000000000..31abf63b5a
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getCardiacOutput_CMS.sqf
@@ -0,0 +1,24 @@
+/**
+ * fn_getCardiacOutput_CMS.sqf
+ * @Descr: Get the cardiac output from the Heart, based on current Heart Rate and Blood Volume.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: NUMBER Current cardiac output.
+ * @PublicAPI: true
+ */
+
+
+/*
+ Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the time interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre).
+
+ Source: http://en.wikipedia.org/wiki/Cardiac_output
+*/
+
+// to limit the amount of complex calculations necessary, we take a set modifier to calculate Stroke Volume.
+#define MODIFIER_CARDIAC_OUTPUT 19.04761
+
+private "_unit";
+_unit = _this select 0;
+
+((_unit getvariable ["cse_bloodVolume", 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getvariable ["cse_heartRate", 80])/80-1);
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/vitals/fn_getHeartRateChange_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getHeartRateChange_CMS.sqf
new file mode 100644
index 0000000000..042a8de778
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/vitals/fn_getHeartRateChange_CMS.sqf
@@ -0,0 +1,81 @@
+/**
+ * fn_getHeartRateChange_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+
+#define HEART_RATE_MODIFIER 0.02
+
+private ["_unit", "_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjustment", "_adjustments", "_additionalIncrease", "_change", "_callBack", "_bloodVolume"];
+_unit = _this select 0;
+_hrIncrease = 0;
+if (!(_unit getvariable ["cse_cardiacArrest_CMS",false])) then {
+ _heartRate = _unit getvariable ["cse_heartRate", 80];
+ _bloodLoss = _unit call cse_fnc_getBloodLoss_CMS;
+
+ _adjustment = _unit getvariable ["cse_heartRateAdjustments", []];
+ {
+ _values = (_x select 0);
+ if (abs _values > 0) then {
+ _time = (_x select 1);
+ _callBack = _x select 2;
+ if (_time <= 0) then {
+ _time = 1;
+ };
+ _change = (_values / _time);
+ _hrIncrease = _hrIncrease + _change;
+
+ if ( (_time - 1) < 0) then {
+ _time = 0;
+ _adjustment set [_foreachIndex, ObjNull];
+ [_unit] call _callBack;
+ } else {
+ _time = _time - 1;
+ _adjustment set [_foreachIndex, [_values - _change, _time]];
+ };
+ } else {
+ _adjustment set [_foreachIndex, ObjNull];
+ };
+
+ }foreach _adjustment;
+ _adjustment = _adjustment - [ObjNull];
+ _unit setvariable ["cse_heartRateAdjustments", _adjustment];
+
+ _bloodVolume = _unit getvariable ["cse_bloodVolume", 100];
+ if (_bloodVolume > 75) then {
+ if (_bloodLoss >0.0) then {
+ if (_bloodLoss <0.5) then {
+ if (_heartRate < 126) then {
+ _hrIncrease = _hrIncrease + 0.05;
+ };
+ } else {
+ if (_bloodLoss < 1) then {
+ if (_heartRate < 161) then {
+ _hrIncrease = _hrIncrease + 0.1;
+ };
+ } else {
+ if (_heartRate < 220) then {
+ _hrIncrease = _hrIncrease + 0.15;
+ };
+ };
+ };
+ } else {
+ // Stabalize it
+ if (_heartRate < (60 + round(random(10)))) then {
+ _hrIncrease = _hrIncrease + HEART_RATE_MODIFIER;
+ } else {
+ if (_heartRate > (77 + round(random(10)))) then {
+ _hrIncrease = _hrIncrease - HEART_RATE_MODIFIER;
+ };
+ };
+ };
+ } else {
+ _hrIncrease = _hrIncrease - HEART_RATE_MODIFIER;
+ };
+};
+_hrIncrease
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/functions/vitals/fn_updateVitals_CMS.sqf b/TO_MERGE/cse/sys_medical/functions/vitals/fn_updateVitals_CMS.sqf
new file mode 100644
index 0000000000..20762f44bc
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/functions/vitals/fn_updateVitals_CMS.sqf
@@ -0,0 +1,74 @@
+/**
+ * fn_updateVitals_CMS.sqf
+ * @Descr: Updates the vitals. Is expected to be called every second.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+private ["_unit", "_heartRate","_bloodPressure","_bloodVolume","_painStatus"];
+_unit = _this select 0;
+
+_heartRate = [_unit, "cse_heartRate"] call cse_fnc_getVariable;
+_bloodVolume = ([_unit, "cse_bloodVolume"] call cse_fnc_getVariable) + ([_unit] call cse_fnc_getBloodVolumeChange_CMS);
+_heartRate = _heartRate + ([_unit] call cse_fnc_getHeartRateChange_CMS);
+_bloodPressure = [_unit] call cse_fnc_getBloodPressure_CMS;
+_painStatus = [_unit,"cse_pain",0] call cse_fnc_getVariable;
+
+if (_bloodVolume <= 0) then {
+ _bloodVolume = 0;
+};
+
+_unit setvariable ["cse_bloodVolume", _bloodVolume];
+_unit setvariable ["cse_bloodPressure", _bloodPressure];
+_unit setvariable ["cse_heartRate", _heartRate];
+
+if (_bloodVolume < 90) then {
+ if !(_unit getvariable ["cse_hasLostBlood_CMS",false]) then {
+ _unit setvariable ["cse_hasLostBlood_CMS", true, true];
+ };
+} else {
+ if (_unit getvariable ["cse_hasLostBlood_CMS",false]) then {
+ _unit setvariable ["cse_hasLostBlood_CMS", false, true];
+ };
+};
+
+if ((_unit call cse_fnc_getBloodLoss_CMS) > 0) then {
+ if !(_unit getvariable ["cse_isBleeding_CMS",false]) then {
+ _unit setvariable ["cse_isBleeding_CMS", true, true];
+ };
+} else {
+ if (_unit getvariable ["cse_isBleeding_CMS",false]) then {
+ _unit setvariable ["cse_isBleeding_CMS", false, true];
+ };
+};
+
+if (_painStatus > 0) then {
+ if !(_unit getvariable ["cse_hasPain_CMS",false]) then {
+ _unit setvariable ["cse_hasPain_CMS", true, true];
+ };
+} else {
+ if (_unit getvariable ["cse_hasPain_CMS",false]) then {
+ _unit setvariable ["cse_hasPain_CMS", false, true];
+ };
+};
+
+
+if (CSE_ALLOW_AIRWAY_INJURIES_CMS) then {
+ _airwayStatus = _unit getvariable ["cse_airwayStatus", 100];
+ if (((_unit getvariable ["cse_airwayOccluded", false]) || (_unit getvariable ["cse_airwayCollapsed", false])) && !((_unit getvariable ["cse_airwaySecured", false]))) then {
+ if (_airwayStatus >= 0.5) then {
+ _unit setvariable ["cse_airwayStatus", _airwayStatus - 0.5];
+ };
+ } else {
+ if !((_unit getvariable ["cse_airwayOccluded", false]) || (_unit getvariable ["cse_airwayCollapsed", false])) then {
+ if (_airwayStatus <= 98.5) then {
+ _unit setvariable ["cse_airwayStatus", _airwayStatus + 1.5];
+ };
+ };
+ };
+};
+
+[_unit,_bloodVolume,_bloodPressure,_heartRate] call cse_fnc_bloodConditions_CMS;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/init_UI_options.sqf b/TO_MERGE/cse/sys_medical/init_UI_options.sqf
new file mode 100644
index 0000000000..6edeedfe97
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/init_UI_options.sqf
@@ -0,0 +1,150 @@
+ cse_get_basic_bandage_menus_CMS = {
+ _subMenus = [];
+ if (([player,'cse_bandage_basic'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["Bandage (Basic)",{([player,'cse_bandage_basic'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"cse_bandage_basic"] spawn cse_fnc_basicBandage_CMS;
+ }]
+ ];
+ };
+ if (([player,'cse_quikclot'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["QuikClot",{([player,'cse_quikclot'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"cse_quikclot"] spawn cse_fnc_basicBandage_CMS;
+ }]
+ ];
+ };
+ if (([player,'cse_bandageElastic'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["Bandage (Elastic)",{([player,'cse_bandageElastic'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"cse_bandageElastic"] spawn cse_fnc_basicBandage_CMS;
+ }]
+ ];
+ };
+ if (([player,'cse_packing_bandage'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["Packing Bandage",{([player,'cse_packing_bandage'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"cse_packing_bandage"] spawn cse_fnc_basicBandage_CMS;
+ }]
+ ];
+ };
+ if (([player,'cse_tourniquet'] call cse_fnc_hasMagazine)) then {
+
+ };
+
+ _subMenus
+ };
+ cse_display_basic_bandage_menus_CMS = {
+ ["Bandage",_this select 2,call cse_get_basic_bandage_menus_CMS] call cse_fnc_gui_displaySubMenuButtons;
+ };
+ cse_display_basic_medication_menus_CMS = {
+ _subMenus = [];
+ if (([player,'cse_morphine'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["Morphine",{([player,'cse_morphine'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"","cse_morphine"] spawn cse_fnc_medication_CMS;
+ }]
+ ];
+ };
+ if (([player,'cse_atropine'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["Atropine",{([player,'cse_atropine'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"","cse_atropine"] spawn cse_fnc_medication_CMS;
+ }]
+ ];
+ };
+ if (([player,'cse_epinephrine'] call cse_fnc_hasMagazine)) then {
+ _subMenus set [ count _subMenus,
+ ["Epinephrine",{([player,'cse_epinephrine'] call cse_fnc_hasMagazine)},
+ {
+ [(_this select 1),player,"","cse_epinephrine"] spawn cse_fnc_medication_CMS;
+ }]
+ ];
+ };
+ ["Medication",_this select 2,_subMenus] call cse_fnc_gui_displaySubMenuButtons;
+ };
+
+
+
+
+ /*["InteractionMenu","Treatment > ",{((cursortarget iskindof "Man") && !(surfaceIsWater position player))},{
+ _subMenus = [];
+ if ((_this select 1) call cse_fnc_getBloodLoss_CMS > 0) then {
+ hintSilent format["%1 is bleeding", [_this select 1] call cse_fnc_getName];
+ };
+ _subMenus set [ count _subMenus,
+ ["Bandage >",{(isNull([player] call cse_fnc_getCarriedObj) && (count (call cse_get_basic_bandage_menus_CMS)) > 0)},
+ {
+ _this call cse_display_basic_bandage_menus_CMS;
+ }]
+ ];
+ _subMenus set [ count _subMenus,
+ ["Medication >",{(isNull([player] call cse_fnc_getCarriedObj))},
+ {
+ _this call cse_display_basic_medication_menus_CMS;
+ }]
+ ];
+ ["Treatment",_this select 2,_subMenus] call cse_fnc_gui_displaySubMenuButtons;
+ },1] call cse_fnc_gui_addMenuEntry;
+
+
+ ["SelfInteraction","Treatment > ",{!(surfaceIsWater position player)},{
+ _subMenus = [];
+
+ if ((_this select 1) call cse_fnc_getBloodLoss_CMS > 0) then {
+ hintSilent format["%1 is bleeding", [_this select 1] call cse_fnc_getName];
+ };
+
+ _subMenus set [ count _subMenus,
+ ["Bandage >",{(isNull([player] call cse_fnc_getCarriedObj) && (count (call cse_get_basic_bandage_menus_CMS)) > 0)},
+ {
+ _this call cse_display_basic_bandage_menus_CMS;
+ }]
+ ];
+ _subMenus set [ count _subMenus,
+ ["Medication >",{(isNull([player] call cse_fnc_getCarriedObj))},
+ {
+ _this call cse_display_basic_medication_menus_CMS;
+ }]
+ ];
+ ["Treatment",_this select 2,_subMenus] call cse_fnc_gui_displaySubMenuButtons;
+ },1] call cse_fnc_gui_addMenuEntry;
+
+ */
+
+ ["InteractionMenu","Unload Casualties",{((_this call cse_fnc_interactWithVehicle_Crew_Condition) && (count ((_this select 1) getvariable ["cse_loaded_casualties_CMS",[]]) > 0))},
+{
+ closeDialog 0;
+ _loaded = ((_this select 1) getvariable ["cse_loaded_casualties_CMS",[]]);
+ {
+ [player,_x,false] call cse_fnc_unload_CMS;
+ }foreach _loaded
+},1] call cse_fnc_gui_addMenuEntry;
+
+
+/*
+["InteractionMenu","Drag",{(isNull ([player] call cse_fnc_getCarriedObj))},
+{
+ closeDialog 0;
+ [_this select 1,_this select 0] call CSE_fnc_drag_CMS;
+},1] call cse_fnc_gui_addMenuEntry;
+
+
+["InteractionMenu","Carry",{(isNull ([player] call cse_fnc_getCarriedObj))},
+{
+ closeDialog 0;
+ [_this select 1,_this select 0] call cse_fnc_carry_CMS;
+},1] call cse_fnc_gui_addMenuEntry;
+
+
+["InteractionMenu","Drop",{!(isNull ([player] call cse_fnc_getCarriedObj))},
+{
+ closeDialog 0;
+ [_this select 1,_this select 0] call cse_fnc_drop_CMS;
+},1] call cse_fnc_gui_addMenuEntry;*/
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/init_basic_medical_system.sqf b/TO_MERGE/cse/sys_medical/init_basic_medical_system.sqf
new file mode 100644
index 0000000000..8b4ee432d2
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/init_basic_medical_system.sqf
@@ -0,0 +1,7 @@
+
+ waituntil {!isnil "cse_fnc_registerUnconsciousCondition"};
+
+ [
+ {(([_this select 0,"cse_bloodVolume"] call cse_fnc_getVariable) < 60)},
+ {(([_this select 0,"cse_pain"] call cse_fnc_getVariable) > 48)}
+ ] call cse_fnc_registerUnconsciousCondition;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/init_sys_medical.sqf b/TO_MERGE/cse/sys_medical/init_sys_medical.sqf
new file mode 100644
index 0000000000..703ba363af
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/init_sys_medical.sqf
@@ -0,0 +1,199 @@
+/*
+init.sqf
+Usage:
+Author: Glowbal
+
+Arguments:
+Returns:
+
+Affects: Local
+Executes: call
+*/
+
+private ["_args"];
+_args = _this;
+
+CSE_ADVANCED_LEVEL_CMS = 2;
+CSE_ALLOW_INSTANT_DEAD_CMS = true;
+CSE_ADVANCED_WOUNDS_SETTING_CMS = true;
+CSE_ADVANCED_MEDICAL_ROLES_CMS = false;
+CSE_BANDAGING_AID_CMS = false;
+CSE_ALLOW_AI_FULL_HEAL_CMS = false;
+CSE_ALLOW_AIRWAY_INJURIES_CMS = false;
+CSE_AID_KIT_REMOVED_UPON_USAGE_CMS = false;
+CSE_ENABLE_SETTING_FORUNITS_CMS = 1;
+CSE_AID_KIT_RESTRICTIONS_CMS = 0;
+CSE_AIDKITMEDICSONLY_CMS = false;
+CSE_ALLOW_VEH_CRASH_INJURIES_CMS = true;
+CSE_STITCHING_ALLOW_CMS = 0;
+
+// damage thresholds only in case the damge threshold module hasn't been placed down.
+if (isnil "CSE_DAMAGE_THRESHOLD_AI_DMG") then {
+ CSE_DAMAGE_THRESHOLD_AI_DMG = 1;
+};
+
+if (isnil "CSE_DAMAGE_THRESHOLD_PLAYERS_DMG") then {
+ CSE_DAMAGE_THRESHOLD_PLAYERS_DMG = 1;
+};
+
+
+// TODO implement this into a switch structure.
+{
+ _value = _x select 1;
+ if (!isnil "_value") then {
+ if (_x select 0 == "advancedLevel") exitwith {
+ CSE_ADVANCED_LEVEL_CMS = _x select 1;
+ };
+ if (_x select 0 == "openingOfWounds") exitwith {
+ CSE_ADVANCED_WOUNDS_SETTING_CMS = _x select 1;
+ };
+ if (_x select 0 == "medicSetting") exitwith {
+ CSE_ADVANCED_MEDICAL_ROLES_CMS = _x select 1;
+ };
+ if (_x select 0 == "difficultySetting") exitwith {
+ CSE_MEDICAL_DIFFICULTY = _x select 1;
+ };
+ if (_x select 0 == "bandagingAid") exitwith {
+ CSE_BANDAGING_AID_CMS = _x select 1;
+ };
+ if (_x select 0 == "allowAIFullHeal") exitwith {
+ CSE_ALLOW_AI_FULL_HEAL_CMS = _x select 1;
+ };
+ if (_x select 0 == "enableFor") exitwith {
+ CSE_ENABLE_SETTING_FORUNITS_CMS = _x select 1;
+ };
+ if (_x select 0 == "enableAirway") exitwith {
+ CSE_ALLOW_AIRWAY_INJURIES_CMS = (_x select 1) == 1;
+ };
+ if (_x select 0 == "aidKitRestrictions") exitwith {
+ CSE_AID_KIT_RESTRICTIONS_CMS = _x select 1;
+ };
+ if (_x select 0 == "aidKitUponUsage") exitwith {
+ CSE_AID_KIT_REMOVED_UPON_USAGE_CMS = _x select 1;
+ };
+ if (_x select 0 == "aidKitMedicsOnly") exitwith {
+ CSE_AIDKITMEDICSONLY_CMS = _x select 1;
+ };
+ if (_x select 0 == "bandageTime") exitwith {
+ CSE_BANDAGE_WAITING_TIME_CMS = _x select 1;
+ };
+ if (_x select 0 == "vehCrashes") exitwith {
+ CSE_ALLOW_VEH_CRASH_INJURIES_CMS = _value;
+ };
+ if (_x select 0 == "stitchingMedicsOnly") exitwith {
+ CSE_STITCHING_ALLOW_CMS = _value;
+ };
+ };
+}foreach _args;
+
+if (CSE_ADVANCED_LEVEL_CMS == -1) exitwith{};
+call compile preprocessFile "cse\cse_sys_medical\functions.sqf";
+CSE_SYS_MEDICAL_SYSTEM_ENABLED_TAGS = true;
+waituntil {!isnil "cse_main"};
+#include "variable_defines.sqf"
+
+
+[
+ {(([_this select 0,"cse_heartRate"] call cse_fnc_getVariable) < 20)},
+ {(([_this select 0,"cse_bloodVolume"] call cse_fnc_getVariable) < 65)},
+ {(([_this select 0,"cse_pain"] call cse_fnc_getVariable) > 48)}
+] call cse_fnc_registerUnconsciousCondition;
+
+if (CSE_ALLOW_AIRWAY_INJURIES_CMS) then {
+ [
+ {(([_this select 0,"cse_airway"] call cse_fnc_getVariable) > 2)}
+ ] call cse_fnc_registerUnconsciousCondition;
+};
+
+/*
+[
+ {([_this select 0,"cse_cardiacArrest_CMS"] call cse_fnc_getVariable)}
+] call cse_fnc_registerUnconsciousCondition;
+*/
+
+cse_sys_medical = true;
+
+waituntil{!isnil "cse_gui"};
+#include "init_UI_options.sqf";
+#include "init_UI_actions.sqf";
+
+if (isnil "CSE_MEDICAL_COMBINED_LOOP_CMS") then {
+ CSE_MEDICAL_COMBINED_LOOP_CMS = [];
+};
+
+waituntil{!isnil "cse_gui" && !isnil "cse_main"};
+cse_sys_medical_task_pool_CMS_lastTime = time;
+_cms_taskLoop = '
+ if ((time - cse_sys_medical_task_pool_CMS_lastTime) >= 1 || true) then {
+ cse_sys_medical_task_pool_CMS_lastTime = time;
+ {
+ if (!alive _x || !local _x) then {
+ CSE_MEDICAL_COMBINED_LOOP_CMS set [ _forEachIndex, ObjNull];
+ } else {
+ [_x] call cse_fnc_updateVitals_CMS;
+ _pain = _X getvariable ["cse_pain", 0];
+ if (_pain > 5 && (random(1) > 0.5)) then {
+ _x setvariable ["cse_pain", _pain + 0.002];
+ };
+ if (_pain > 45) then {
+ if (random(1) > 0.6) then {
+ [_X] call cse_fnc_setUnconsciousState;
+ };
+ [_X] spawn cse_fnc_playInjuredSound_CMS;
+ };
+ };
+ }foreach CSE_MEDICAL_COMBINED_LOOP_CMS;
+ CSE_MEDICAL_COMBINED_LOOP_CMS = CSE_MEDICAL_COMBINED_LOOP_CMS - [ObjNull];
+ };
+ false; ';
+
+cse_sys_medical_cms_taskLoop_trigger = createTrigger["EmptyDetector", [0,0,0]];
+cse_sys_medical_cms_taskLoop_trigger setTriggerActivation ["NONE", "PRESENT", true];
+cse_sys_medical_cms_taskLoop_trigger setTriggerStatements[_cms_taskLoop, "", ""];
+
+if (!hasInterface) exitwith{};
+[player] spawn {
+ disableSerialization;
+ _CMSFadingBlackUI = uiNamespace getVariable "CMSFadingBlackUI";
+ if (!isnil "_CMSFadingBlackUI") then {
+ _ctrlFadingBlackUI = _CMSFadingBlackUI displayCtrl 11112;
+ 2 fadeSound 1;
+ _ctrlFadingBlackUI ctrlSetTextColor [0.0,0.0,0.0,0.0];
+ };
+ {
+ if(_x == "FirstAidKit" || {_x == "Medikit"}) then {
+ player removeItem _x;
+ };
+ }foreach (items player);
+ [_this select 0] spawn cse_fnc_effectsLoop_CMS;
+
+
+ // This is here for backwards compatability. This code will be removed in the near future.
+ _showError = false;
+ {
+ _configEntry = (configFile >> "CfgMagazines" >> _x);
+ if([_configEntry, "cse_backwardsCompatMagazineBase_CMS"] call cse_fnc_inheritsFrom) then {
+ player removeMagazine _x;
+ player addItem _x;
+ diag_log format["WARNING: Outdated CMS magazine classname %1 found. Please replace magazine by item variant. Future versions will not support this anymore.", _x];
+ _showError = true;
+ };
+ }foreach (magazines player);
+ if (_showError) then {
+ ["Outdated CMS Classnames have been found. Please replace magazine classname by item variant. Future versions will not support magazine variant"] call BIS_fnc_error;
+ };
+};
+CSE_DISPLAY_ADDITIONAL_HINTS_CMS = false;
+
+
+["cse_sys_medical_allowSharedEquipment", ["Disable", "Anyone", "Side Only", "Group Only"], (["cse_sys_medical_allowSharedEquipment", 0] call cse_fnc_getClientSideOptionFromProfile_F), {
+ [_this] call cse_fnc_debug;
+ switch (_this select 1) do {
+ case (1): {player setvariable ["cse_allowSharedEquipmentAccess_CMS", 0, true]};
+ case (2): {player setvariable ["cse_allowSharedEquipmentAccess_CMS", 1, true]};
+ case (3): {player setvariable ["cse_allowSharedEquipmentAccess_CMS", 2, true]};
+ default {player setvariable ["cse_allowSharedEquipmentAccess_CMS", -1, true]};
+ };
+}] call cse_fnc_addClientSideOptions_f;
+
+["cse_sys_medical_allowSharedEquipment","option","Shared Medical Equipment","Set your access level for sharing medical equipment with other players."] call cse_fnc_settingsDefineDetails_F;
diff --git a/TO_MERGE/cse/sys_medical/init_ui_actions.sqf b/TO_MERGE/cse/sys_medical/init_ui_actions.sqf
new file mode 100644
index 0000000000..4d14d356ac
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/init_ui_actions.sqf
@@ -0,0 +1,53 @@
+
+
+CSE_ICON_PATH = "cse\cse_gui\radialmenu\data\icons\";
+
+_entries = [
+ ["Medical (SELF)", {!([player] call cse_fnc_inWater_f)}, CSE_ICON_PATH + "icon_open_dialog.paa", {closeDialog 0; [player] call cse_fnc_openMenu_CMS; }, "Open Medical Menu (SELF)"],
+ ["Medical", {((_this select 1) != (_this select 0)) && {(((_this select 0) distance (_this select 1) < 10) && {(_this select 1) isKindOf "CaManBase"} && {!([player] call cse_fnc_inWater_f)})}}, CSE_ICON_PATH + "icon_open_dialog.paa", {closeDialog 0; [_this select 1] call cse_fnc_openMenu_CMS; }, "Open Medical Menu"]
+];
+["ActionMenu","medical_menu", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
+
+
+_entries = [
+ ["Unload (Cas)", {((_this call cse_fnc_interactWithVehicle_Crew_Condition) && (count ((_this select 1) getvariable ["cse_loaded_casualties_CMS",[]]) > 0))}, CSE_ICON_PATH + "icon_open_dialog.paa",
+ {
+ closeDialog 0;
+ _loaded = ((_this select 1) getvariable ["cse_loaded_casualties_CMS",[]]);
+ {
+ [player,_x,false] call cse_fnc_unload_CMS;
+ }foreach _loaded
+ }, "Unload Casualties"]
+];
+["ActionMenu","interaction", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
+
+
+_conditionDrag = {
+ private ["_caller", "_unit", "_return"];
+ _caller = _this select 0;
+ _unit = _this select 1;
+ _return = false;
+ if (([_caller] call cse_fnc_canInteract) && {_caller != _unit} && {!([_unit] call cse_fnc_isAwake)}) then {
+ if !([player] call cse_fnc_inWater_f) then {
+ if (!isNull _unit) then {
+ if (_unit != player && (_unit isKindOf "CaManBase")) then {
+ if (vehicle _unit == _unit) then {
+ if (vehicle _caller == _caller) then {
+ if (isNull ([player] call cse_fnc_getCarriedObj)) then {
+ _return = true;
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ _return
+};
+
+_entries = [
+ ["Drag", _conditionDrag, CSE_ICON_PATH + "icon_hand.paa", {closeDialog 0; CSE_SYS_MEDICAL_INTERACTION_TARGET = _this select 1;[_this select 0, _this select 1] spawn CSE_fnc_drag_CMS; }, "Drag"],
+ ["Carry", _conditionDrag, CSE_ICON_PATH + "icon_hand.paa", {closeDialog 0; CSE_SYS_MEDICAL_INTERACTION_TARGET = _this select 1; [_this select 0, _this select 1] spawn cse_fnc_carry_CMS; }, "Carry"],
+ ["Drop", {(([player] call cse_fnc_getCarriedObj) == (_this select 1))}, CSE_ICON_PATH + "icon_hand.paa", {closeDialog 0; CSE_SYS_MEDICAL_INTERACTION_TARGET = _this select 1; [_this select 0, _this select 1] spawn cse_fnc_drop_CMS; }, "Drop"]
+];
+["ActionMenu","medical_menu", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/injuryTypes.h b/TO_MERGE/cse/sys_medical/injuryTypes.h
new file mode 100644
index 0000000000..3ab27e2c74
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/injuryTypes.h
@@ -0,0 +1,46 @@
+#define NO_INJURY -1
+
+
+/* FLESH WOUNDS/BLEEDING INJURIES */
+#define SCRATCH 0
+#define MINOR_OPEN_WOUND 1
+#define MEDIUM_OPEN_WOUND 2
+#define LARGE_OPEN_WOUND 3
+#define MINOR_GSW 4
+#define MEDIUM_GSW 5
+#define LARGE_GSW 6
+#define STOMACH_WOUND 7
+#define SCHRAPNEL_WOUND 8
+#define GRAZE_WOUND 9
+#define MINOR_CUT 10
+#define MEDIUM_CUT 11
+#define LARGE_CUT 12
+#define MISSING_FLESH 13
+#define EXPLOSION_WOUND 14
+
+/* BURN INJURIES */
+#define MINOR_BURN 40
+#define MEDIUM_BURN 41
+#define HIGH_BURN 42
+
+/* INTERNAL BLEEDING */
+#define MINOR_INTERNAL_BLEEDING 50
+#define MEDIUM_INTERNAL_BLEEDING 51
+#define HEAVY_INTERNAL_BLEEDING 52
+
+/* BROKEN BONES */
+#define BROKEN_BONE_FEMUR 80
+#define BROKEN_BONE_TIBIA 81
+#define BROKEN_BONE_HUMERUS 82
+#define BROKEN_BONE_RADIAL 83
+#define BROKEN_BONE_SKULL 84
+#define BROKEN_RIB 85
+#define SHATTERED_NECK_BONE 86
+#define BROKEN_C_SPINE 87
+
+/* AIRWAY INJURIES */
+#define TENSION_PNEUMOTHORA 200
+#define SIMPLE_PNEUMOTHORA 201
+#define HEMOTHORAX 202
+#define AIRWAY_OBSTRUCTION_PARTIAL 205
+#define AIRWAY_OBSTRUCTION_FULL 204
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_1.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_1.wav
new file mode 100644
index 0000000000..4ac1fe6c7d
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_1.wav differ
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_2.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_2.wav
new file mode 100644
index 0000000000..38bae9cb2a
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_2.wav differ
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_3.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_3.wav
new file mode 100644
index 0000000000..f600d30567
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/fast_3.wav differ
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/norm_1.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/norm_1.wav
new file mode 100644
index 0000000000..73ebe128d6
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/norm_1.wav differ
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/norm_2.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/norm_2.wav
new file mode 100644
index 0000000000..c46da91489
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/norm_2.wav differ
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/slow_1.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/slow_1.wav
new file mode 100644
index 0000000000..3cf199ba51
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/slow_1.wav differ
diff --git a/TO_MERGE/cse/sys_medical/sounds/heart_beats/slow_2.wav b/TO_MERGE/cse/sys_medical/sounds/heart_beats/slow_2.wav
new file mode 100644
index 0000000000..ba50746326
Binary files /dev/null and b/TO_MERGE/cse/sys_medical/sounds/heart_beats/slow_2.wav differ
diff --git a/TO_MERGE/cse/sys_medical/stringtable.xml b/TO_MERGE/cse/sys_medical/stringtable.xml
new file mode 100644
index 0000000000..ce6928d06f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/stringtable.xml
@@ -0,0 +1,1422 @@
+
+
+
+
+
+
+
+
+
+ Nasopharyngeal Tube
+ Назотрахеальная трубка
+ Cánula Nasofaríngea
+ Canule Nasopharyngée
+ Rurka nosowo-gardłowa
+
+
+ Used to keep the airway patent
+ Для обеспечения проходимости дыхательных путей
+ Mantiene libre las vías aéreas
+ Maintien les voix respiratoires libres
+ Używana w celu udrożnienia dróg oddechowych
+
+
+ Remove Nasopharyngeal
+ Извлечь назотрахеальную трубку
+ Retirar Cánula Nasofaríngea
+ Retirer la Canule Nasopharyngée
+ Wyjmij rurkę nosowo-gardłową
+
+
+ Remove the Nasopharyngeal Tube
+ Извлечь назотрахеальную трубку
+ Retirar Cánula Nasofaríngea
+ Retirer la Canule Nasopharyngée
+ Wyjmuje rurkę nosowo-gardłową
+
+
+
+
+ Give Blood IV (1000ml)
+ Перелить кровь (1000 мл)
+ Give Blood IV (1000ml)
+ Intravenöse Blutspende (1000ml)
+ Sangre Intravenosa (1000ml)
+ Cullot Sanguin IV (1000ml)
+ Podaj krew IV (1000ml)
+
+
+ Give Blood IV (500ml)
+ Перелить кровь (500 мл)
+ Give Blood IV (500ml)
+ Intravenöse Blutspende (500ml)
+ Sangre Intravenosa (500ml)
+ Cullot Sanguin IV (500ml)
+ Podaj krew IV (500ml)
+
+
+ Give Blood IV (250ml)
+ Перелить кровь (250 мл)
+ Give Blood IV (250ml)
+ Intravenöse Blutspende (250ml)
+ Sangre Intravenosa (250ml)
+ Cullot Sanguin IV (250ml)
+ Podaj krew IV (250ml)
+
+
+ Give Plasma IV (1000ml)
+ Влить плазму (1000 мл)
+ Give Plasma IV (1000ml)
+ Intravenöse Plasmaspende (1000ml)
+ Plasma Intravenoso (1000ml)
+ Plasma Sanguin IV (1000ml)
+ Podaj osocze IV (1000ml)
+
+
+ Give Plasma IV (500ml)
+ Влить плазму (500 мл)
+ Give Plasma IV (500ml)
+ Intravenöse Plasmaspende (500ml)
+ Plasma Intravenoso (500ml)
+ Plasma Sanguin IV (500ml)
+ Podaj osocze IV (500ml)
+
+
+ Give Plasma IV (250ml)
+ Влить плазму (250 мл)
+ Give Plasma IV (250ml)
+ Intravenöse Plasmaspende (250ml)
+ Plasma Intravenoso (250ml)
+ Plasma Sanguin IV (250ml)
+ Podaj osocze IV (250ml)
+
+
+ Give Saline IV (1000ml)
+ Влить физраствор (1000 мл)
+ Give Saline IV (1000ml)
+ Intravenöse Kochsalzlösung (1000ml)
+ Solución Salina Intravenosa (1000ml)
+ Solution Saline 0.9% IV (1000ml)
+ Podaj solankę 0,9% IV (1000ml)
+
+
+ Give Saline IV (500ml)
+ Влить физраствор (500 мл)
+ Give Saline IV (500ml)
+ Intravenöse Kochsalzlösung (500ml)
+ Solución Salina Intravenosa (500ml)
+ Solution Saline 0.9% IV (500ml)
+ Podaj solankę 0,9% IV (500ml)
+
+
+ Give Saline IV (250ml)
+ Влить физраствор (250 мл)
+ Give Saline IV (250ml)
+ Intravenöse Kochsalzlösung (250ml)
+ Solución Salina Intravenosa (250ml)
+ Solution Saline 0.9% IV (250ml)
+ Podaj solankę 0,9% IV (250ml)
+
+
+ Full Heal (Personal Aid Kit)
+ Полное лечение (аптечка)
+ Full Heal (Personal Aid Kit)
+ Ambulante Versorgung (Erste-Hilfe-Tasche)
+ Tratamiento Avanzado (Kit de Soporte Vital Avanzado)
+ Soin Complet (Équipement de support vitale
+ Pełne leczenie (Apteczka)
+
+
+ Perform CPR
+ Провести СЛР
+ Perform CPR
+ Herz-Lungen-Wiederbelebung
+ Realizar CPR
+ Effectuer RCR
+ Wykonaj RKO
+
+
+ Stop CPR
+ Прекратить СЛР
+ Stop CPR
+ Przerwij RKO
+ Abortar CPR
+
+
+ Give the patient a Blood IV of 1000ml. Read the label for further information.
+ Перелить пациенту 1000 мл крови. См. информацию на этикетке.
+ Give the patient a Blood IV of 1000ml. Read the label for further information.
+ Verabreicht dem Patienten 1000ml Spenderblut. Weitere Informationen auf der Verpackung.
+ Administrar Sangre de 1000ml. Lea la etiqueta para más información.
+ Administrer Cullot Sanguin de 1000ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 1000ml krwi dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Blood IV of 500ml. Read the label for further information.
+ Перелить пациенту 500 мл крови. См. информацию на этикетке.
+ Give the patient a Blood IV of 500ml. Read the label for further information.
+ Verabreicht dem Patienten 500ml Spenderblut. Weitere Informationen auf der Verpackung.
+ Administrar Sangre de 500ml. Lea la etiqueta para más información.
+ Administrer Cullot Sanguin de 500ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 500ml krwi dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Blood IV of 250ml. Read the label for further information.
+ Перелить раненому 500 мл крови. См. информацию на этикетке.
+ Give the patient a Blood IV of 250ml. Read the label for further information.
+ Verabreicht dem Patienten 250ml Spenderblut. Weitere Informationen auf der Verpackung.
+ Administrar Sangre de 250ml. Lea la etiqueta para más información.
+ Administrer Cullot Sanguin de 250ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 250ml krwi dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Plasma IV of 1000ml. Read the label for further information.
+ Влить раненому 1000 мл плазмы. См. информацию на этикетке.
+ Give the patient a Plasma IV of 1000ml. Read the label for further information.
+ Verabreicht dem Patienten 1000ml Blutplasma. Weitere Informationen auf der Verpackung.
+ Administrar Plasma de 1000ml. Lea la etiqueta para más información.
+ Administrer Plasma Sanguin de 1000ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 1000ml osocza dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Plasma IV of 500ml. Read the label for further information.
+ Влить раненому 500 мл плазмы. См. информацию на этикетке.
+ Give the patient a Plasma IV of 500ml. Read the label for further information.
+ Verabreicht dem Patienten 500ml Blutplasma. Weitere Informationen auf der Verpackung.
+ Administrar Plasma de 500ml. Lea la etiqueta para más información.
+ Administrer Plasma Sanguin de 500ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 500ml osocza dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Plasma IV of 250ml. Read the label for further information.
+ Влить раненому 250 мл плазмы. См. информацию на этикетке.
+ Give the patient a Plasma IV of 250ml. Read the label for further information.
+ Verabreicht dem Patienten 250ml Blutplasma. Weitere Informationen auf der Verpackung.
+ Administrar Plasma de 250ml. Lea la etiqueta para más información.
+ Administrer Plasma Sanguin de 250ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 250ml osocza dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Saline IV of 1000ml. Read the label for further information.
+ Влить раненому 1000 мл физраствора. См. информацию на этикетке.
+ Give the patient a Saline IV of 1000ml. Read the label for further information.
+ Verabreicht dem Patienten 1000ml Kochsalzlösung. Weitere Informationen auf der Verpackung.
+ Administrar Solución Salina de 1000ml. Lea la etiqueta para más información.
+ Administrer Solution Saline 0.9% de 1000ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 1000ml 0,9% roztworu soli fizjologicznej dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Saline IV of 500ml. Read the label for further information.
+ Влить раненому 500 мл физраствора. См. информацию на этикетке.
+ Give the patient a Saline IV of 500ml. Read the label for further information.
+ Verabreicht dem Patienten 500ml Kochsalzlösung. Weitere Informationen auf der Verpackung.
+ Administrar Solución Salina de 500ml. Lea la etiqueta para más información.
+ Administrer Solution Saline 0.9% de 500ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 500ml 0,9% roztworu soli fizjologicznej dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Give the patient a Saline IV of 250ml. Read the label for further information.
+ Влить раненому 250 мл физраствора. См. информацию на этикетке.
+ Give the patient a Saline IV of 250ml. Read the label for further information.
+ Verabreicht dem Patienten 250ml Kochsalzlösung. Weitere Informationen auf der Verpackung.
+ Administrar Solución Salina de 250ml. Lea la etiqueta para más información.
+ Administrer Solution Saline 0.9% de 250ml. Lire l'étiquette pour plus d'information.
+ Przetacza pacjentowi 250ml 0,9% roztworu soli fizjologicznej dożylnie (IV). Przeczytaj etykietę, aby dowiedzieć się więcej.
+
+
+ Fully heal a soldier.
+ Полностью вылечить раненого.
+ Fully heal a soldier.
+ Heilt einen Soldaten vollständig.
+ Curar completamente al herido.
+ Soigner Complêtement le Soldat.
+ Pozwala w pełni wyleczyć pacjenta.
+
+
+ Perform CPR. Success can stabilize heart rate and blood pressure.
+ Провести сердечно-легочную реанимацию. В случае успеха стабилизируются пульс и давление.
+ Perform CPR. Success can stabilize heart rate and blood pressure.
+ Herz-Lungen-Wiederbelebung, bei Erfolg können sich Puls und Blutdruck stabilisieren.
+ Realizar CPR. Puede estabilizar la frecuencia cardiaca y la presión arterial.
+ Effectuer RCR. Le succes de la maneuvre peut retablir un pouls et une tention artériel.
+ Wykonaj RKO. Sukces może ustabilizować puls oraz ciśnienie krwi.
+
+
+ Stop providing CPR.
+ Прекратить сердечно-легочную реанимацию.
+ Stop providing CPR.
+ Przerwij wykonywanie RKO.
+ Dejar de aplicar CPR
+
+
+ Stitch Wounds.
+ Зашить раны.
+ Suturar Heridas
+
+
+ Stitch bandaged wounds.
+ Зашить перевязанные раны.
+ Suturar Heridas Vendadas
+
+
+
+
+ Field Dressing (Basic)
+ Повязка (обычная)
+ Vendaje de Campaña (Básico)
+
+
+
+ Apply when wounds have been bandaged
+ Накладывается после остановки кровотечения
+ Aplicar cuando las heridas han sido vendadas
+
+
+ Field Dressing (QuikClot)
+ Первичный перевязочный пакет (QuikClot)
+ Vendaje de Campaña (QuikClot)
+
+
+ Apply to cloth the wound and stop bleeding
+ Применяется для остановки кровотечения
+ Aplicar para detener el sangrado
+
+
+ Field Dressing (Elastic)
+ Повязка (давящая)
+ Vendaje de Campaña (Elástico)
+
+
+ For extra pressure, apply when wounds have been bandaged
+ Обеспечивает прижатие раны после остановки кровотечения
+ Aplicar a las heridas vendadas para más presión
+
+
+ Packing Bandage
+ Тампонирующая повязка
+ Vendaje Compresivo
+
+
+ Apply on medium to large wounds
+ Применяется при ранениях среднего и большого размера
+ Aplicar en heridas medianas o grandes
+
+
+ Remove Tourniquet
+ Снять жгут
+ Quitar Torniquete
+
+
+ Remove applied Tourniquet
+ Снять ранее наложенный жгут
+ Quitar Torniquetes
+
+
+ Tourniquet
+ Жгут
+ Torniquete
+
+
+ Apply on limbs only. Limits blood loss on limb.
+ Накладывается только на конечности. Ограничивает кровопотерю из конечности.
+ Aplicar sólo en las extremidades. Limita la pérdida de sangre en las extremidades.
+
+
+
+
+ Drag
+ Тащить
+ Arrastrar
+
+
+ Drag %1
+ Тащить раненого %1
+ Arrastrar a %1r
+
+
+ Carry
+ Нести
+ Cargar
+
+
+ Carry %1
+ Нести раненого %1
+ Cargar a %1
+
+
+ Bodybag
+ Мешок для трупов
+ Bolsa para cadáveres
+
+
+ Put body in bodybag
+ Поместить труп в мешок
+ Meter cuerpo en la bolsa para cadáveres
+
+
+ Drop
+ Положить
+ Soltar
+
+
+ Drop %1
+ Положить %1
+ Soltar a %1
+
+
+ Load in Vehicle
+ Погрузить в транспорт
+ Meter en vehículo
+
+
+ Load %1
+ Погрузить раненого %1
+ Cargar a %1
+
+
+ Unload
+ Выгрузить
+ Descargar
+
+
+ Unload %1
+ Выгрузить раненого %1
+ Descargar a %1
+
+
+
+
+ Check Pulse
+ Проверить пульс
+ Comprobar Pulso
+
+
+ Find the Heart Rate
+ Нащупать пульс
+ Encontrar el ritmo cardiaco
+
+
+ Check Blood Pressure
+ Проверить давление
+ Comprobar Presión Arterial
+
+
+ Find out what Blood Pressure patient has
+ Узнать артериальное давление раненого
+ Comprobar Presión Arterial
+
+
+ Check Response
+ Проверить реакцию
+ Comprobar Respuesta
+
+
+
+ Check if patient is responsive
+ Проверить, реагирует ли раненый на раздражители
+ Comprobar si el paciente reacciona
+
+
+
+
+ Morphine
+ Морфин
+ Morfina
+
+
+ Good to counter pain
+ Эффективное обезболивающее средство
+ Alivia el dolor
+
+
+ Atropine
+ Атропин
+ Atropina
+
+
+ Relaxes mussles
+ Расслабляет мышцы
+ Antiarrítmico
+
+
+ Epinephrine
+ Адреналин
+ Epinefrina
+
+
+ Adrenaline to get the heart going
+ Для возобновления сердечной деятельности
+ Incrementa la frecuencia cardiaca
+
+
+
+
+ EXAMINE & TREATMENT
+ ОСМОТР И ЛЕЧЕНИЕ
+ EXAMINE & TREATMENT
+ EXAMINAR & TRATAMIENTO
+ EXAMINER & TRAITEMENTS
+ BADANIE & LECZENIE
+
+
+ STATUS
+ СОСТОЯНИЕ
+ STATUS
+ ESTADO
+ ÉTATS
+ STATUS
+
+
+ OVERVIEW
+ ОБЩАЯ ИНФОРМАЦИЯ
+ OVERVIEW
+ DESCRIPCIÓN
+ DESCRIPTION
+ OPIS
+
+
+ ACTIVITY LOG
+ ПРОВЕДЕННЫЕ МАНИПУЛЯЦИИ
+ ACTIVITY LOG
+ REGISTRO DE ACTIVIDAD
+ REGISTRE DES SOINS
+ LOGI AKTYWNOŚCI
+
+
+ QUICK VIEW
+ БЫСТРЫЙ ОСМОТР
+ QUICK VIEW
+ VISTA RÁPIDA
+ VUE RAPIDE
+ SZYBKI PODGLĄD
+
+
+ None
+ Не ранен
+ Ninguno
+ Aucun
+ Brak
+
+
+ Minor
+ Несрочная помощь
+ Menor
+ Mineur
+ Normalny
+
+
+ Delayed
+ Срочная помощь
+ Diferido
+ Urgent
+ Opóźniony
+
+
+ Immediate
+ Неотложная помощь
+ Inmediato
+ Immédiat
+ Natychmiastowy
+
+
+ Deceased
+ Морг
+ Fallecido
+ Décédé
+ Nie żyje
+
+
+ View triage Card
+ Смотреть первичную карточку
+ Ver Triage
+ Voir Carte de Triage
+ Pokaż kartę segregacyjną
+
+
+ Examine Patient
+ Осмотреть пациента
+ Examinar Paciente
+ Examiner Patient
+ Zbadaj pacjenta
+
+
+ Bandage / Fractures
+ Раны / переломы
+ Vendajes/Fracturas
+ Bandages / Fractures
+ Bandaże / Złamania
+
+
+ Medication
+ Медикаменты
+ Medicación
+ Médications
+ Leki
+
+
+ Airway Management
+ Дыхательные пути
+ Vías Aéreas
+ Gestion Des Voie REspiratoire
+ Drogi oddechowe
+
+
+ Advanced Treatments
+ Специальная медпомощь
+ Tratamientos Avanzados
+ Traitement Avancé
+ Zaawansowane zabiegi
+
+
+ Drag/Carry
+ Тащить/нести
+ Arrastrar/Cargar
+ Glisser/Porter
+ Ciągnij/Nieś
+
+
+ Toggle (Self)
+ Лечить себя/другого раненого
+ Activer (sois)
+ Przełącz (na siebie)
+ Alternar
+
+
+ Select triage status
+ Сортировка
+ Seleccionar estado de Triage
+ Selectioner l'état de Triage
+ Wybierz priorytet
+
+
+ Select Head
+ Выбрать голову
+ Seleccionar Cabeza
+ Selectioner Tête
+ Wybierz głowę
+
+
+ Select Torso
+ Выбрать торс
+ Seleccionar Torso
+ Selectioner Torse
+ Wybierz tors
+
+
+ Select Left Arm
+ Выбрать левую руку
+ Seleccionar Brazo Izquierdo
+ Selectioner Bras Gauche
+ Wybierz lewą rękę
+
+
+ Select Right Arm
+ Выбрать правую руку
+ Seleccionar Brazo Derecho
+ Selectioner Bras Droit
+ Wybierz prawą rękę
+
+
+ Select Left Leg
+ Выбрать левую ногу
+ Seleccionar Pierna Izquierda
+ Selectioner Jambe Gauche
+ Wybierz lewą nogę
+
+
+ Select Right Leg
+ Выбрать правую ногу
+ Seleccionar Pierna Derecha
+ Selectioner Jambe Droite
+ Wybierz prawą nogę
+
+
+ Head
+ Голова
+ Cabeza
+ Tête
+ Głowa
+
+
+ Torso
+ Торс
+ Torse
+ Tors
+
+
+ Left Arm
+ Левая рука
+ Brazo Izquierdo
+ Bras Gauche
+ Lewa ręka
+
+
+ Right Arm
+ Правая рука
+ Brazo Derecho
+ Bras Droit
+ Prawa ręka
+
+
+ Left Leg
+ Левая нога
+ Pierna Izquierda
+ Jambe Gauche
+ Lewa noga
+
+
+ Right Leg
+ Правая нога
+ Pierna Derecha
+ Jambe Droite
+ Prawa noga
+
+
+ Body Part: %1
+ Часть тела: %1
+ Parte del cuerpo: %1
+ Partie du corps: %1
+ Część ciała: %1
+
+
+ Small
+ малого размера
+ Pequeña
+ Petite
+ małym
+
+
+ Medium
+ среднего размера
+ Mediana
+ moyenne
+ średnim
+
+
+ Large
+ большого размера
+ Grande
+ Grande
+ dużym
+
+
+ There are %2 %1 Open Wounds
+ %2 открытые раны %1
+ Hay %2 Heridas Abiertas %1
+ Il y a %2 %1 Blessure Ouverte
+ Widzisz otwarte rany w ilości %2 o %1 rozmiarze
+
+
+ There is 1 %1 Open Wound
+ Открытая рана %1
+ Hay 1 Herida Abierta %1
+ Il y a 1 blessure ouverte %1
+ Widzisz 1 otwartą ranę o %1 rozmiarze
+
+
+ There is a partial %1 Open wound
+ Частично открытая рана %1
+ Hay una herida parcial abierta %1
+ Il y a une Blessure Patiellement Ouverte %1
+ Widzisz częściowo otwartą ranę o %1 rozmiarze
+
+
+ There are %2 %1 Bandaged Wounds
+ %2 перевязанные раны %1
+ Hay %2 Heridas %1 Vendadas
+ Il y a %2 %1 Blessure Bandée
+ Widzisz %2 zabandażowanych ran o %1 rozmiarze
+
+
+ There is 1 %1 Bandaged Wound
+ 1 перевязанная рана %1
+ Hay 1 Herida Vendada %1
+ Il y a 1 %1 Blessure Bandée
+ Widzisz 1 zabandażowaną ranę o %1 rozmiarze
+
+
+ There is a partial %1 Bandaged wound
+ Частично перевязанная рана %1
+ Hay una Herida parcial %1 Vendada
+ Il y a %1 Blessure Partielment Bandée
+ Widzisz 1 częściowo zabandażowaną ranę o %1 rozmiarze
+
+
+ Normal breathing
+ Дыхание в норме
+ Respiración normal
+ Respiration Normale
+ Normalny oddech
+
+
+ No breathing
+ Дыхания нет
+ No respira
+ Apnée
+ Brak oddechu
+
+
+ Difficult breathing
+ Дыхание затруднено
+ Dificultad para respirar
+ Difficultée Respiratoire
+ Trudności z oddychaniem
+
+
+ Almost no breathing
+ Дыхания почти нет
+ Casi sin respirar
+ Respiration Faible
+ Prawie brak oddechu
+
+
+ Bleeding
+ Кровотечение
+ Sangrando
+ Seignement
+ Krwawienie zewnętrzne
+
+
+ in Pain
+ Испытывает боль
+ Con Dolor
+ A De La Douleur
+ W bólu
+
+
+ Lost a lot of Blood
+ Большая кровопотеря
+ Mucha Sangre perdida
+ A Perdu Bcp de Sang
+ Stracił dużo krwi
+
+
+ Tourniquet [CAT]
+ Жгут
+ Torniquete [CAT]
+ Garot [CAT]
+ Opaska uciskowa [CAT]
+
+
+ Nasopharyngeal Tube [NPA]
+ Назотрахеальная трубка
+ Torniquete [CAT]
+ Canule Naseaupharyngée [NPA]
+ Rurka nosowo-gardłowa [NPA]
+
+
+
+
+ Bandage (Basic)
+ Повязка (обычная)
+ Vendaje (Básico)
+ Bandage (Standard)
+ Bandaż (jałowy)
+
+
+ Used to cover a wound
+ Для перевязки ран
+ Utilizado para cubrir una herida
+ Utilisé Pour Couvrir Une Blessure
+ Używany w celu przykrycia i ochrony miejsca zranienia
+
+
+ A dressing, that is a particular material used to cover a wound, which is applied over the wound once bleeding has been stemmed.
+ Повязка, накладываемая поверх раны после остановки кровотечения.
+ Un apósito, material específico utilizado para cubrir una herida, se aplica sobre la herida una vez ha dejado de sangrar.
+ C'est un bandage, qui est fait d'un matériel spécial utiliser pour couvrir une blessure, qui peut etre appliquer des que le seignement as ete stopper.
+ Opatrunek materiałowy, używany do przykrywania ran, zakładany na ranę po zatamowaniu krwawienia.
+
+
+ Packing Bandage
+ Тампонирующая повязка
+ Vendaje Compresivo
+ Bandage Mèche
+ Bandaż (uciskowy)
+
+
+ Used to pack medium to large wounds and stem the bleeding
+ Для тампонирования ран среднего и большого размера и остановки кровотечения.
+ Se utiliza para vendar heridas medianas y grandes y detener el sangrado
+ Utiliser pour remplire la cavité créé dans une blessure moyenne et grande.
+ Używany w celu opatrywania średnich i dużych ran oraz tamowania krwawienia.
+
+
+ A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries.
+ Повязка для тампонирования раны, остановки кровотечения и лучшего заживления. При тяжелых сочетанных ранениях возможно тампонирование раны.
+ Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos.
+ Un bandage servent a etre inseré dans les blessure pour éponger le seignement et faciliter la guerrison. Ce bandage est une option pour soigner les lession de politrauma.
+ Opatrunek stosowany w celu zatrzymania krwawienia i osłony większych ran.
+
+
+ Bandage (Elastic)
+ Повязка (давящая)
+ Vendaje (Elástico)
+ Bandage (Élastique)
+ Bandaż (elastyczny)
+
+
+ Bandage kit, Elastic
+ Давящая повязка
+ Vendaje (Elástico)
+ Bandage Compressif Élastique
+ Zestaw bandaży elastycznych.
+
+
+
+
+ Ce bandage peut etre utiliser pour compresser la plaie afin de ralentire le seignement et assurer la tenue du bandage lors de mouvment.
+ Elastyczna opaska podtrzymująca opatrunek oraz usztywniająca okolice stawów.
+ Brinda una compresión uniforme y ofrece soporte extra a una zona lesionada
+
+
+ Tourniquet (CAT)
+ Жгут
+ Torniquete (CAT)
+ Garot (CAT)
+ Staza (typ. CAT)
+
+
+ Slows down blood loss when bleeding
+ Уменьшает кровопотерю при кровотечении.
+ Reduce la velocidad de pérdida de sangre
+ Ralentit le seignement
+ Zmniejsza ubytek krwi z kończyn w przypadku krwawienia.
+
+
+ A constricting device used to compress venous and arterial circulation in effect inhibiting or slowing blood flow and therefore decreasing loss of blood.
+ Жгут используется для прижатия сосудов, приводящего к остановке или значительному уменьшению кровотечения и сокращению кровопотери.
+ Dispositivo utilizado para eliminar el pulso distal y de ese modo controlar la pérdida de sangre
+ Un appareil servent a compresser les artères et veines afin de reduire la perte de sang.
+ Opaska zaciskowa CAT służy do tamowanie krwotoków w sytuacji zranienia kończyn z masywnym krwawieniem tętniczym lub żylnym.
+
+
+ Splint
+ Шина
+ Férula
+ Attelle
+ Szyna
+
+
+ An immobilization device used to support, immobilize and to a degree compress the associated wound. Usually used on the limbs but can be used on the hip.
+ Приспособление для поддержки и иммобилизации конечности, а также частичного прижатия ее раны. Обычно накладывается на конечности, но может накладываться и на бедро.
+ Un dispositivo de inmovilización utilizado para apoyar, inmovilizar y comprimir la herida asociada. Normalmente se usa en las extremidades, pero puede ser utilizado en la cadera.
+ Un dispositif d'immobilisation servant a supporter, immobiliser, et meme comprimer les blessure relier a une fracture. Normalement utiliser sur les extrémités
+ Szyna jest urządzeniem służącym do wsparcia lub unieruchomienia kończyny lub kręgosłupa.
+
+
+ A Splint, for broken bones
+ Шина для переломов
+ Férula, para huesos rotos
+ Une attelle, pour les os brisé
+ Szyna, na złamane kości.
+
+
+ Morphine auto-injector
+ Морфин в автоматическом шприце
+ Morfina auto-inyectable
+ Auto-injecteur de Morphine
+ Autostrzykawka z morfiną
+
+
+ Used to combat moderate to severe pain experiences
+ Для снятия средних и сильных болевых ощущений.
+ Usado para combatir los estados dolorosos moderados a severos
+ Utiliser pour contrer les douleurs modéré à severes.
+ Morfina. Ma silne działanie przeciwbólowe.
+
+
+ An analgesic used to combat moderate to severe pain experiences.
+ Анальгетик для снятия средних и сильных болевых ощущений.
+ Analgésico usado para combatir los estados dolorosos de moderado a severo.
+ Un Analgésique puissant servant a contrer les douleur modéré a severe.
+ Organiczny związek chemiczny z grupy alkaloidów. Ma silne działanie przeciwbólowe.
+
+
+ Atropin auto-injector
+ Атропин в автоматическом шприце
+ Atropina auto-inyectable
+ Auto-injecteur d'Atropine
+ Autostrzykawka AtroPen
+
+
+ Used in NBC scenarios
+ Применяется для защиты от ОМП
+ Usado en escenarios NBQ
+ Utiliser en cas d'attaque CBRN
+ Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice.
+
+
+ A drug used by the Military in NBC scenarios.
+ Препарат, используемый в войсках для защиты от оружия массового поражения.
+ Medicamento usado por Militares en escenarios NBQ
+ Médicament utilisé par l'armée en cas d'attaque CBRN
+ Atropina. Stosowana jako lek rozkurczowy i środek rozszerzający źrenice. Środek stosowany w przypadku zagrożeń NBC.
+
+
+ Epinephrine auto-injector
+ Адреналин в автоматическом шприце
+ Epinefrina auto-inyectable
+ Auto-injecteur d'épinéphrine
+ Autostrzykawka EpiPen
+
+
+ Increase heart rate and counter effects given by allergic reactions
+ Стимулирует работу сердца и купирует аллергические реакции.
+ Aumenta la frecuencia cardiaca y contraresta los efectos de las reacciones alérgicas
+ Augmente la Fréquance cadiaque et contré les effet d'une reaction Anaphylactique
+ Adrenalina. Zwiększa puls i przeciwdziała efektom wywołanym przez reakcje alergiczne
+
+
+ A drug that works on a sympathetic response to dilate the bronchi, increase heart rate and counter such effects given by allergic reactions (anaphylaxis). Used in sudden cardiac arrest scenarios with decreasing positive outcomes.
+ Препарат, вызывающий симпатическую реакцию, приводящую к расширению бронхов, увеличению частоты сердечных сокращений и купированию аллергических реакций (анафилактического шока). Применяется при остановке сердца с уменьшением вероятности благоприятного исхода.
+ Medicamento que dilata los bronquios, aumenta la frecuencia cardiaca y contrarresta los efectos de las reacciones alérgicas (anafilaxis). Se utiliza en caso de paros cardiacos repentinos.
+ Un medicament qui fonctione sur le systeme sympatique créan une dilatation des bronches, augmente la fréquance cardiaque et contre les effet d'une reaction alergique (anaphylaxie). Utiliser lors d'arret cardio-respiratoire pour augmenté les chances retrouver un ryhtme.
+ EpiPen z adrenaliną ma działanie sympatykomimetyczne, tj. pobudza receptory alfa- i beta-adrenergiczne. Pobudzenie układu współczulnego prowadzi do zwiększenia częstotliwości pracy serca, zwiększenia pojemności wyrzutowej serca i przyśpieszenia krążenia wieńcowego. Pobudzenie oskrzelowych receptorów beta-adrenergicznych wywołuje rozkurcz mięśni gładkich oskrzeli, co w efekcie zmniejsza towarzyszące oddychaniu świsty i duszności.
+
+
+ Plasma IV (1000ml)
+ Плазма для в/в вливания (1000 мл)
+ Plasma Intravenoso (1000ml)
+ Plasma Sanguin IV (1000ml)
+ Osocze IV (1000ml)
+
+
+ A volume-expanding blood supplement.
+ Дополнительный препарат, применяемый при возмещении объема крови.
+ Suplemento para expandir el volumen sanguíneo.
+ Supplement visant a remplacer les volume sanguin
+ Składnik krwi, używany do zwiększenia jej objętości.
+
+
+ A volume-expanding blood supplement.
+ Дополнительный препарат, применяемый при возмещении объема крови.
+ Suplemento para expandir el volumen sanguíneo.
+ Supplement visant a remplacer le volume sanguin et remplace les plaquettes.
+ Składnik krwi, używany do zwiększenia jej objętości.
+
+
+ Plasma IV (500ml)
+ Плазма для в/в вливания (500 мл)
+ Plasma Intravenoso (500ml)
+ Plasma Sanguin IV (500ml)
+ Osocze IV (500ml)
+
+
+ Plasma IV (250ml)
+ Плазма для в/в вливания (250 мл)
+ Plasma Intravenoso (250ml)
+ Plasma Sanguin (250ml)
+ Osocze IV (250ml)
+
+
+ Blood IV (1000ml)
+ Кровь для переливания (1000 мл)
+ Sangre Intravenosa (1000ml)
+ Cullot Sanguin IV (1000ml)
+ Krew IV (1000ml)
+
+
+ Blood IV, for restoring a patients blood (keep cold)
+ Пакет крови для возмещения объема потерянной крови (хранить в холодильнике)
+ Sangre Intravenosa, para restarurar el volumen sanguíneo (mantener frío)
+ Cullot Sanguin IV, pour remplacer le volume sanguin (garder Réfrigeré)
+ Krew IV, używana do uzupełnienia krwi u pacjenta, trzymać w warunkach chłodniczych
+
+
+ O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care.
+ Кровь I группы, резус-отрицательная, применяется по жизненным показаниям для возмещения объема потерянной крови на догоспитальном этапе оказания медицинской помощи.
+ Cullot Sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin.
+ Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupełnienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala.
+ Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdido. Uso habitual durante el transporte de heridos.
+
+
+ Blood IV (500ml)
+ Кровь для переливания (500 мл)
+ Sangre Intravenosa (500ml)
+ Cullot Sanguin IV (500ml)
+ Krew IV (500ml)
+
+
+ Blood IV (250ml)
+ Кровь для переливания (250 мл)
+ Sangre Intravenosa (250ml)
+ Cullot Sanguin IV (250ml)
+ Krew IV (250ml)
+
+
+ Saline IV (1000ml)
+ Физраствор для в/в вливания (1000 мл)
+ Solución Salina Intravenosa (1000ml)
+ solution Saline 0.9% IV (1000ml)
+ Solanka 0,9% IV (1000ml)
+
+
+ Saline IV, for restoring a patients blood
+ Пакет физраствора для возмещения объема потерянной крови
+ Solución Salina Intravenosa, para restaurar el volumen sanguíneo
+ Solution Saline 0.9% IV, pour retablir temporairement la tention arteriel
+ Solanka 0,9%, podawana dożylnie (IV), używana w celu uzupełnienia krwi u pacjenta
+
+
+ A medical volume-replenishing agent introduced into the blood system through an IV infusion.
+ Пакет физиологического раствора для возмещения объема потерянной крови путем внутривенного вливания.
+ Suero fisiológico inoculado al torrente sanguíneo de forma intravenosa.
+ Un remplacment temporaire pour rétablir la tention artériel lors de perte sanguine, étant ajouter par intraveineuse
+ Używany w medycynie w formie płynu infuzyjnego jako środek nawadniający i uzupełniający niedobór elektrolitów, podawany dożylnie (IV).
+
+
+ Saline IV (500ml)
+ Физраствор для в/в вливания (500 мл)
+ Solución Salina Intravenosa (500ml)
+ Solution Saline 0.9% IV (500ml)
+ Solanka 0,9% IV (500ml)
+
+
+ Saline IV (250ml)
+ Физраствор для в/в вливания (250 мл)
+ Solución Salina Intravenosa (250ml)
+ Solution Saline 0.9% IV (250ml)
+ Solanka 0,9% IV (250ml)
+
+
+ Basic Field Dressing (QuikClot)
+ Первичный перевязочный пакет (QuikClot)
+ Vendaje Básico (Coagulante)
+ Bandage Regulier (Coagulant)
+ Opatrunek QuikClot
+
+
+ QuikClot bandage
+ Гемостатический пакет QuikClot
+ Venda Coagulante
+ Bandage coagulant
+ Podstawowy opatrunek stosowany na rany
+
+
+
+
+ Un bandage servant a coaguler les seignements mineur à moyen.
+ Proszkowy opatrunek adsorbcyjny przeznaczony do tamowania zagrażających życiu krwawień średniej i dużej intensywności.
+ Vendaje Hemostático con coagulante que detiene el sangrado.
+
+
+ Nasopharyngeal tube
+ Назотрахеальная трубка
+ Cánula Nasofaríngea
+ Canule Nasopharyngée
+ Rurka nosowo-gardłowa
+
+
+ Nasopharyngeal tube, for mataining the airway
+ Назотрахеальная трубка для поддержания проходимости дыхательных путей
+ Cánula Nasofaríngea, mantiene despejadas las vías aéreas
+ Canule Naso, sert a mintenir ouverte les voix respiratoire.
+ Rurka nosowo-gardłowa, używana w celu udrożnienia dróg oddechowych
+
+
+ Nasopharyngeal airway. An airway adjunct inserted nasally which is then used to keep the airway patent which allows the field medic to ventilate the patient as appropriate.
+ Назотрахеальная трубка. Интубационная трубка, вводимая через нос для поддержания проходимости дыхательных путей, позволяющая санитару при необходимости осуществлять вентиляцию легких раненого.
+ Cánula Nasofaríngea. Dispositivo de vía aérea insertado por vía nasal que se utiliza para mantener libre la vía aérea permitiendo ventilar al paciente según sea apropiado.
+ Canule Naso. Dispositif, incere par le nez, servant a maintenir les voie respiratoire du patient ouverte, permetant sa ventilation par le personel medical.
+ Rurki nosowo-gardłowe stosuje się do ratunkowego udrożnienia dróg oddechowych u osób nieprzytomnych. Rurka nosowo-gardłowa jest znacznie lepiej tolerowana np. przez osobę przytomną, niż rurka ustno-gardłowa.
+
+
+ Oropharyngeal tube
+ Оротрахеальная трубка
+ Cánula Orofaríngea
+ Canule Oropharyngée
+ Rurka ustno-gardłowa
+
+
+ Oropharyngeal Airway, for maintaining the airway
+ Оротрахеальная трубка для поддержания проходимости дыхательных путей
+ Cánula Orofaríngea, para mantener despejada las vía aéreas
+ Canule Oropharyngée, sert a maintenir les voie respiratoires ouverte.
+ Rurka ustno-gardłowa, używana w celu udrożnienia dróg oddechowych
+
+
+ Oropharyngeal airway. An airway adjunct inserted via the oral airway (i.e. mouth) which is then used to keep the airway patent which allows the field medic to ventilate the patient as appropriate.
+ Оротрахеальная трубка. Интубационная трубка, вводимая через рот для поддержания проходимости дыхательных путей, позволяющая санитару при необходимости осуществлять вентиляцию легких раненого.
+ Cánula Orofaríngea. Dispositivo de vía aérea insertado a través de la vía respiratoria oral (es decir, la boca) que se utiliza para mantener despejada las vías aéreas permitiendo ventilar al paciente según sea apropiado.
+ Canule Oropharyngée. Un dispositif, inseré par la bouche, qui est utiliser pour garder les voie respiratoire overte et permetre la ventilation par le personel de soin.
+ Rurkę ustno - gardłową stosuje się podczas zabiegów sztucznej wentylacji płuc. Zadaniem rurki ustno - gardłowej jest zapewnienie drożności górnych dróg oddechowych, a użycie jej zapewnia ratownikowi komfort prowadzenia zabiegów i podnosi skuteczność prowadzonej akcji.
+
+
+ Liquid skin
+ «Жидкая кожа»
+ Pomada tópica
+ Pomade Topique
+ Bandaż (w płynie)
+
+
+ Liquid Skin, for use on burns
+ Препарат «жидкая кожа» для лечения ожогов
+ Pomada tópica, para quemaduras
+ Pomade Topique, appliquer sur les brulures.
+ Bandaż w płynie, używany na poparzenia i lekkie urazy
+
+
+ Liquid bandage is a topical skin treatment for minor cuts and sores that is sold by several companies. The products are mixtures of chemicals which create a polymeric layer which binds to the skin. This protects the wound by keeping dirt and germs out, and keeping moisture in.
+ Медицинский клей («жидкая повязка») – наружное средство для лечения небольших порезов и ссадин. Продукт представляет собой смесь химических веществ, создающих полимерный слой, который приклеивается к коже. Таким образом предотвращается попадание в рану грязи и микробов, а также высыхание раны.
+ Bandage liquide est un traitement de la peau topique pour les coupures et les plaies mineures qui est vendu par plusieurs compagnies. Les produits sont des mélanges de produits chimiques qui créent une couche polymère qui se lie à la peau. Cela protège la plaie en gardant la saleté et les germes, et de garder l'humidité.
+ Opatrunek nakładany na skórę atomizerem tworzący na powierzchni skóry warstwę przyśpieszającą gojenie - stosowany przy drobnych ranach i poparzeniach.
+ Líquido tópico para pequeños cortes, heridas y quemaduras. Compuesto de sustancias químicas que crean una capa polimérica que se une a la piel. Esto protege la herida manteniéndola libre de suciedad y gérmenes.
+
+
+ Chest seal
+ Окклюзионная повязка
+ Parche Oclusivo
+ Bandage Occlusif
+ Opatrunek Chest Seal
+
+
+ A Chest seal
+ Окклюзионная повязка на грудную клетку
+ Parche Torácico
+ Bandage toracique pour les pneumothorax
+ Opatrunek uszczelniający na rany penetracyjne klatki piersiowej
+
+
+ Chest Seal is a high performance occlusive dressing designed to treat penetrating chest wounds along with securing other wound dressings. The patented hydro-gel provides superior adhesion to the wound area even when moisture, pleural fluids or blood is present. It will work on patients with heavy perspiration or very wet environments. The highly aggressive tack adhesive of the hydro-gel will enable the dressing to conform and hold to the patient's body.
+ Окклюзионная повязка предназначена для лечения проникающих ранений в грудную клетку с одновременной фиксацией других повязок. Патентованный гидрогель обеспечивает отличное крепление к области ранения даже при наличии влаги, плевральной жидкости или крови. Может применяться даже при обильном потоотделении или в очень влажной среде. Благодаря высокоадгезивному пластырю повязка плотно прилегает к телу раненого и не отклеивается.
+ Le pensement occlusif est un pansement occlusif de haute performance conçu pour traiter les plaies pénétrantes de la poitrine ainsi que la sécurisation d'autres pansements. L'hydro-gel brevetée offre une adhérence supérieure à la surface de la plaie, même lorsque l'humidité, liquide pleural ou le sang est présent, elle le laisse couller. Il fonctionne sur les patients atteints d'une transpiration abondante ou dans des environnements très humides.
+ Chest Seal to opatrunek przeznaczony do opatrywania penetracyjnych (otwartych) ran klatki piersiowej, staniowiących sytuację zagrażającą życiu wskutek możliwości powstawania odmy prężnej. Jest to druga co do częstotliwości występowania przyczyna śmierci na polu walki, której można zapobiec stosując odpowiednie procedury medyczne. Chest Seal charakteryzuje się trwałym i szczelnym przyleganiem do skóry pokrytej krwią, piaskiem, włosami, potem lub wodą. Materiałem klejącym opatrunku uszczelniającego jest środek hydrożelowy umożliwiający wielokrotne odklejanie i przyklejanie opatrunku, co pozwala na wentylowanie rany.
+ Vendaje oclusivo utilizado para el tratamiento de las lesiones penetrantes en el tórax
+
+
+ Personal Aid Kit
+ Аптечка
+ Kit de Soporte Vital Avanzado
+ Équipement de support Vitale
+ Apteczka osobista
+
+
+ Includes various treatment kit needed for stitching or advanced treatment
+ Содержит различные материалы и инструменты для зашивания ран и оказания специальной медпомощи.
+ Incluye material médico para tratamientos avanzados
+ Inclue du matériel medical pour les traitement avancé, tel les point de suture.
+ Zestaw środków medycznych do opatrywania ran i dodatkowego leczenia po-urazowego
+
+
+
+
+
+
+
+
+ Surgical Kit
+ Хирургический набор
+ Kit Quirúrgico
+
+
+ Surgical Kit for in field advanced medical treatment
+ Набор для хирургической помощи в полевых условиях
+ Kit Quirúrgico para el tratamiento avanzado en el campo de batalla
+
+
+ Surgical Kit for in field advanced medical treatment
+ Набор для хирургической помощи в полевых условиях
+ Kit Quirúrgico para el tratamiento avanzado en el campo de batalla
+
+
+ Bodybag
+ Мешок для трупов
+ Bolsa para cadáveres
+
+
+ A bodybag for dead bodies
+ Мешок для упаковки трупов
+ Bolsa para cadáveres
+
+
+ A bodybag for dead bodies
+ Мешок для упаковки трупов
+ Bolsa para cadáveres
+
+
+
+
+ Canceled
+ Отменено
+ Cancelado
+
+
+ Action has been canceled
+ Действие отменено
+ Acción cancelada
+
+
+ You moved away
+ Вы отошли от раненого
+ Te estás alejando
+
+
+ Blood Pressure
+ Артериальное давление
+ Presión Arterial
+
+
+ Checking Blood Pressure..
+ Проверка артериального давления...
+ Comprobando Presión Arterial...
+
+
+ You checked %1
+ Вы осмотрели раненого %1
+ Examinando a %1
+
+
+ You find a blood pressure of %2/%3
+ Артериальное давление %2/%3
+ La Presión Arterial es %2/%3
+
+
+ You find a low blood pressure
+ Давление низкое
+ La Presión Arterial es baja
+
+
+ You find a normal blood pressure
+ Давление нормальное
+ La Presión Arterial es normal
+
+
+ You find a high blood pressure
+ Давление высокое
+ La Presión Arterial es alta
+
+
+ You find no blood pressure
+ Давления нет
+ No hay Presión Arterial
+
+
+ You fail to find a blood pressure
+ Артериальное давление не определяется
+ No puedes encontrar Presión Arterial
+
+
+ Pulse
+ Пульс
+ Pulso
+
+
+ Checking Heart Rate..
+ Проверка пульса...
+ Comprobando Pulso...
+
+
+ You checked %1
+ Вы осмотрели раненого %1
+ Examinando a %1
+
+
+ You find a Heart Rate of %2
+ Пульс %2 уд./мин.
+ El Pulso es %2
+
+
+ You find a weak Heart Rate
+ Пульс слабый
+ El Pulso es débil
+
+
+ You find a strong Heart Rate
+ Пульс учащенный
+ El Pulso está acelerado
+
+
+ You find a normal Heart Rate
+ Пульс в норме
+ El Pulso es bueno
+
+
+ You find no Heart Rate
+ Пульс не прощупывается
+ No tiene Pulso
+
+
+ Response
+ Реакция
+ Reacciona
+
+
+ You check response of patient
+ Вы проверяете реакцию раненого
+ Compruebas si el paciente reacciona
+
+
+ %1 is responsive
+ %1 реагирует на раздражители
+ %1 ha reaccionado
+
+
+
+ %1 is not responsive
+ %1 не реагирует
+ %1 no reacciona
+
+
+ You checked %1
+ Вы осмотрели раненого %1
+ Examinas a %1
+
+
+ Bandaging
+ Перевязка...
+ Vendando
+
+
+ Bandaged
+ Повязка наложена
+ Vendado
+
+
+ You apply a bandage on %1 - %2
+ Вы перевязали раненого %1 (%2)
+ Aplicas vendaje a %1 en %2
+
+
+ %1 is bandaging you
+ %1 перевязывает вас
+ %1 te está vendando
+
+
+ You start stitching injures from %1 - %2
+ Вы зашиваете ранения от %1 (%2)
+ Estás suturando heridas de %1 en %2
+
+
+ Stitching
+ Наложение швов
+ Suturando
+
+
+ You treat the airway of %1
+ Вы интубируете раненого %1
+ Estás intubando a %1
+
+
+ Airway
+ Дыхательные пути
+ Vías Aéreas
+
+
+ %1 is treating your aiway
+ %1 проводит вам интубацию
+ %1 te está intubando
+
+
+
+
diff --git a/TO_MERGE/cse/sys_medical/ui/define.hpp b/TO_MERGE/cse/sys_medical/ui/define.hpp
new file mode 100644
index 0000000000..c521de470f
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/ui/define.hpp
@@ -0,0 +1,797 @@
+
+#ifndef CSE_DEFINE_H
+#define CSE_DEFINE_H
+// define.hpp
+
+#define true 1
+#define false 0
+
+#define CT_STATIC 0
+#define CT_BUTTON 1
+#define CT_EDIT 2
+#define CT_SLIDER 3
+#define CT_COMBO 4
+#define CT_LISTBOX 5
+#define CT_TOOLBOX 6
+#define CT_CHECKBOXES 7
+#define CT_PROGRESS 8
+#define CT_HTML 9
+#define CT_STATIC_SKEW 10
+#define CT_ACTIVETEXT 11
+#define CT_TREE 12
+#define CT_STRUCTURED_TEXT 13
+#define CT_CONTEXT_MENU 14
+#define CT_CONTROLS_GROUP 15
+#define CT_SHORTCUTBUTTON 16
+#define CT_XKEYDESC 40
+#define CT_XBUTTON 41
+#define CT_XLISTBOX 42
+#define CT_XSLIDER 43
+#define CT_XCOMBO 44
+#define CT_ANIMATED_TEXTURE 45
+#define CT_OBJECT 80
+#define CT_OBJECT_ZOOM 81
+#define CT_OBJECT_CONTAINER 82
+#define CT_OBJECT_CONT_ANIM 83
+#define CT_LINEBREAK 98
+#define CT_ANIMATED_USER 99
+#define CT_MAP 100
+#define CT_MAP_MAIN 101
+#define CT_LISTNBOX 102
+
+// Static styles
+#define ST_POS 0x0F
+#define ST_HPOS 0x03
+#define ST_VPOS 0x0C
+#define ST_LEFT 0x00
+#define ST_RIGHT 0x01
+#define ST_CENTER 0x02
+#define ST_DOWN 0x04
+#define ST_UP 0x08
+#define ST_VCENTER 0x0c
+
+#define ST_TYPE 0xF0
+#define ST_SINGLE 0
+#define ST_MULTI 16
+#define ST_TITLE_BAR 32
+#define ST_PICTURE 48
+#define ST_FRAME 64
+#define ST_BACKGROUND 80
+#define ST_GROUP_BOX 96
+#define ST_GROUP_BOX2 112
+#define ST_HUD_BACKGROUND 128
+#define ST_TILE_PICTURE 144
+#define ST_WITH_RECT 160
+#define ST_LINE 176
+
+#define ST_SHADOW 0x100
+#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI
+#define ST_KEEP_ASPECT_RATIO 0x800
+
+#define ST_TITLE ST_TITLE_BAR + ST_CENTER
+
+// Slider styles
+#define SL_DIR 0x400
+#define SL_VERT 0
+#define SL_HORZ 0x400
+
+#define SL_TEXTURES 0x10
+
+// Listbox styles
+#define LB_TEXTURES 0x10
+#define LB_MULTI 0x20
+#define FontCSE "PuristaMedium"
+
+class cse_gui_backgroundBase {
+ type = CT_STATIC;
+ idc = -1;
+ style = ST_PICTURE;
+ colorBackground[] = {0,0,0,0};
+ colorText[] = {1, 1, 1, 1};
+ font = FontCSE;
+ text = "";
+ sizeEx = 0.032;
+};
+class cse_gui_editBase
+{
+ access = 0;
+ type = 2;
+ x = 0;
+ y = 0;
+ h = 0.04;
+ w = 0.2;
+ colorBackground[] =
+ {
+ 0,
+ 0,
+ 0,
+ 1
+ };
+ colorText[] =
+ {
+ 0.95,
+ 0.95,
+ 0.95,
+ 1
+ };
+ colorSelection[] =
+ {
+ "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
+ "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
+ "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
+ 1
+ };
+ autocomplete = "";
+ text = "";
+ size = 0.2;
+ style = "0x00 + 0x40";
+ font = "PuristaMedium";
+ shadow = 2;
+ sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ colorDisabled[] =
+ {
+ 1,
+ 1,
+ 1,
+ 0.25
+ };
+};
+
+
+
+class cse_gui_buttonBase {
+ idc = -1;
+ type = 16;
+ style = ST_LEFT;
+ text = "";
+ action = "";
+ x = 0.0;
+ y = 0.0;
+ w = 0.25;
+ h = 0.04;
+ size = 0.03921;
+ sizeEx = 0.03921;
+ color[] = {1.0, 1.0, 1.0, 1};
+ color2[] = {1.0, 1.0, 1.0, 1};
+ /*colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.5])"};
+ colorbackground2[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.4};
+ colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
+ colorFocused[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])", 0.8};
+ colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.8};
+ */
+
+ colorBackground[] = {1,1,1,0.95};
+ colorbackground2[] = {1,1,1,0.95};
+ colorDisabled[] = {1,1,1,0.6};
+ colorFocused[] = {1,1,1,1};
+ colorBackgroundFocused[] = {1,1,1,1};
+ periodFocus = 1.2;
+ periodOver = 0.8;
+ default = false;
+ class HitZone {
+ left = 0.00;
+ top = 0.00;
+ right = 0.00;
+ bottom = 0.00;
+ };
+
+ class ShortcutPos {
+ left = 0.00;
+ top = 0.00;
+ w = 0.00;
+ h = 0.00;
+ };
+
+ class TextPos {
+ left = 0.002;
+ top = 0.0004;
+ right = 0.0;
+ bottom = 0.00;
+ };
+ textureNoShortcut = "";
+ animTextureNormal = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
+ animTextureDisabled = "cse\cse_gui\data\buttonDisabled_gradient.paa";
+ animTextureOver = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
+ animTextureFocused = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
+ animTexturePressed = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
+ animTextureDefault = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
+ period = 0.5;
+ font = FontCSE;
+ soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
+ soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.0,0};
+ soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.07,1};
+ soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
+ class Attributes {
+ font = FontCSE;
+ color = "#E5E5E5";
+ align = "center";
+ shadow = "true";
+ };
+ class AttributesImage {
+ font = FontCSE;
+ color = "#E5E5E5";
+ align = "left";
+ shadow = "true";
+ };
+};
+
+class cse_gui_RscProgress {
+ type = 8;
+ style = 0;
+ colorFrame[] = {1,1,1,0.7};
+ colorBar[] = {1,1,1,0.7};
+ texture = "#(argb,8,8,3)color(1,1,1,0.7)";
+ x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+};
+
+
+class cse_gui_staticBase {
+ idc = -1;
+ type = CT_STATIC;
+ x = 0.0;
+ y = 0.0;
+ w = 0.183825;
+ h = 0.104575;
+ style = ST_LEFT;
+ font = FontCSE;
+ sizeEx = 0.03921;
+ colorText[] = {0.95, 0.95, 0.95, 1.0};
+ colorBackground[] = {0, 0, 0, 0};
+ text = "";
+};
+
+class RscListBox;
+class cse_gui_listBoxBase : RscListBox{
+ type = CT_LISTBOX;
+ style = ST_MULTI;
+ font = FontCSE;
+ sizeEx = 0.03921;
+ color[] = {1, 1, 1, 1};
+ colorText[] = {0.543, 0.5742, 0.4102, 1.0};
+ colorScrollbar[] = {0.95, 0.95, 0.95, 1};
+ colorSelect[] = {0.95, 0.95, 0.95, 1};
+ colorSelect2[] = {0.95, 0.95, 0.95, 1};
+ colorSelectBackground[] = {0, 0, 0, 1};
+ colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
+ colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
+ period = 1.2;
+ rowHeight = 0.03;
+ colorBackground[] = {0, 0, 0, 1};
+ maxHistoryDelay = 1.0;
+ autoScrollSpeed = -1;
+ autoScrollDelay = 5;
+ autoScrollRewind = 0;
+ soundSelect[] = {"",0.1,1};
+ soundExpand[] = {"",0.1,1};
+ soundCollapse[] = {"",0.1,1};
+ class ListScrollBar {
+ arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
+ arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
+ autoScrollDelay = 5;
+ autoScrollEnabled = 0;
+ autoScrollRewind = 0;
+ autoScrollSpeed = -1;
+ border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
+ color[] = {1,1,1,0.6};
+ colorActive[] = {1,1,1,1};
+ colorDisabled[] = {1,1,1,0.3};
+ height = 0;
+ scrollSpeed = 0.06;
+ shadow = 0;
+ thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
+ width = 0;
+ };
+ class ScrollBar {
+ color[] = {1, 1, 1, 0.6};
+ colorActive[] = {1, 1, 1, 1};
+ colorDisabled[] = {1, 1, 1, 0.3};
+ thumb = "";
+ arrowFull = "";
+ arrowEmpty = "";
+ border = "";
+ };
+};
+
+
+class cse_gui_listNBox {
+ access = 0;
+ type = CT_LISTNBOX;// 102;
+ style =ST_MULTI;
+ w = 0.4;
+ h = 0.4;
+ font = FontCSE;
+ sizeEx = 0.031;
+
+ autoScrollSpeed = -1;
+ autoScrollDelay = 5;
+ autoScrollRewind = 0;
+ arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
+ arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
+ columns[] = {0.0};
+ color[] = {1, 1, 1, 1};
+
+ rowHeight = 0.03;
+ colorBackground[] = {0, 0, 0, 0.2};
+ colorText[] = {1,1, 1, 1.0};
+ colorScrollbar[] = {0.95, 0.95, 0.95, 1};
+ colorSelect[] = {0.95, 0.95, 0.95, 1};
+ colorSelect2[] = {0.95, 0.95, 0.95, 1};
+ colorSelectBackground[] = {0, 0, 0, 0.0};
+ colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
+ colorActive[] = {0,0,0,1};
+ colorDisabled[] = {0,0,0,0.3};
+ rows = 1;
+
+ drawSideArrows = 0;
+ idcLeft = -1;
+ idcRight = -1;
+ maxHistoryDelay = 1;
+ soundSelect[] = {"", 0.1, 1};
+ period = 1;
+ shadow = 2;
+ class ScrollBar {
+ arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
+ arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
+ border = "#(argb,8,8,3)color(1,1,1,1)";
+ color[] = {1,1,1,0.6};
+ colorActive[] = {1,1,1,1};
+ colorDisabled[] = {1,1,1,0.3};
+ thumb = "#(argb,8,8,3)color(1,1,1,1)";
+ };
+ class ListScrollBar {
+ arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
+ arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
+ autoScrollDelay = 5;
+ autoScrollEnabled = 0;
+ autoScrollRewind = 0;
+ autoScrollSpeed = -1;
+ border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
+ color[] = {1,1,1,0.6};
+ colorActive[] = {1,1,1,1};
+ colorDisabled[] = {1,1,1,0.3};
+ height = 0;
+ scrollSpeed = 0.06;
+ shadow = 0;
+ thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
+ width = 0;
+ };
+};
+
+
+class RscCombo;
+class cse_gui_comboBoxBase: RscCombo {
+ idc = -1;
+ type = 4;
+ style = "0x10 + 0x200";
+ x = 0;
+ y = 0;
+ w = 0.3;
+ h = 0.035;
+ color[] = {0,0,0,0.6};
+ colorActive[] = {1,0,0,1};
+ colorBackground[] = {0,0,0,1};
+ colorDisabled[] = {1,1,1,0.25};
+ colorScrollbar[] = {1,0,0,1};
+ colorSelect[] = {0,0,0,1};
+ colorSelectBackground[] = {1,1,1,0.7};
+ colorText[] = {1,1,1,1};
+
+ arrowEmpty = "";
+ arrowFull = "";
+ wholeHeight = 0.45;
+ font = FontCSE;
+ sizeEx = 0.031;
+ soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect",0.1,1};
+ soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1};
+ soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1};
+ maxHistoryDelay = 1.0;
+ class ScrollBar
+ {
+ color[] = {0.3,0.3,0.3,0.6};
+ colorActive[] = {0.3,0.3,0.3,1};
+ colorDisabled[] = {0.3,0.3,0.3,0.3};
+ thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
+ arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
+ arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
+ border = "";
+ };
+ class ComboScrollBar {
+ arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
+ arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
+ autoScrollDelay = 5;
+ autoScrollEnabled = 0;
+ autoScrollRewind = 0;
+ autoScrollSpeed = -1;
+ border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
+ color[] = {0.3,0.3,0.3,0.6};
+ colorActive[] = {0.3,0.3,0.3,1};
+ colorDisabled[] = {0.3,0.3,0.3,0.3};
+ height = 0;
+ scrollSpeed = 0.06;
+ shadow = 0;
+ thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
+ width = 0;
+ };
+};
+
+
+
+class cse_gui_mapBase {
+ moveOnEdges = 1;
+ x = "SafeZoneXAbs";
+ y = "SafeZoneY + 1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ w = "SafeZoneWAbs";
+ h = "SafeZoneH - 1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ type = 100; // Use 100 to hide markers
+ style = 48;
+ shadow = 0;
+
+ ptsPerSquareSea = 5;
+ ptsPerSquareTxt = 3;
+ ptsPerSquareCLn = 10;
+ ptsPerSquareExp = 10;
+ ptsPerSquareCost = 10;
+ ptsPerSquareFor = 9;
+ ptsPerSquareForEdge = 9;
+ ptsPerSquareRoad = 6;
+ ptsPerSquareObj = 9;
+ showCountourInterval = 0;
+ scaleMin = 0.001;
+ scaleMax = 1.0;
+ scaleDefault = 0.16;
+ maxSatelliteAlpha = 0.85;
+ alphaFadeStartScale = 0.35;
+ alphaFadeEndScale = 0.4;
+ colorBackground[] = {0.969,0.957,0.949,1.0};
+ colorSea[] = {0.467,0.631,0.851,0.5};
+ colorForest[] = {0.624,0.78,0.388,0.5};
+ colorForestBorder[] = {0.0,0.0,0.0,0.0};
+ colorRocks[] = {0.0,0.0,0.0,0.3};
+ colorRocksBorder[] = {0.0,0.0,0.0,0.0};
+ colorLevels[] = {0.286,0.177,0.094,0.5};
+ colorMainCountlines[] = {0.572,0.354,0.188,0.5};
+ colorCountlines[] = {0.572,0.354,0.188,0.25};
+ colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6};
+ colorCountlinesWater[] = {0.491,0.577,0.702,0.3};
+ colorPowerLines[] = {0.1,0.1,0.1,1.0};
+ colorRailWay[] = {0.8,0.2,0.0,1.0};
+ colorNames[] = {0.1,0.1,0.1,0.9};
+ colorInactive[] = {1.0,1.0,1.0,0.5};
+ colorOutside[] = {0.0,0.0,0.0,1.0};
+ colorTracks[] = {0.84,0.76,0.65,0.15};
+ colorTracksFill[] = {0.84,0.76,0.65,1.0};
+ colorRoads[] = {0.7,0.7,0.7,1.0};
+ colorRoadsFill[] = {1.0,1.0,1.0,1.0};
+ colorMainRoads[] = {0.9,0.5,0.3,1.0};
+ colorMainRoadsFill[] = {1.0,0.6,0.4,1.0};
+ colorGrid[] = {0.1,0.1,0.1,0.6};
+ colorGridMap[] = {0.1,0.1,0.1,0.6};
+ colorText[] = {1, 1, 1, 0.85};
+font = "PuristaMedium";
+sizeEx = 0.0270000;
+stickX[] = {0.20, {"Gamma", 1.00, 1.50} };
+stickY[] = {0.20, {"Gamma", 1.00, 1.50} };
+onMouseButtonClick = "";
+onMouseButtonDblClick = "";
+
+ fontLabel = "PuristaMedium";
+ sizeExLabel = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
+ fontGrid = "TahomaB";
+ sizeExGrid = 0.02;
+ fontUnits = "TahomaB";
+ sizeExUnits = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
+ fontNames = "PuristaMedium";
+ sizeExNames = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2";
+ fontInfo = "PuristaMedium";
+ sizeExInfo = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
+ fontLevel = "TahomaB";
+ sizeExLevel = 0.02;
+ text = "#(argb,8,8,3)color(1,1,1,1)";
+ class ActiveMarker {
+ color[] = {0.30, 0.10, 0.90, 1.00};
+ size = 50;
+ };
+ class Legend
+ {
+ x = "SafeZoneX + ( ((safezoneW / safezoneH) min 1.2) / 40)";
+ y = "SafeZoneY + safezoneH - 4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "3.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ font = "PuristaMedium";
+ sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
+ colorBackground[] = {1,1,1,0.5};
+ color[] = {0,0,0,1};
+ };
+ class Task
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa";
+ iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa";
+ iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
+ iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
+ iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
+ color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};
+ colorCreated[] = {1,1,1,1};
+ colorCanceled[] = {0.7,0.7,0.7,1};
+ colorDone[] = {0.7,1,0.3,1};
+ colorFailed[] = {1,0.3,0.2,1};
+ size = 27;
+ importance = 1;
+ coefMin = 1;
+ coefMax = 1;
+ };
+ class Waypoint
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
+ color[] = {0,0,0,1};
+ size = 20;
+ importance = "1.2 * 16 * 0.05";
+ coefMin = 0.900000;
+ coefMax = 4;
+ };
+ class WaypointCompleted
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa";
+ color[] = {0,0,0,1};
+ size = 20;
+ importance = "1.2 * 16 * 0.05";
+ coefMin = 0.900000;
+ coefMax = 4;
+ };
+ class CustomMark
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 1;
+ coefMax = 1;
+ color[] = {0,0,0,1};
+ };
+ class Command
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
+ size = 18;
+ importance = 1;
+ coefMin = 1;
+ coefMax = 1;
+ color[] = {1,1,1,1};
+ };
+ class Bush
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
+ color[] = {0.45,0.64,0.33,0.4};
+ size = "14/2";
+ importance = "0.2 * 14 * 0.05 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Rock
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa";
+ color[] = {0.1,0.1,0.1,0.8};
+ size = 12;
+ importance = "0.5 * 12 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class SmallTree
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
+ color[] = {0.45,0.64,0.33,0.4};
+ size = 12;
+ importance = "0.6 * 12 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Tree
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
+ color[] = {0.45,0.64,0.33,0.4};
+ size = 12;
+ importance = "0.9 * 16 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class busstop
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class fuelstation
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class hospital
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class church
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class lighthouse
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class power
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class powersolar
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class powerwave
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class powerwind
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class quay
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class shipwreck
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\shipwreck_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class transmitter
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class watertower
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {1,1,1,1};
+ };
+ class Cross
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {0,0,0,1};
+ };
+ class Chapel
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa";
+ size = 24;
+ importance = 1;
+ coefMin = 0.85;
+ coefMax = 1.0;
+ color[] = {0,0,0,1};
+ };
+ class Bunker
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
+ size = 14;
+ importance = "1.5 * 14 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+ class Fortress
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
+ size = 16;
+ importance = "2 * 16 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+ class Fountain
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa";
+ size = 11;
+ importance = "1 * 12 * 0.05";
+ coefMin = 0.25;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+ class Ruin
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa";
+ size = 16;
+ importance = "1.2 * 16 * 0.05";
+ coefMin = 1;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+ class Stack
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa";
+ size = 20;
+ importance = "2 * 16 * 0.05";
+ coefMin = 0.9;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+ class Tourism
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa";
+ size = 16;
+ importance = "1 * 16 * 0.05";
+ coefMin = 0.7;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+ class ViewTower
+ {
+ icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa";
+ size = 16;
+ importance = "2.5 * 16 * 0.05";
+ coefMin = 0.5;
+ coefMax = 4;
+ color[] = {0,0,0,1};
+ };
+};
+
+#endif
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/ui/menu.hpp b/TO_MERGE/cse/sys_medical/ui/menu.hpp
new file mode 100644
index 0000000000..a9ce19d32e
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/ui/menu.hpp
@@ -0,0 +1,612 @@
+class cse_sys_medicalMenu {
+ idd = 314412;
+ movingEnable = true;
+ onLoad = "uiNamespace setVariable ['cse_sys_medicalMenu', _this select 0]; ['cse_sys_medical', true] call cse_fnc_gui_blurScreen; [_this select 0] spawn cse_fnc_onMenuOpen_CMS;";
+ onUnload = " ['cse_sys_medical', false] call cse_fnc_gui_blurScreen; ['cse_onMenuOpen_CMS', 'onEachFrame'] call BIS_fnc_removeStackedEventHandler;";
+
+ class controlsBackground {
+
+ class HeaderBackground: cse_gui_backgroundBase{
+ idc = -1;
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ text = "#(argb,8,8,3)color(0,0,0,0)";
+ //moving = 1;
+ };
+ class CenterBackground: HeaderBackground {
+ /*x = 0.138;
+ y = 0.17;
+ w = 1.2549;
+ h = 0.836601;*/
+ y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ h = "16 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ //text = "#(argb,8,8,3)color(0,0,0,0.65)";
+ //text = "cse\cse_sys_medical\data\ui_background.paa";
+ text = "#(argb,8,8,3)color(0,0,0,0.8)";
+ colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
+ colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
+ };
+ class BottomBackground: CenterBackground {
+ y = "(18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
+ h = "9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ };
+ };
+
+ class controls {
+ class HeaderName {
+ idc = 1;
+ type = CT_STATIC;
+ x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ style = ST_LEFT + ST_SHADOW;
+ font = "PuristaMedium";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ colorText[] = {0.95, 0.95, 0.95, 0.75};
+ colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
+ text = "";
+ };
+
+ class IconsBackGroundBar: cse_gui_backgroundBase{
+ idc = -1;
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "3.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ //text = "#(argb,8,8,3)color(0,0,0,0.4)";
+ text ="cse\cse_sys_medical\data\cse_background_img.paa";
+ colorText[] = {1, 1, 1, 0.0};
+ //moving = 1;
+ };
+ class CatagoryLeft: HeaderName {
+ x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ style = ST_CENTER;
+ //colorText[] = {0.6, 0.7, 1.0, 1};
+ colorText[] = {1, 1, 1.0, 0.9};
+ colorBackground[] = {0,0,0,0};
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
+ text = $STR_CSE_UI_EXAMINE_TREATMENT;
+ };
+ class CatagoryCenter: CatagoryLeft {
+ x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = $STR_CSE_UI_STATUS;
+ };
+ class CatagoryRight: CatagoryCenter{
+ x = "25.66 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = $STR_CSE_UI_OVERVIEW;
+ };
+ class Line: cse_gui_backgroundBase {
+ idc = -1;
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "3.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "37 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "0.03 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ text = "#(argb,8,8,3)color(1,1,1,0.5)";
+ };
+
+ class iconImg1: cse_gui_backgroundBase {
+ idc = 111;
+ x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.1)";
+ colorBackground[] = {0,0,0,1};
+ colorPicture[] = {1,1,1,1};
+ colorText[] = {1,1,1,1};
+ text = "cse\cse_sys_medical\data\icons\triage_card_small.paa";
+ };
+ class iconImg2: iconImg1 {
+ idc = 112;
+ x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\examine_patient_small.paa";
+ };
+ class iconImg3: iconImg1 {
+ idc = 113;
+ x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\bandage_fracture_small.paa";
+ };
+ class iconImg4: iconImg1 {
+ idc = 114;
+ x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\medication_small.paa";
+ };
+ class iconImg5: iconImg1 {
+ idc = 115;
+ x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\airway_management_small.paa";
+ };
+ class iconImg6: iconImg1 {
+ idc = 116;
+ x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\advanced_treatment_small.paa";
+ };
+ class iconImg7: iconImg1 {
+ idc = 117;
+ x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\icon_carry.paa"; // to be replaced later on!
+ };
+ class iconImg8: iconImg1 {
+ idc = 118;
+ x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = "cse\cse_sys_medical\data\icons\toggle_self_small.paa";
+ };
+
+
+ class BtnIconLeft1: cse_gui_buttonBase {
+ idc = 11;
+ x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.1)";
+ /*animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.3)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.1)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.95)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.2)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.3)";*/
+
+ animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)";
+ action = "['triage'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft2: BtnIconLeft1 {
+ idc = 12;
+ x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['examine'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft3: BtnIconLeft1 {
+ idc = 13;
+ x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['bandage'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft4: BtnIconLeft1 {
+ idc = 14;
+ x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['medication'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft5: BtnIconLeft1 {
+ idc = 15;
+ x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['airway'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft6: BtnIconLeft1 {
+ idc = 16;
+ x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['advanced'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft7: BtnIconLeft1 {
+ idc = 17;
+ x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['drag'] call cse_fnc_displayOptions_CMS;";
+ };
+ class BtnIconLeft8: BtnIconLeft1 {
+ idc = 18;
+ x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "['toggle'] call cse_fnc_displayOptions_CMS;";
+ };
+
+
+ class TriageCardList: cse_gui_listBoxBase {
+ idc = 212;
+ x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
+ rowHeight = 0.03;
+ colorBackground[] = {0, 0, 0, 0.2};
+ colorText[] = {1,1, 1, 1.0};
+ colorScrollbar[] = {0.95, 0.95, 0.95, 1};
+ colorSelect[] = {0.95, 0.95, 0.95, 1};
+ colorSelect2[] = {0.95, 0.95, 0.95, 1};
+ colorSelectBackground[] = {0, 0, 0, 0.0};
+ colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
+ };
+
+
+ // Left side
+ class BtnMenu1: BtnIconLeft1 {
+ idc = 20;
+ y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ text = "";
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
+ animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
+ animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
+ animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
+ animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
+ animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
+ color[] = {1, 1, 1, 1};
+ color2[] = {0,0,0, 1};
+ colorBackgroundFocused[] = {1,1,1,1};
+ colorBackground[] = {1,1,1,1};
+ colorbackground2[] = {1,1,1,1};
+ colorDisabled[] = {0.5,0.5,0.5,0.8};
+ colorFocused[] = {0,0,0,1};
+ periodFocus = 1;
+ periodOver = 1;
+ /*animTextureNormal = "cse\cse_sys_medical\data\cse_background_img.paa";
+ animTextureDisabled = "cse\cse_sys_medical\data\cse_background_img.paa";
+ animTextureOver = "cse\cse_sys_medical\data\cse_background_img.paa";
+ animTextureFocused = "cse\cse_sys_medical\data\cse_background_img.paa";
+ animTexturePressed = "cse\cse_sys_medical\data\cse_background_img.paa";
+ animTextureDefault = "cse\cse_sys_medical\data\cse_background_img.paa";*/
+
+ action = "";
+ };
+ class BtnMenu2: BtnMenu1 {
+ idc = 21;
+ y = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text = "";
+ };
+ class BtnMenu3: BtnMenu1 {
+ idc = 22;
+ y = "7.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text = "";
+ };
+ class BtnMenu4: BtnMenu1 {
+ idc = 23;
+ y = "8.7 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text ="";
+ };
+ class BtnMenu5: BtnMenu1 {
+ idc = 24;
+ y = "9.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text = "";
+ };
+ class BtnMenu6: BtnMenu1 {
+ idc = 25;
+ y = "10.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text = "";
+ };
+ class BtnMenu7: BtnMenu1 {
+ idc = 26;
+ y = "12 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text = "";
+ };
+ class BtnMenu8: BtnMenu1 {
+ idc = 27;
+ y = "13.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ text = "";
+ };
+
+
+
+ // center
+
+ class bodyImgBackground: cse_gui_backgroundBase {
+ idc = -1;
+ x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "12.33 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
+ colorBackground[] = {1,1,1,1};
+ colorPicture[] = {1,1,1,1};
+ colorText[] = {1,1,1,1};
+ text = "cse\cse_sys_medical\data\body_background.paa";
+ };
+ class bodyImgHead: bodyImgBackground {
+ idc = 50;
+ x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "3.73 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "12.33 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
+ colorBackground[] = {1,1,1,1};
+ colorPicture[] = {1,1,1,1};
+ colorText[] = {1,1,1,1};
+ text = "cse\cse_sys_medical\data\body_head.paa";
+ };
+
+ class bodyImgTorso: bodyImgHead {
+ idc = 51;
+ text = "cse\cse_sys_medical\data\body_torso.paa";
+ };
+ class bodyImgArms_l: bodyImgHead {
+ idc = 52;
+ text = "cse\cse_sys_medical\data\body_arm_left.paa";
+ };
+ class bodyImgArms_r: bodyImgHead {
+ idc = 53;
+ text = "cse\cse_sys_medical\data\body_arm_right.paa";
+ };
+ class bodyImgLegs_l: bodyImgHead {
+ idc = 54;
+ text = "cse\cse_sys_medical\data\body_leg_left.paa";
+ };
+ class bodyImgLegs_r: bodyImgHead {
+ idc = 55;
+ text = "cse\cse_sys_medical\data\body_leg_right.paa";
+ };
+
+
+ class selectHead: cse_gui_buttonBase {
+ idc = 301;
+ x = "18.8 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "3.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "1.4 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.1)";
+ /*animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.4)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.4)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.99)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.99)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.4)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.4)";*/
+
+ animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)";
+ action = "CSE_SELECTED_BODY_PART_CMS = 'head'; [CSE_SYS_MEDICAL_INTERACTION_TARGET] spawn cse_fnc_updateUIInfo_CMS;";
+ };
+ class selectTorso : selectHead {
+ idc = 302;
+ x = "18.4 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "5.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "2.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "4.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ action = "CSE_SELECTED_BODY_PART_CMS = 'body'; [CSE_SYS_MEDICAL_INTERACTION_TARGET] spawn cse_fnc_updateUIInfo_CMS;";
+ };
+ class selectLeftArm: selectHead{
+ idc = 303;
+ x = "17.4 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "5.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "4.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ action = "CSE_SELECTED_BODY_PART_CMS = 'hand_r'; [CSE_SYS_MEDICAL_INTERACTION_TARGET] spawn cse_fnc_updateUIInfo_CMS;";
+ };
+ class selectRightArm: selectLeftArm{
+ idc = 304;
+ x = "20.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "CSE_SELECTED_BODY_PART_CMS = 'hand_l'; [CSE_SYS_MEDICAL_INTERACTION_TARGET] spawn cse_fnc_updateUIInfo_CMS;";
+ };
+ class selectLeftLeg :selectHead {
+ idc = 305;
+ x = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "9.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "1.1 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ action = "CSE_SELECTED_BODY_PART_CMS = 'leg_r'; [CSE_SYS_MEDICAL_INTERACTION_TARGET] spawn cse_fnc_updateUIInfo_CMS;";
+ };
+ class selectRightLeg :selectLeftLeg {
+ idc = 306;
+ x = "19.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = "CSE_SELECTED_BODY_PART_CMS = 'leg_l'; [CSE_SYS_MEDICAL_INTERACTION_TARGET] spawn cse_fnc_updateUIInfo_CMS;";
+ };
+
+
+ class TriageTextBottom: HeaderName {
+ idc = 2000;
+ x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "16.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ style = ST_CENTER;
+ colorText[] = {1, 1, 1.0, 1};
+ colorBackground[] = {0,0.0,0.0,0.7};
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ text = "";
+ };
+
+
+
+ // Right side
+
+ class InjuryList: cse_gui_listBoxBase {
+ idc = 213;
+ x = "25.66 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "5.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
+ rowHeight = 0.03;
+ colorBackground[] = {0, 0, 0, 0.2};
+ colorText[] = {1,1, 1, 1.0};
+ colorScrollbar[] = {0.95, 0.95, 0.95, 1};
+ colorSelect[] = {0.95, 0.95, 0.95, 1};
+ colorSelect2[] = {0.95, 0.95, 0.95, 1};
+ colorSelectBackground[] = {0, 0, 0, 0.0};
+ colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
+ };
+
+ // bottom
+
+ // activity log
+
+ class ActivityLogHeader: CatagoryLeft {
+ x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "18.6 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ style = ST_CENTER;
+ colorText[] = {0.6, 0.7, 1.0, 1};
+ colorBackground[] = {0,0,0,0};
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ text = $STR_CSE_UI_ACTIVITY_LOG;
+ };
+ class QuickViewHeader: ActivityLogHeader {
+ x = "19.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = $STR_CSE_UI_QUICK_VIEW;
+ };
+ class LineBottomHeaders: Line {
+ y = "19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ };
+ class ActivityLog: InjuryList {
+ idc = 214;
+ style = 16;
+ type = 102;
+ rows=1;
+ colorBackground[] = {0, 0, 0, 1};
+ x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "(19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
+ w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
+ colorSelectBackground[] = {0, 0, 0, 0.0};
+ colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
+ columns[] = {0.0, 0.08};
+ canDrag=true;
+ arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
+ arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
+ drawSideArrows = 0;
+ idcLeft = -1;
+ idcRight = -1;
+ };
+
+ class QuikViewLog: InjuryList {
+ idc = 215;
+ style = 16;
+ type = 102;
+ rows=1;
+ colorBackground[] = {0, 0, 0, 1};
+ x = "21.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "(19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
+ w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "6.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
+ colorSelectBackground[] = {0, 0, 0, 0.0};
+ colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
+
+ columns[] = {0.0, 0.08};
+ canDrag=true;
+ arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
+ arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
+ drawSideArrows = 0;
+ idcLeft = -1;
+ idcRight = -1;
+ };
+
+ class selectTriageStatus: cse_gui_buttonBase {
+ idc = 2001;
+ x = "13.33 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ y = "16.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
+ w = "12.33 * (((safezoneW / safezoneH) min 1.2) / 40)";
+ h = "1.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
+ style = ST_CENTER;
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.4)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.0)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.0)";
+ action = "[] call cse_fnc_dropDownTriageCard_CMS;";
+ };
+ class selectTriageStatusNone: selectTriageStatus {
+ idc = 2002;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_CSE_UI_TRIAGE_NONE;
+ style = ST_CENTER;
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)";
+ action = "[] call cse_fnc_dropDownTriageCard_CMS; [CSE_SYS_MEDICAL_INTERACTION_TARGET,0] call cse_fnc_setTriageStatus_CMS;";
+ };
+
+ class selectTriageStatusMinor: selectTriageStatus {
+ idc = 2003;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_CSE_UI_TRIAGE_MINOR;
+ style = ST_CENTER;
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ animTextureNormal = "#(argb,8,8,3)color(0,0.5,0,0.9)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0.5,0,0.9)";
+ animTextureOver = "#(argb,8,8,3)color(0,0.5,0,0.9)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0.5,0,0.9)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0.5,0,0.9)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0.5,0,0.9)";
+ action = "[] call cse_fnc_dropDownTriageCard_CMS; [CSE_SYS_MEDICAL_INTERACTION_TARGET,1] call cse_fnc_setTriageStatus_CMS;";
+ };
+ class selectTriageStatusDelayed: selectTriageStatus {
+ idc = 2004;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_CSE_UI_TRIAGE_DELAYED;
+ style = ST_CENTER;
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ animTextureNormal = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
+ animTextureDisabled = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
+ animTextureOver = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
+ animTextureFocused = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
+ animTexturePressed = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
+ animTextureDefault = "#(argb,8,8,3)color(0.77,0.51,0.08,0.9)";
+ action = "[] call cse_fnc_dropDownTriageCard_CMS; [CSE_SYS_MEDICAL_INTERACTION_TARGET,2] call cse_fnc_setTriageStatus_CMS;";
+ };
+ class selectTriageStatusImmediate: selectTriageStatus {
+ idc = 2005;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_CSE_UI_TRIAGE_IMMEDIATE;
+ style = ST_CENTER;
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ animTextureNormal = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
+ animTextureDisabled = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
+ animTextureOver = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
+ animTextureFocused = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
+ animTexturePressed = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
+ animTextureDefault = "#(argb,8,8,3)color(1,0.2,0.2,0.9)";
+ action = "[] call cse_fnc_dropDownTriageCard_CMS; [CSE_SYS_MEDICAL_INTERACTION_TARGET,3] call cse_fnc_setTriageStatus_CMS;";
+ };
+ class selectTriageStatusDeceased: selectTriageStatus {
+ idc = 2006;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_CSE_UI_TRIAGE_DECEASED;
+ style = ST_CENTER;
+ size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
+ animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureOver = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureFocused = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTexturePressed = "#(argb,8,8,3)color(0,0,0,0.9)";
+ animTextureDefault = "#(argb,8,8,3)color(0,0,0,0.9)";
+ action = "[] call cse_fnc_dropDownTriageCard_CMS; [CSE_SYS_MEDICAL_INTERACTION_TARGET,4] call cse_fnc_setTriageStatus_CMS;";
+ };
+ };
+};
\ No newline at end of file
diff --git a/TO_MERGE/cse/sys_medical/variable_defines.sqf b/TO_MERGE/cse/sys_medical/variable_defines.sqf
new file mode 100644
index 0000000000..ae8a5bf509
--- /dev/null
+++ b/TO_MERGE/cse/sys_medical/variable_defines.sqf
@@ -0,0 +1,61 @@
+waituntil {!isnil "cse_fnc_defineVariable"};
+// public variables
+
+ ["cse_injuryVector",[],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_treatedInjuryVector",[],true,"cms"] call cse_fnc_defineVariable;
+
+ ["cse_openWounds",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_bandagedWounds",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_fractures",[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_airway", 0, true, "cms"] call cse_fnc_defineVariable;
+ ["cse_tourniquets",[0,0,0,0,0,0],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_splints",[0,0,0,0,0,0],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_isBleeding_CMS",false,true,"cms"] call cse_fnc_defineVariable;
+ ["cse_hasPain_CMS",false,true,"cms"] call cse_fnc_defineVariable;
+ ["cse_hasLostBlood_CMS",false,true,"cms"] call cse_fnc_defineVariable;
+ ["cse_airwayTreated",false,true,"cms"] call cse_fnc_defineVariable;
+
+
+ // Airway
+ ["cse_airwayOccluded", false, true, "cms"] call cse_fnc_defineVariable;
+ ["cse_airwayRespiratoryArrest", false, true, "cms"] call cse_fnc_defineVariable;
+ ["cse_airwayCollapsed", false, true, "cms"] call cse_fnc_defineVariable;
+ ["cse_airwayStatus", 100, false, "cms"] call cse_fnc_defineVariable;
+
+ // logs
+ ["cse_quickviewLog_CMS",[],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_activityLog_CMS",[],true,"cms"] call cse_fnc_defineVariable;
+ ["cse_triageLevel",0,true,"cms"] call cse_fnc_defineVariable;
+ ["cse_triageCard",[],true,"cms"] call cse_fnc_defineVariable;
+
+
+ ["cse_medicClass",0,true,"cms_static",0,true] call cse_fnc_defineVariable; // should be a persistent variable; must not be removed by a reset all defaults call
+ ["cse_medical_facility",0,true,"cms_static",0,true] call cse_fnc_defineVariable; // should be a persistent variable; must not be removed by a reset all defaults call
+
+ ["cse_noInstantDeath",false,true,"cms"] call cse_fnc_defineVariable;
+ ["cse_cardiacArrest_CMS",false,true,"cms"] call cse_fnc_defineVariable;
+
+ // private variables
+ ["cse_bloodVolume",100,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_bloodIVVolume",0,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_plasmaIVVolume",0,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_salineIVVolume",0,false,"cms"] call cse_fnc_defineVariable;
+
+ ["cse_pain",0,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_heartRate",80,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_andrenaline",0,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_heartRateAdjustments",[],false,"cms"] call cse_fnc_defineVariable;
+
+ ["cse_bloodPressure", [80,120],false,"cms"] call cse_fnc_defineVariable;
+ ["cse_peripheralResistance", 100,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_cardiacOutput", 5.25,false,"cms"] call cse_fnc_defineVariable; // Source for default: http://en.wikipedia.org/wiki/Cardiac_output#Example_values
+
+
+ ["cse_givenMorphine",0,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_givenAtropine",0,false,"cms"] call cse_fnc_defineVariable;
+ ["cse_givenEpinephrine",0,false,"cms"] call cse_fnc_defineVariable;
+
+ ["cse_bodyPartStatus",[0,0,0,0,0,0],false,"cms"] call cse_fnc_defineVariable;
+ ["cse_bodyPartStatusPrevious_cms",[0,0,0,0,0,0],false,"cms"] call cse_fnc_defineVariable;
+
+ ["cse_fnc_unitLoop_CMS",false,false,"cms"] call cse_fnc_defineVariable;