diff --git a/addons/medical/$PBOPREFIX$ b/addons/medical/$PBOPREFIX$
new file mode 100644
index 0000000000..03a98be3f5
--- /dev/null
+++ b/addons/medical/$PBOPREFIX$
@@ -0,0 +1 @@
+z\ace\Addons\medical
\ No newline at end of file
diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp
new file mode 100644
index 0000000000..5aa6bec888
--- /dev/null
+++ b/addons/medical/CfgEventHandlers.hpp
@@ -0,0 +1,35 @@
+class Extended_PreInit_EventHandlers {
+ class ADDON {
+ init = QUOTE( call compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(XEH_preInit.sqf))));
+ };
+};
+
+class Extended_PostInit_EventHandlers {
+ class ADDON {
+ init = QUOTE( call compile preprocessFileLineNumbers QUOTE(QUOTE(PATHTOF(XEH_postInit.sqf))));
+ };
+};
+
+
+class Extended_Killed_Eventhandlers {
+ class CaManBase {
+ class ADDON {
+ Killed = QUOTE(_this call FUNC(eh_killed));
+ };
+ };
+};
+
+class Extended_Local_Eventhandlers {
+ class CaManBase {
+ class ADDON {
+ Local = QUOTE(_this call FUNC(eh_local));
+ };
+ };
+};
+class Extended_Init_Eventhandlers {
+ class CaManBase {
+ class ADDON {
+ init = QUOTE(_this call FUNC(onInitForUnit););
+ };
+ };
+};
diff --git a/addons/medical/CfgFactionClasses.hpp b/addons/medical/CfgFactionClasses.hpp
new file mode 100644
index 0000000000..35f77aedb1
--- /dev/null
+++ b/addons/medical/CfgFactionClasses.hpp
@@ -0,0 +1,7 @@
+class CfgFactionClasses
+{
+ class NO_CATEGORY;
+ class ACE_medical: NO_CATEGORY {
+ displayName = "ACE Medical";
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/CfgHints.hpp b/addons/medical/CfgHints.hpp
new file mode 100644
index 0000000000..2c6409536d
--- /dev/null
+++ b/addons/medical/CfgHints.hpp
@@ -0,0 +1,38 @@
+class CfgHints
+{
+ class Combat_Space_Enhancement
+ {
+ displayName = "Combat Space Enhancement";
+ class ACE_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/addons/medical/CfgSounds.hpp b/addons/medical/CfgSounds.hpp
new file mode 100644
index 0000000000..de25bda65d
--- /dev/null
+++ b/addons/medical/CfgSounds.hpp
@@ -0,0 +1,45 @@
+class CfgSounds
+{
+ class GVAR(heartbeat_fast_1)
+ {
+ name = QGVAR(heartbeat_fast_1);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_1.wav)),"db-1",1};
+ titles[] = {};
+ };
+ class GVAR(heartbeat_fast_2)
+ {
+ name = QGVAR(heartbeat_fast_2);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_2.wav)),"db-1",1};
+ titles[] = {};
+ };
+ class GVAR(heartbeat_fast_3)
+ {
+ name = QGVAR(heartbeat_fast_3);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_3.wav)),"db-1",1};
+ titles[] = {};
+ };
+ class GVAR(heartbeat_norm_1)
+ {
+ name = QGVAR(heartbeat_norm_1);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_1.wav)),"db-1",1};
+ titles[] = {};
+ };
+ class GVAR(heartbeat_norm_2)
+ {
+ name = QGVAR(heartbeat_norm_2);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_2.wav)),"db-1",1};
+ titles[] = {};
+ };
+ class GVAR(heartbeat_slow_1)
+ {
+ name = QGVAR(heartbeat_slow_1);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_1.wav)),"db-1",1};
+ titles[] = {};
+ };
+ class GVAR(heartbeat_slow_2)
+ {
+ name = QGVAR(heartbeat_slow_2);
+ sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_2.wav)),"db-1",1};
+ titles[] = {};
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp
new file mode 100644
index 0000000000..f6e248eb30
--- /dev/null
+++ b/addons/medical/CfgVehicles.hpp
@@ -0,0 +1,782 @@
+class CfgVehicles
+{
+ class Logic;
+ class Module_F: Logic {
+ class ArgumentsBaseUnits {
+ };
+ };
+ class ACE_moduleCombatMedicalSystem: Module_F {
+ scope = 2;
+ displayName = "Combat Medical System [ACE]";
+ icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
+ category = "ACE_medical";
+ function = QUOTE(FUNC(initalizeModuleCMS));
+ functionPriority = 1;
+ isGlobal = 1;
+ isTriggerActivated = 0;
+ author = "Glowbal";
+ class Arguments {
+ class advancedLevel {
+ displayName = "Advanced Level";
+ description = "How advanced can the medical system be?";
+ typeName = "NUMBER";
+ class values {
+ class basic {
+ name = "Basic. Only bleeding and pain.";
+ value = 0;
+ default = 1;
+ };
+ class normal {
+ name = "Normal. Bleeding, Pain, Blood pressure and heart rate";
+ value = 1;
+ };
+ class full {
+ name = "Full. Everything enabled.";
+ value = 2;
+ };
+ };
+ };
+ 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 mediACEtting {
+ 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 ACE_moduleAssignMedicRoles: Module_F {
+ scope = 2;
+ displayName = "Set Medic Class [ACE]";
+ icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
+ category = "ACE_medical";
+ function = QUOTE(FUNC(assignMedicRoles));
+ functionPriority = 10;
+ isGlobal = 2;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "Glowbal";
+ 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 ACE medic class to a unit"; // Short description, will be formatted as structured text
+ sync[] = {};
+ };
+ };
+
+ class ACE_moduleAssignMedicalVehicle: Module_F {
+ scope = 2;
+ displayName = "set Medical Vehicle [ACE]";
+ icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
+ category = "ACE_medical";
+ function = QUOTE(FUNC(assignMedicalVehicle));
+ functionPriority = 10;
+ isGlobal = 2;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "Glowbal";
+ 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 ACE medical vehicle class to a vehicle.";
+ sync[] = {};
+ };
+ };
+
+ class ACE_moduleAssignMedicalFacility: Module_F {
+ scope = 2;
+ displayName = "Set Medical Facility [ACE]";
+ icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
+ category = "ACE_medical";
+ function = QUOTE(FUNC(assignMedicalFacility));
+ functionPriority = 10;
+ isGlobal = 2;
+ isTriggerActivated = 0;
+ isDisposable = 0;
+ author = "Glowbal";
+ 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 ACE_moduleAssignMedicalEquipment: Module_F {
+ scope = 2;
+ displayName = "Assign Medical Equipment [ACE]";
+ icon = QUOTE(PATHTOF(data\ACE_medical_module.paa));
+ category = "ACE_medical";
+ function = QUOTE(FUNC(assignMedicalEquipment));
+ functionPriority = 1;
+ isGlobal = 1;
+ isTriggerActivated = 0;
+ author = "Glowbal";
+ 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 ACE_bodyBag: MapBoard_altis_F {
+ scope = 1;
+ side = -1;
+ model = QUOTE(PATHTOF(equipment\bodybag.p3d));
+ icon = "";
+ displayName = $STR_ACE_MAG_BODYBAG_DISPLAY;
+ };
+
+
+ class Item_Base_F;
+ class ACE_bandage_basicItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_BANDAGE_BASIC_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_bandage_basic
+ {
+ name = "ACE_bandage_basic";
+ count = 1;
+ };
+ };
+ };
+ class ACE_packing_bandageItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_PACKING_BANDAGE_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_packing_bandage
+ {
+ name = "ACE_packing_bandage";
+ count = 1;
+ };
+ };
+ };
+ class ACE_bandageElasticItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_BANDAGE_ELASTIC_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_bandageElastic
+ {
+ name = "ACE_bandageElastic";
+ count = 1;
+ };
+ };
+ };
+ class ACE_tourniquetItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_TOURNIQUET_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_tourniquet
+ {
+ name = "ACE_tourniquet";
+ count = 1;
+ };
+ };
+ };
+ class ACE_splintItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_SPLINT_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_splint
+ {
+ name = "ACE_splint";
+ count = 1;
+ };
+ };
+ };
+ class ACE_morphineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_MORPHINE_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_morphine
+ {
+ name = "ACE_morphine";
+ count = 1;
+ };
+ };
+ };
+ class ACE_atropineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_ATROPINE_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_atropine
+ {
+ name = "ACE_atropine";
+ count = 1;
+ };
+ };
+ };
+ class ACE_epinephrineItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_EPINEPHRINE_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_epinephrine
+ {
+ name = "ACE_epinephrine";
+ count = 1;
+ };
+ };
+ };
+ class ACE_plasma_ivItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_PLASMA_IV;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_plasma_iv
+ {
+ name = "ACE_plasma_iv";
+ count = 1;
+ };
+ };
+ };
+ class ACE_plasma_iv_500Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_PLASMA_IV_500;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_plasma_iv_500
+ {
+ name = "ACE_plasma_iv_500";
+ count = 1;
+ };
+ };
+ };
+ class ACE_plasma_iv_250Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_PLASMA_IV_250;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_plasma_iv_250
+ {
+ name = "ACE_plasma_iv_250";
+ count = 1;
+ };
+ };
+ };
+ class ACE_blood_ivItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_BLOOD_IV;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_blood_iv
+ {
+ name = "ACE_blood_iv";
+ count = 1;
+ };
+ };
+ };
+ class ACE_blood_iv_500Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_BLOOD_IV_500;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_blood_iv_500
+ {
+ name = "ACE_blood_iv_500";
+ count = 1;
+ };
+ };
+ };
+ class ACE_blood_iv_250Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_BLOOD_IV_250;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_blood_iv_250
+ {
+ name = "ACE_blood_iv_250";
+ count = 1;
+ };
+ };
+ };
+ class ACE_saline_ivItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_SALINE_IV;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_saline_iv
+ {
+ name = "ACE_saline_iv";
+ count = 1;
+ };
+ };
+ };
+ class ACE_saline_iv_500Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_SALINE_IV_500;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_saline_iv_500
+ {
+ name = "ACE_saline_iv_500";
+ count = 1;
+ };
+ };
+ };
+ class ACE_saline_iv_250Item: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_SALINE_IV_250;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_saline_iv_250
+ {
+ name = "ACE_saline_iv_250";
+ count = 1;
+ };
+ };
+ };
+ class ACE_quikclotItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_QUIKCLOT_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_quikclot
+ {
+ name = "ACE_quikclot";
+ count = 1;
+ };
+ };
+ };
+ class ACE_nasopharyngeal_tubeItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_NPA_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_nasopharyngeal_tube
+ {
+ name = "ACE_nasopharyngeal_tube";
+ count = 1;
+ };
+ };
+ };
+ class ACE_opaItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_OPA_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_opa
+ {
+ name = "ACE_opa";
+ count = 1;
+ };
+ };
+ };
+ class ACE_liquidSkinItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_LIQUID_SKIN_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_liquidSkin
+ {
+ name = "ACE_liquidSkin";
+ count = 1;
+ };
+ };
+ };
+ class ACE_chestsealItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_CHEST_SEAL_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_chestseal
+ {
+ name = "ACE_chestseal";
+ count = 1;
+ };
+ };
+ };
+ class ACE_personal_aid_kitItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_AID_KIT_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_personal_aid_kit
+ {
+ name = "ACE_personal_aid_kit";
+ count = 1;
+ };
+ };
+ };
+ class ACE_bodyBagItem: Item_Base_F {
+ scope = 2;
+ scopeCurator = 2;
+ displayName = $STR_ACE_MAG_BODYBAG_DISPLAY;
+ author = "Glowbal";
+ vehicleClass = "Items";
+ class TransportItems
+ {
+ class ACE_itemBodyBag
+ {
+ name = "ACE_itemBodyBag";
+ count = 1;
+ };
+ };
+ };
+
+
+ class NATO_Box_Base;
+ class ACE_medical_supply_crate_cms : NATO_Box_Base {
+ scope = 2;
+ accuracy = 1000;
+ displayName = "Medical Supply Crate [ACE]";
+ model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
+ author = "Glowbal";
+ class TransportItems {
+ class ACE_bandage_basic {
+ name = "ACE_bandage_basic";
+ count = 25;
+ };
+ class ACE_packing_bandage {
+ name = "ACE_packing_bandage";
+ count = 25;
+ };
+ class ACE_tourniquet {
+ name = "ACE_tourniquet";
+ count = 25;
+ };
+ class ACE_splint {
+ name = "ACE_splint";
+ count = 25;
+ };
+ class ACE_plasma_iv {
+ name = "ACE_plasma_iv";
+ count = 25;
+ };
+ class ACE_plasma_iv_500 {
+ name = "ACE_plasma_iv_500";
+ count = 25;
+ };
+ class ACE_plasma_iv_250 {
+ name = "ACE_plasma_iv_250";
+ count = 25;
+ };
+ class ACE_blood_iv {
+ name = "ACE_blood_iv";
+ count = 25;
+ };
+ class ACE_blood_iv_500 {
+ name = "ACE_blood_iv_500";
+ count = 25;
+ };
+ class ACE_blood_iv_250 {
+ name = "ACE_blood_iv_250";
+ count = 25;
+ };
+ class ACE_saline_iv {
+ name = "ACE_saline_iv";
+ count = 25;
+ };
+ class ACE_saline_iv_500 {
+ name = "ACE_saline_iv_500";
+ count = 25;
+ };
+ class ACE_saline_iv_250 {
+ name = "ACE_saline_iv_250";
+ count = 25;
+ };
+ class ACE_morphine {
+ name = "ACE_morphine";
+ count = 25;
+ };
+ class ACE_epinephrine {
+ name = "ACE_epinephrine";
+ count = 25;
+ };
+ class ACE_atropine {
+ name = "ACE_atropine";
+ count = 25;
+ };
+ class ACE_quikclot {
+ name = "ACE_quikclot";
+ count = 25;
+ };
+ class ACE_nasopharyngeal_tube {
+ name = "ACE_nasopharyngeal_tube";
+ count = 25;
+ };
+ class ACE_bandageElastic {
+ name = "ACE_bandageElastic";
+ count = 25;
+ };
+ class ACE_liquidSkin {
+ name = "ACE_liquidSkin";
+ count = 25;
+ };
+ class ACE_chestseal {
+ name = "ACE_chestseal";
+ count = 25;
+ };
+ class ACE_personal_aid_kit {
+ name = "ACE_personal_aid_kit";
+ count = 25;
+ };
+ class ACE_surgical_kit {
+ name = "ACE_surgical_kit";
+ count = 25;
+ };
+ class ACE_itemBodyBag {
+ name = "ACE_itemBodyBag";
+ count = 5;
+ };
+ };
+ };
+};
diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp
new file mode 100644
index 0000000000..34636cf0fb
--- /dev/null
+++ b/addons/medical/CfgWeapons.hpp
@@ -0,0 +1,317 @@
+class CfgWeapons {
+ class ItemCore;
+ class InventoryItem_Base_F;
+ class ACE_bandage_basic: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_BANDAGE_BASIC_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\field_dressing.paa));
+ model = QUOTE(PATHTOF(equipment\bandages\fielddressing.p3d));
+ descriptionShort = $STR_ACE_MAG_BANDAGE_BASIC_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_BANDAGE_BASIC_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=0.5;
+ type=201;
+ };
+ };
+ class ACE_packing_bandage: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_PACKING_BANDAGE_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\packing_bandage.paa));
+ model = QUOTE(PATHTOF(equipment\bandages\packingbandage.p3d));
+ descriptionShort = $STR_ACE_MAG_PACKING_BANDAGE_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_PACKING_BANDAGE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_bandageElastic: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_BANDAGE_ELASTIC_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\bandageElastic.paa));
+ model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
+ descriptionShort = $STR_ACE_MAG_BANDAGE_ELASTIC_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_BANDAGE_ELASTIC_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_tourniquet: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_TOURNIQUET_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\tourniquet.paa));
+ model = QUOTE(PATHTOF(equipment\Tourniquet.p3d));
+ descriptionShort = $STR_ACE_MAG_TOURNIQUET_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_TOURNIQUET_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_splint: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_SPLINT_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\splint.paa));
+ descriptionUse = $STR_ACE_MAG_SPLINT_DESC_USE;
+ descriptionShort = $STR_ACE_MAG_SPLINT_DESC_SHORT;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_morphine: ItemCore
+ {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_MORPHINE_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\morphine.paa));
+ model = QUOTE(PATHTOF(equipment\Morphinpen.p3d));
+ descriptionShort = $STR_ACE_MAG_MORPHINE_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_MORPHINE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_atropine: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_ATROPINE_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\atropine.paa));
+ model = QUOTE(PATHTOF(equipment\Atropin-pen.p3d));
+ descriptionShort = $STR_ACE_MAG_ATROPINE_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_ATROPINE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_epinephrine: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_EPINEPHRINE_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\epinephrine.paa));
+ model = QUOTE(PATHTOF(equipment\Epipen.p3d));
+ descriptionShort = $STR_ACE_MAG_EPINEPHRINE_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_EPINEPHRINE_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_plasma_iv: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ displayName = $STR_ACE_MAG_PLASMA_IV;
+ picture = QUOTE(PATHTOF(equipment\img\plasma_iv.paa));
+ descriptionShort = $STR_ACE_MAG_PLASMA_IV_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_PLASMA_IV_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_plasma_iv_500: ACE_plasma_iv {
+ displayName = $STR_ACE_MAG_PLASMA_IV_500;
+ };
+ class ACE_plasma_iv_250: ACE_plasma_iv_500 {
+ displayName = $STR_ACE_MAG_PLASMA_IV_250;
+ };
+ class ACE_blood_iv: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ model = "\A3\Structures_F_EPA\Items\Medical\BloodBag_F.p3d";
+ displayName = $STR_ACE_MAG_BLOOD_IV;
+ picture = QUOTE(PATHTOF(equipment\img\bloodbag.paa));
+ descriptionShort = $STR_ACE_MAG_BLOOD_IV_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_BLOOD_IV_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_blood_iv_500: ACE_blood_iv {
+ displayName = $STR_ACE_MAG_BLOOD_IV_500;
+ };
+ class ACE_blood_iv_250: ACE_blood_iv_500 {
+ displayName = $STR_ACE_MAG_BLOOD_IV_250;
+ };
+ class ACE_saline_iv: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ displayName = $STR_ACE_MAG_SALINE_IV;
+ picture = QUOTE(PATHTOF(equipment\img\saline_iv.paa));
+ descriptionShort = $STR_ACE_MAG_SALINE_IV_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_SALINE_IV_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_saline_iv_500: ACE_saline_iv {
+ displayName = $STR_ACE_MAG_SALINE_IV_500;
+ };
+ class ACE_saline_iv_250: ACE_saline_iv_500 {
+ displayName = $STR_ACE_MAG_SALINE_IV_250;
+ };
+ class ACE_quikclot: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_QUIKCLOT_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\quickclot.paa));
+ descriptionShort = $STR_ACE_MAG_QUIKCLOT_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_QUIKCLOT_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_nasopharyngeal_tube: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_NPA_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\nasopharyngeal_tube.paa));
+ descriptionUse = $STR_ACE_MAG_NPA_DESC_USE;
+ descriptionShort = $STR_ACE_MAG_NPA_DESC_SHORT;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_opa: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_OPA_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\nasopharyngeal_tube.paa));
+ descriptionShort = $STR_ACE_MAG_OPA_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_OPA_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_liquidSkin: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_LIQUID_SKIN_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\liquidSkin.paa));
+ model = QUOTE(PATHTOF(equipment\skinliquid.p3d));
+ descriptionShort = $STR_ACE_MAG_LIQUID_SKIN_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_LIQUID_SKIN_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_chestseal: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_CHEST_SEAL_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\chestseal.paa));
+ descriptionShort = $STR_ACE_MAG_CHEST_SEAL_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_CHEST_SEAL_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=1;
+ type=201;
+ };
+ };
+ class ACE_personal_aid_kit: ItemCore {
+ scope = 2;
+ value = 1;
+ count = 1;
+ type = 16;
+ displayName = $STR_ACE_MAG_AID_KIT_DISPLAY;
+ picture = QUOTE(PATHTOF(equipment\img\personal_aid_kit.paa));
+ model = QUOTE(PATHTOF(equipment\Personal-aidkits\MTP.p3d));
+ descriptionShort = $STR_ACE_MAG_AID_KIT_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_AID_KIT_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass=2;
+ type=201;
+ };
+ };
+ class ACE_surgical_kit: ItemCore
+ {
+ scope=2;
+ displayName= $STR_ACE_MAG_SURGICALKIT_DISPLAY;
+ model = QUOTE(PATHTOF(equipment\surgical_kit.p3d));
+ picture = QUOTE(PATHTOF(equipment\img\surgical_kit.paa));
+ descriptionShort = $STR_ACE_MAG_SURGICALKIT_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_SURGICALKIT_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass= 5;
+ type=201;
+ };
+ };
+ class ACE_itemBodyBag: ItemCore
+ {
+ scope=2;
+ displayName= $STR_ACE_MAG_BODYBAG_DISPLAY;
+ model = QUOTE(PATHTOF(equipment\bodybagItem.p3d));
+ picture = QUOTE(PATHTOF(equipment\img\bodybag.paa));
+ descriptionShort = $STR_ACE_MAG_BODYBAG_DESC_SHORT;
+ descriptionUse = $STR_ACE_MAG_BODYBAG_DESC_USE;
+ class ItemInfo: InventoryItem_Base_F
+ {
+ mass= 15;
+ type=201;
+ };
+ };
+};
diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf
new file mode 100644
index 0000000000..a2cb2ced08
--- /dev/null
+++ b/addons/medical/XEH_postInit.sqf
@@ -0,0 +1,217 @@
+/**
+ * XEH_postInit.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+#include "variable_defines.sqf"
+
+
+
+GVAR(injuredUnitCollection) = [];
+[{
+ {
+ if (!alive _x || !local _x) then {
+ GVAR(injuredUnitCollection) set [ _forEachIndex, ObjNull];
+ } else {
+ [_x] call FUNC(handleUnitVitals);
+
+ private "_pain";
+ _pain = _X getvariable [QGVAR(amountOfPain), 0];
+ if (_pain > 5 && (random(1) > 0.5)) then {
+ _x setvariable [QGVAR(amountOfPain), _pain + 0.002];
+ };
+ if (_pain > 45) then {
+ if (random(1) > 0.6) then {
+ [_X] call EFUNC(common,setUnconsciousState);
+ };
+ //[_X] call FUNC(playInjuredSound);
+ };
+ };
+ }foreach GVAR(injuredUnitCollection);
+ GVAR(injuredUnitCollection) = GVAR(injuredUnitCollection) - [ObjNull];
+}, 1, [] ] call CBA_fnc_addPerFrameHandler;
+
+[
+ {(([_this select 0,QGVAR(bloodVolume)] call EFUNC(common,getDefinedVariable)) < 65)},
+ {(([_this select 0,QGVAR(amountOfPain)] call EFUNC(common,getDefinedVariable)) > 48)}
+] call EFUNC(common,registerUnconsciousCondition);
+
+call FUNC(handleDisplayEffects);
+
+// Assigning all eventhandlers
+["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
+["onStartMovingUnit", FUNC(onStartMovingUnit)] call ace_common_fnc_addEventHandler;
+["onUnconscious", FUNC(onUnconscious)] call ace_common_fnc_addEventHandler;
+
+
+// Keybindings
+
+["ACE3",
+ localize "STR_ACE_OPEN_CMS_MENU_DESC",
+ { [] call FUNC(openMenu) },
+ [ 0, [false, false, false]],
+ false,
+ "keydown"] call cba_fnc_registerKeybind;
+
+
+
+// Adding the treatment options for all available medical equipment.
+
+// Advanced Treatment options
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_1000ml","STR_ACE_ACTION_BLOODIV_1000ML_TOOLTIP",'ACE_blood_iv');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_500ml","STR_ACE_ACTION_BLOODIV_500ML_TOOLTIP",'ACE_blood_iv_500');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_BLOODIV_250ml","STR_ACE_ACTION_BLOODIV_250ML_TOOLTIP",'ACE_blood_iv_250');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_1000ml","STR_ACE_ACTION_PLASMAIV_1000ML_TOOLTIP",'ACE_plasma_iv');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_500ml","STR_ACE_ACTION_PLASMAIV_500ML_TOOLTIP",'ACE_plasma_iv_500');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_PLASMAIV_250ml","STR_ACE_ACTION_PLASMAIV_250ML_TOOLTIP",'ACE_plasma_iv_250');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_1000ml","STR_ACE_ACTION_SALINEIV_1000ML_TOOLTIP",'ACE_saline_iv');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_500ml","STR_ACE_ACTION_SALINEIV_500ML_TOOLTIP",'ACE_saline_iv_500');
+ADD_TREATMENT_ADVANCED("STR_ACE_ACTION_SALINEIV_250ml","STR_ACE_ACTION_SALINEIV_250ML_TOOLTIP",'ACE_saline_iv_250');
+
+["STR_ACE_ACTION_PERSONAL_AID_KIT","STR_ACE_ACTION_PERSONAL_AID_KIT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+ if !([_this select 0,_this select 1, 'ACE_personal_aid_kit'] call FUNC(hasEquipment)) exitwith {
+ false;
+ };
+ _inMedFacility = ([_caller] call FUNC(inMedicalFacility));
+ _hasOpenWounds = ([_target] call FUNC(hasOpenWounds));
+
+ if ((GVAR(setting_aidKitRestrictions) == 0 && _inMedFacility) ||
+ (GVAR(setting_aidKitRestrictions) == 1 && _inMedFacility && (!_hasOpenWounds)) ||
+ (GVAR(setting_aidKitRestrictions) == 2) ||
+ (GVAR(setting_aidKitRestrictions) == 3 && (!_hasOpenWounds))) exitwith {
+
+ ((GVAR(setting_aidKitMedicsOnly) && [_caller] call FUNC(medicClass) || !GVAR(setting_aidKitMedicsOnly)));
+ };
+ false;
+},TREATMENT_ADVANCED('ACE_personal_aid_kit'),'advanced'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_PERFORM_CPR","STR_ACE_ACTION_PERFORM_CPR_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ (!(_caller getvariable[QGVAR(isProvidingCPR), false]) && ((_target getvariable [QGVAR(inCardiacArrest),false]) || !([_target] call EFUNC(common,isAwake))))
+},TREATMENT_ADVANCED('ACE_CPR'),'advanced'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_STOP_CPR","STR_ACE_ACTION_STOP_CPR_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ (_caller getvariable[QGVAR(isProvidingCPR), false])
+},{((_this select 0) setvariable[QGVAR(isProvidingCPR), nil, true])},'advanced'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_STITCHING","STR_ACE_ACTION_STITCHING_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ ((GVAR(setting_allowStitching) == 0 && [_Caller] call FUNC(medicClass)) || GVAR(setting_allowStitching) == 1)
+},TREATMENT_ADVANCED('ACE_surgical_kit'),'advanced'] call FUNC(addTreatmentOption);
+
+// Airway Management
+["STR_ACE_ACTION_APPLY_NPA","STR_ACE_ACTION_APPLY_NPA_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+ if !([_this select 0,_this select 1, 'ACE_nasopharyngeal_tube'] call FUNC(hasEquipment)) exitwith {
+ false;
+ };
+ (!([_target, QGVAR(airwayTreated)] call EFUNC(common,getDefinedVariable)) && !([_target] call EFUNC(common,isAwake)))
+},TREATMENT_AIRWAY('ACE_nasopharyngeal_tube'),'advanced'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_REMOVE_NPA","STR_ACE_ACTION_REMOVE_NPA_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+ ([_target, QGVAR(airwayTreated)] call EFUNC(common,getDefinedVariable));
+}, {GVAR(INTERACTION_TARGET) setvariable [QGVAR(airwayTreated), nil, true]; (_this select 0) addItem 'ACE_nasopharyngeal_tube';},'airway'] call FUNC(addTreatmentOption);
+
+
+// Bandaging
+ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_BANDAGE_BASIC","STR_ACE_ACTION_BANDAGE_BASIC_TOOLTIP",'ACE_bandage_basic');
+ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_QUIKCLOT","STR_ACE_ACTION_QUIKCLOT_TOOLTIP",'ACE_quikclot');
+ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_BANDAGE_ELASTIC","STR_ACE_ACTION_BANDAGE_ELASTIC_TOOLTIP",'ACE_bandageElastic');
+ADD_TREATMENT_BANDAGE("STR_ACE_ACTION_PACKING_BANDAGE","STR_ACE_ACTION_PACKING_BANDAGE_TOOLTIP",'ACE_packing_bandage');
+
+["STR_ACE_ACTION_REMOVE_TOURNIQUET","STR_ACE_ACTION_REMOVE_TOURNIQUET_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+ ([_target, call FUNC(getSelectedBodyPart)] call FUNC(hasTourniquetAppliedTo));
+},{[_this select 0,_this select 1,call FUNC(getSelectedBodyPart)] call FUNC(actionRemoveTourniquet)},'bandage'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_APPLY_TOURNIQUET","STR_ACE_ACTION_APPLY_TOURNIQUET_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+ (!([_target, call FUNC(getSelectedBodyPart)] call FUNC(hasTourniquetAppliedTo)) && ([_caller,_target,'ACE_tourniquet'] call FUNC(hasEquipment)));
+},TREATMENT_BANDAGE('ACE_tourniquet'),'bandage'] call FUNC(addTreatmentOption);
+
+
+// Medication
+ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_MORPHINE","STR_ACE_ACTION_MORPHINE_TOOLTIP",'ACE_morphine');
+ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_ATROPINE","STR_ACE_ACTION_ATROPINE_TOOLTIP",'ACE_atropine');
+ADD_TREATMENT_MEDICATION("STR_ACE_ACTION_EPINEPHRINE","STR_ACE_ACTION_EPINEPHRINE_TOOLTIP",'ACE_epinephrine');
+
+
+// Examine
+["STR_ACE_ACTION_CHECK_PULSE","STR_ACE_ACTION_CHECK_PULSE_TOOLTIP",{
+ true;
+},{[_this select 1,_this select 0] call FUNC(actionCheckPulse)},'examine'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_CHECK_BP","STR_ACE_ACTION_CHECK_BP_TOOLTIP",{
+ true;
+},{[_this select 1,_this select 0] call FUNC(actionCheckBloodPressure);},'examine'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_CHECK_RESPONSE","STR_ACE_ACTION_CHECK_RESPONSE_TOOLTIP",{
+ true;
+},{[_this select 1,_this select 0] call FUNC(actionCheckResponse)},'examine'] call FUNC(addTreatmentOption);
+
+
+// Drag/Movement
+["STR_ACE_ACTION_DRAG_PATIENT","STR_ACE_ACTION_DRAG_PATIENT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ (isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (vehicle _caller == _caller) && (vehicle _target == _target));
+}, {[_this select 0,_this select 1] call FUNC(actionDragUnit)},'drag'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_CARRY_PATIENT","STR_ACE_ACTION_CARRY_PATIENT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ (isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (vehicle _caller == _caller) && (vehicle _target == _target));
+}, {[_this select 0,_this select 1] call FUNC(actionCarryUnit)},'drag'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_DRAG_PATIENT","STR_ACE_ACTION_DRAG_PATIENT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ (isNull ([_caller] call EFUNC(common,getCarriedObj)) && isNull ([_target] call EFUNC(common,getCarriedObj)) && (vehicle _caller == _caller) && (vehicle _target == _target) && ([_caller, _target] call FUNC(canPutInBodyBag)));
+}, {[_this select 0,_this select 1] call FUNC(actionPlaceInBodyBag)},'drag'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_DROP_PATIENT","STR_ACE_ACTION_DROP_PATIENT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ (!(isNull ([_caller] call EFUNC(common,getCarriedObj))) && (vehicle _caller == _caller));
+}, {[_this select 0,_this select 1] call FUNC(actionDropUnit)},'drag'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_LOAD_PATIENT","STR_ACE_ACTION_LOAD_PATIENT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ ((vehicle _target == _target));
+}, {[_this select 1,_this select 0] call FUNC(actionLoadUnit)},'drag'] call FUNC(addTreatmentOption);
+
+["STR_ACE_ACTION_UNLOAD_PATIENT","STR_ACE_ACTION_UNLOAD_PATIENT_TOOLTIP",{
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ ((vehicle _target != _target));
+}, {[_this select 1,_this select 0] call FUNC(actionUnloadUnit)},'drag'] call FUNC(addTreatmentOption);
+
+systemchat format["finished postInit"];
+diag_log format["finished postInit"];
diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf
new file mode 100644
index 0000000000..8bd83aeb64
--- /dev/null
+++ b/addons/medical/XEH_preInit.sqf
@@ -0,0 +1,143 @@
+/**
+ * XEH_preInit);
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+PREP(actionCarryUnit);
+PREP(ActioncheckBloodPressure);
+PREP(ActionCheckBloodPressureLocal);
+PREP(ActionCheckPulse);
+PREP(actionCheckPulseLocal);
+PREP(actionCheckResponse);
+PREP(actionDragUnit);
+PREP(actionDropUnit);
+PREP(actionLoadUnit);
+PREP(actionPlaceInBodyBag);
+PREP(actionRemoveTourniquet);
+PREP(actionUnloadUnit);
+
+PREP(addActivityToLog);
+PREP(addHeartRateAdjustment);
+PREP(addOpenWounds);
+PREP(addToInjuredCollection);
+PREP(addToQuickViewLog);
+PREP(addToTriageList);
+PREP(addTreatmentOption);
+
+PREP(canAccessMedicalEquipment);
+PREP(canPutInBodyBag);
+PREP(determineIfFatal);
+PREP(determineIfUnconscious);
+PREP(fromNumberToBodyPart);
+
+PREP(getActivityLog);
+PREP(getBloodLoss);
+PREP(getBloodPressure);
+PREP(getBloodVolumeChange);
+PREP(getBodyPartNumber);
+PREP(getCardiacOutput);
+PREP(getCurrentSelectedInjuryData);
+PREP(getHeartRateChange);
+PREP(getNewDamageBodyPart);
+PREP(getQuickViewLog);
+PREP(getSelectedBodyPart);
+PREP(getTreatmentOptions);
+PREP(getTriageList);
+PREP(getTriageStatus);
+PREP(getTypeOfDamage);
+
+// Handling events & actions
+PREP(handleBandageOpening);
+PREP(handleDamage);
+PREP(handleDisplayEffects);
+PREP(handleHeal);
+PREP(handleReactionHit);
+PREP(handleTreatment);
+PREP(handleTreatment_Action_AdvancedLocal);
+PREP(handleTreatment_Action_AirwayLocal);
+PREP(handleTreatment_Action_BandageLocal);
+PREP(handleTreatment_Action_CPR);
+PREP(handleTreatment_Action_CPRLocal);
+PREP(handleTreatment_Action_fullHeal);
+PREP(handleTreatment_Action_fullHealLocal);
+PREP(handleTreatment_Action_MedicationLocal);
+PREP(handleTreatment_Action_Stitching);
+PREP(handleTreatment_Action_tourniquet);
+PREP(handleTreatment_Action_tourniquetLocal);
+PREP(handleTreatment_Category_Advanced);
+PREP(handleTreatment_Category_Airway);
+PREP(handleTreatment_Category_Bandaging);
+PREP(handleTreatment_Category_Medication);
+PREP(handleUI_DisplayOptions);
+PREP(handleUI_dropDownTriageCard);
+PREP(handleUnitVitals);
+
+PREP(hasEquipment);
+PREP(hasMedicalEnabled);
+PREP(hasOpenWounds);
+PREP(hasTourniquetAppliedTo);
+
+PREP(increasePain);
+PREP(initalizeModuleCMS);
+PREP(inMedicalFacility);
+PREP(isMedic);
+PREP(isMedicalVehicle);
+PREP(isSetTreatmentMutex);
+
+PREP(moduleAssignMedicalEquipment);
+PREP(moduleAssignMedicalFacility);
+PREP(moduleAssignMedicalVehicle);
+PREP(moduleAssignMedicRoles);
+
+PREP(onInitForUnit);
+PREP(onInjury_assignAirwayStatus);
+PREP(onInjury_assignFractures);
+PREP(onInjury_assignOpenWounds);
+PREP(onKilled);
+PREP(onLocal);
+PREP(onMenuOpen);
+PREP(onTreatmentCompleted);
+PREP(onUnconscious);
+PREP(onStartMovingUnit);
+
+PREP(openMenu);
+PREP(playInjuredSound);
+PREP(setCardiacArrest);
+PREP(setDamageBodyPart);
+PREP(setDead);
+PREP(setMedicRole);
+PREP(setTriageStatus);
+PREP(treatmentMutex);
+
+PREP(updateActivityLog);
+PREP(updateBodyImg);
+PREP(updateIcons);
+PREP(updateUIInfo);
+
+PREP(useEquipment);
+
+// initalize all module parameters.
+GVAR(setting_allowInstantDead) = true;
+GVAR(setting_AdvancedLevel) = 0;
+GVAR(setting_advancedWoundsSetting) = false;
+GVAR(setting_advancedMedicRoles) = false;
+GVAR(setting_medicalDifficulty) = 1;
+GVAR(setting_enableBandagingAid) = true;
+GVAR(setting_allowAIFullHeal) = false;
+GVAR(setting_enableForUnits) = 1;
+GVAR(setting_allowAirwayInjuries) = false;
+GVAR(setting_aidKitRestrictions) = 0;
+GVAR(setting_removeAidKitOnUse) = true;
+GVAR(setting_aidKitMedicsOnly) = false;
+GVAR(setting_bandageWaitingTime) = 5;
+GVAR(setting_allowVehicleCrashInjuries) = true;
+GVAR(setting_allowStitching) = 0;
+
+ADDON = true;
diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp
new file mode 100644
index 0000000000..92dd1152a2
--- /dev/null
+++ b/addons/medical/config.cpp
@@ -0,0 +1,30 @@
+#include "script_component.hpp"
+
+class CfgPatches
+{
+ class ADDON
+ {
+ units[] = {"ACE_medical_supply_crate_cms", "ACE_bandage_basicItem","ACE_packing_bandageItem","ACE_bandageElasticItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_atropineItem","ACE_epinephrineItem","ACE_plasma_ivItem","ACE_plasma_iv_500Item","ACE_plasma_iv250Item","ACE_blood_ivItem","ACE_blood_iv_500Item","ACE_blood_iv_250Item","ACE_saline_ivItem","ACE_saline_iv_500Item","ACE_saline_iv_250Item","ACE_quikclotItem","ACE_nasopharyngeal_tubeItem","ACE_opaItem","ACE_liquidSkinItem","ACE_chestsealItem","ACE_personal_aid_kitItem"};
+ weapons[] = {"ACE_surgical_kit"};
+ requiredVersion = REQUIRED_VERSION;
+ requiredAddons[] = {"ACE_gui","ACE_common"};
+ version = VERSION;
+ author[] = {$STR_ACE_Common_ACETeam, "Glowbal"};
+ authorUrl = "http://csemod.com";
+ };
+};
+class CfgAddons {
+ class PreloadAddons {
+ class ADDON {
+ list[] = {QUOTE(ADDON)};
+ };
+ };
+};
+
+#include "CfgEventHandlers.hpp"
+#include "CfgFactionClasses.hpp"
+#include "CfgWeapons.hpp"
+#include "CfgSounds.hpp"
+#include "CfgVehicles.hpp"
+#include "ui\define.hpp"
+#include "ui\menu.hpp"
diff --git a/addons/medical/data/ACE_medical_module.paa b/addons/medical/data/ACE_medical_module.paa
new file mode 100644
index 0000000000..9cb6c4782d
Binary files /dev/null and b/addons/medical/data/ACE_medical_module.paa differ
diff --git a/addons/medical/data/background_img.paa b/addons/medical/data/background_img.paa
new file mode 100644
index 0000000000..de59065e3b
Binary files /dev/null and b/addons/medical/data/background_img.paa differ
diff --git a/addons/medical/data/body_arm_left.paa b/addons/medical/data/body_arm_left.paa
new file mode 100644
index 0000000000..245cc4ba31
Binary files /dev/null and b/addons/medical/data/body_arm_left.paa differ
diff --git a/addons/medical/data/body_arm_right.paa b/addons/medical/data/body_arm_right.paa
new file mode 100644
index 0000000000..2023d1e0b4
Binary files /dev/null and b/addons/medical/data/body_arm_right.paa differ
diff --git a/addons/medical/data/body_arms.paa b/addons/medical/data/body_arms.paa
new file mode 100644
index 0000000000..b4b272f73d
Binary files /dev/null and b/addons/medical/data/body_arms.paa differ
diff --git a/addons/medical/data/body_background.paa b/addons/medical/data/body_background.paa
new file mode 100644
index 0000000000..d3f7440e68
Binary files /dev/null and b/addons/medical/data/body_background.paa differ
diff --git a/addons/medical/data/body_head.paa b/addons/medical/data/body_head.paa
new file mode 100644
index 0000000000..77ddd995bc
Binary files /dev/null and b/addons/medical/data/body_head.paa differ
diff --git a/addons/medical/data/body_img-arms.paa b/addons/medical/data/body_img-arms.paa
new file mode 100644
index 0000000000..f469a59359
Binary files /dev/null and b/addons/medical/data/body_img-arms.paa differ
diff --git a/addons/medical/data/body_img-head.paa b/addons/medical/data/body_img-head.paa
new file mode 100644
index 0000000000..2f7d15e1ca
Binary files /dev/null and b/addons/medical/data/body_img-head.paa differ
diff --git a/addons/medical/data/body_img-legs.paa b/addons/medical/data/body_img-legs.paa
new file mode 100644
index 0000000000..35f68d8635
Binary files /dev/null and b/addons/medical/data/body_img-legs.paa differ
diff --git a/addons/medical/data/body_img-torso.paa b/addons/medical/data/body_img-torso.paa
new file mode 100644
index 0000000000..cc5ecb9d60
Binary files /dev/null and b/addons/medical/data/body_img-torso.paa differ
diff --git a/addons/medical/data/body_leg_left.paa b/addons/medical/data/body_leg_left.paa
new file mode 100644
index 0000000000..a116305258
Binary files /dev/null and b/addons/medical/data/body_leg_left.paa differ
diff --git a/addons/medical/data/body_leg_right.paa b/addons/medical/data/body_leg_right.paa
new file mode 100644
index 0000000000..02ce66ba70
Binary files /dev/null and b/addons/medical/data/body_leg_right.paa differ
diff --git a/addons/medical/data/body_legs.paa b/addons/medical/data/body_legs.paa
new file mode 100644
index 0000000000..9af3adc2ca
Binary files /dev/null and b/addons/medical/data/body_legs.paa differ
diff --git a/addons/medical/data/body_torso.paa b/addons/medical/data/body_torso.paa
new file mode 100644
index 0000000000..0a7212ac95
Binary files /dev/null and b/addons/medical/data/body_torso.paa differ
diff --git a/addons/medical/data/border_arm_left.paa b/addons/medical/data/border_arm_left.paa
new file mode 100644
index 0000000000..eae1d751cf
Binary files /dev/null and b/addons/medical/data/border_arm_left.paa differ
diff --git a/addons/medical/data/border_arm_right.paa b/addons/medical/data/border_arm_right.paa
new file mode 100644
index 0000000000..0aea4ce20e
Binary files /dev/null and b/addons/medical/data/border_arm_right.paa differ
diff --git a/addons/medical/data/border_head.paa b/addons/medical/data/border_head.paa
new file mode 100644
index 0000000000..3b2e7aaf10
Binary files /dev/null and b/addons/medical/data/border_head.paa differ
diff --git a/addons/medical/data/border_leg_left.paa b/addons/medical/data/border_leg_left.paa
new file mode 100644
index 0000000000..7ff3b170fa
Binary files /dev/null and b/addons/medical/data/border_leg_left.paa differ
diff --git a/addons/medical/data/border_leg_right.paa b/addons/medical/data/border_leg_right.paa
new file mode 100644
index 0000000000..bef0f70779
Binary files /dev/null and b/addons/medical/data/border_leg_right.paa differ
diff --git a/addons/medical/data/border_torso.paa b/addons/medical/data/border_torso.paa
new file mode 100644
index 0000000000..2b70076939
Binary files /dev/null and b/addons/medical/data/border_torso.paa differ
diff --git a/addons/medical/data/buttonDisabled_gradient.paa b/addons/medical/data/buttonDisabled_gradient.paa
new file mode 100644
index 0000000000..43b1b8d100
Binary files /dev/null and b/addons/medical/data/buttonDisabled_gradient.paa differ
diff --git a/addons/medical/data/buttonNormal_gradient.paa b/addons/medical/data/buttonNormal_gradient.paa
new file mode 100644
index 0000000000..2210f98741
Binary files /dev/null and b/addons/medical/data/buttonNormal_gradient.paa differ
diff --git a/addons/medical/data/buttonNormal_gradient2.paa b/addons/medical/data/buttonNormal_gradient2.paa
new file mode 100644
index 0000000000..cabe6c7fed
Binary files /dev/null and b/addons/medical/data/buttonNormal_gradient2.paa differ
diff --git a/addons/medical/data/buttonNormal_gradient3.paa b/addons/medical/data/buttonNormal_gradient3.paa
new file mode 100644
index 0000000000..7da9fbcf8a
Binary files /dev/null and b/addons/medical/data/buttonNormal_gradient3.paa differ
diff --git a/addons/medical/data/buttonNormal_gradient_top.paa b/addons/medical/data/buttonNormal_gradient_top.paa
new file mode 100644
index 0000000000..904e1a62f7
Binary files /dev/null and b/addons/medical/data/buttonNormal_gradient_top.paa differ
diff --git a/addons/medical/data/icons/advanced_treatment_small.paa b/addons/medical/data/icons/advanced_treatment_small.paa
new file mode 100644
index 0000000000..8becb9d2df
Binary files /dev/null and b/addons/medical/data/icons/advanced_treatment_small.paa differ
diff --git a/addons/medical/data/icons/airway_management_small.paa b/addons/medical/data/icons/airway_management_small.paa
new file mode 100644
index 0000000000..ab4da47958
Binary files /dev/null and b/addons/medical/data/icons/airway_management_small.paa differ
diff --git a/addons/medical/data/icons/bandage_fracture_small.paa b/addons/medical/data/icons/bandage_fracture_small.paa
new file mode 100644
index 0000000000..a869f260ec
Binary files /dev/null and b/addons/medical/data/icons/bandage_fracture_small.paa differ
diff --git a/addons/medical/data/icons/examine_patient_small.paa b/addons/medical/data/icons/examine_patient_small.paa
new file mode 100644
index 0000000000..2e9fc9831d
Binary files /dev/null and b/addons/medical/data/icons/examine_patient_small.paa differ
diff --git a/addons/medical/data/icons/icon_advanced_treatment.paa b/addons/medical/data/icons/icon_advanced_treatment.paa
new file mode 100644
index 0000000000..d6bf6effd9
Binary files /dev/null and b/addons/medical/data/icons/icon_advanced_treatment.paa differ
diff --git a/addons/medical/data/icons/icon_airway_management.paa b/addons/medical/data/icons/icon_airway_management.paa
new file mode 100644
index 0000000000..f444f5f385
Binary files /dev/null and b/addons/medical/data/icons/icon_airway_management.paa differ
diff --git a/addons/medical/data/icons/icon_bandage_fracture.paa b/addons/medical/data/icons/icon_bandage_fracture.paa
new file mode 100644
index 0000000000..df8d1de571
Binary files /dev/null and b/addons/medical/data/icons/icon_bandage_fracture.paa differ
diff --git a/addons/medical/data/icons/icon_bleeding.paa b/addons/medical/data/icons/icon_bleeding.paa
new file mode 100644
index 0000000000..d11c2ed496
Binary files /dev/null and b/addons/medical/data/icons/icon_bleeding.paa differ
diff --git a/addons/medical/data/icons/icon_carry.paa b/addons/medical/data/icons/icon_carry.paa
new file mode 100644
index 0000000000..7ebb830b03
Binary files /dev/null and b/addons/medical/data/icons/icon_carry.paa differ
diff --git a/addons/medical/data/icons/icon_examine_patient.paa b/addons/medical/data/icons/icon_examine_patient.paa
new file mode 100644
index 0000000000..12eb06c890
Binary files /dev/null and b/addons/medical/data/icons/icon_examine_patient.paa differ
diff --git a/addons/medical/data/icons/icon_medication.paa b/addons/medical/data/icons/icon_medication.paa
new file mode 100644
index 0000000000..98893ad863
Binary files /dev/null and b/addons/medical/data/icons/icon_medication.paa differ
diff --git a/addons/medical/data/icons/icon_toggle_self.paa b/addons/medical/data/icons/icon_toggle_self.paa
new file mode 100644
index 0000000000..3078eb5dd5
Binary files /dev/null and b/addons/medical/data/icons/icon_toggle_self.paa differ
diff --git a/addons/medical/data/icons/icon_tourniquet.paa b/addons/medical/data/icons/icon_tourniquet.paa
new file mode 100644
index 0000000000..8b34a7bfbb
Binary files /dev/null and b/addons/medical/data/icons/icon_tourniquet.paa differ
diff --git a/addons/medical/data/icons/icon_tourniquet_small.paa b/addons/medical/data/icons/icon_tourniquet_small.paa
new file mode 100644
index 0000000000..a457e2c0d5
Binary files /dev/null and b/addons/medical/data/icons/icon_tourniquet_small.paa differ
diff --git a/addons/medical/data/icons/icon_triage_card.paa b/addons/medical/data/icons/icon_triage_card.paa
new file mode 100644
index 0000000000..850ab0f4ce
Binary files /dev/null and b/addons/medical/data/icons/icon_triage_card.paa differ
diff --git a/addons/medical/data/icons/medication_small.paa b/addons/medical/data/icons/medication_small.paa
new file mode 100644
index 0000000000..b6acd670c8
Binary files /dev/null and b/addons/medical/data/icons/medication_small.paa differ
diff --git a/addons/medical/data/icons/toggle_self_small.paa b/addons/medical/data/icons/toggle_self_small.paa
new file mode 100644
index 0000000000..73108e5a98
Binary files /dev/null and b/addons/medical/data/icons/toggle_self_small.paa differ
diff --git a/addons/medical/data/icons/triage_card_small.paa b/addons/medical/data/icons/triage_card_small.paa
new file mode 100644
index 0000000000..92eb0f0d20
Binary files /dev/null and b/addons/medical/data/icons/triage_card_small.paa differ
diff --git a/addons/medical/data/ui_background.paa b/addons/medical/data/ui_background.paa
new file mode 100644
index 0000000000..f1c42c7d7d
Binary files /dev/null and b/addons/medical/data/ui_background.paa differ
diff --git a/addons/medical/equipment/Atropin-pen.p3d b/addons/medical/equipment/Atropin-pen.p3d
new file mode 100644
index 0000000000..a34d11641a
Binary files /dev/null and b/addons/medical/equipment/Atropin-pen.p3d differ
diff --git a/addons/medical/equipment/Atropin-pen_used.p3d b/addons/medical/equipment/Atropin-pen_used.p3d
new file mode 100644
index 0000000000..85c123f9af
Binary files /dev/null and b/addons/medical/equipment/Atropin-pen_used.p3d differ
diff --git a/addons/medical/equipment/Bandage elastic.p3d b/addons/medical/equipment/Bandage elastic.p3d
new file mode 100644
index 0000000000..c215842967
Binary files /dev/null and b/addons/medical/equipment/Bandage elastic.p3d differ
diff --git a/addons/medical/equipment/Bandage-Pack.p3d b/addons/medical/equipment/Bandage-Pack.p3d
new file mode 100644
index 0000000000..441af289c9
Binary files /dev/null and b/addons/medical/equipment/Bandage-Pack.p3d differ
diff --git a/addons/medical/equipment/Bandage-elastic.p3d b/addons/medical/equipment/Bandage-elastic.p3d
new file mode 100644
index 0000000000..c5a84c09f6
Binary files /dev/null and b/addons/medical/equipment/Bandage-elastic.p3d differ
diff --git a/addons/medical/equipment/Epipen.p3d b/addons/medical/equipment/Epipen.p3d
new file mode 100644
index 0000000000..8a1b0e5e35
Binary files /dev/null and b/addons/medical/equipment/Epipen.p3d differ
diff --git a/addons/medical/equipment/Epipen_used.p3d b/addons/medical/equipment/Epipen_used.p3d
new file mode 100644
index 0000000000..af1294b0e2
Binary files /dev/null and b/addons/medical/equipment/Epipen_used.p3d differ
diff --git a/addons/medical/equipment/Morphinpen.p3d b/addons/medical/equipment/Morphinpen.p3d
new file mode 100644
index 0000000000..06a39e7d56
Binary files /dev/null and b/addons/medical/equipment/Morphinpen.p3d differ
diff --git a/addons/medical/equipment/Morphinpen_used.p3d b/addons/medical/equipment/Morphinpen_used.p3d
new file mode 100644
index 0000000000..6e6bf06119
Binary files /dev/null and b/addons/medical/equipment/Morphinpen_used.p3d differ
diff --git a/addons/medical/equipment/Personal-aidkits/data/MTP_co.paa b/addons/medical/equipment/Personal-aidkits/data/MTP_co.paa
new file mode 100644
index 0000000000..660ebe3477
Binary files /dev/null and b/addons/medical/equipment/Personal-aidkits/data/MTP_co.paa differ
diff --git a/addons/medical/equipment/Personal-aidkits/data/Mulitcam.paa b/addons/medical/equipment/Personal-aidkits/data/Mulitcam.paa
new file mode 100644
index 0000000000..3e55892c84
Binary files /dev/null and b/addons/medical/equipment/Personal-aidkits/data/Mulitcam.paa differ
diff --git a/addons/medical/equipment/Personal-aidkits/data/Personalaidkit.rvmat b/addons/medical/equipment/Personal-aidkits/data/Personalaidkit.rvmat
new file mode 100644
index 0000000000..a071c22c19
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/Personal-aidkits/data/Personalaidkit_nohq.paa b/addons/medical/equipment/Personal-aidkits/data/Personalaidkit_nohq.paa
new file mode 100644
index 0000000000..0d03b45372
Binary files /dev/null and b/addons/medical/equipment/Personal-aidkits/data/Personalaidkit_nohq.paa differ
diff --git a/addons/medical/equipment/Personal-aidkits/data/Personalaidkit_smdi.paa b/addons/medical/equipment/Personal-aidkits/data/Personalaidkit_smdi.paa
new file mode 100644
index 0000000000..2fb8bec533
Binary files /dev/null and b/addons/medical/equipment/Personal-aidkits/data/Personalaidkit_smdi.paa differ
diff --git a/addons/medical/equipment/Personalaidkit.p3d b/addons/medical/equipment/Personalaidkit.p3d
new file mode 100644
index 0000000000..05a497d8a7
Binary files /dev/null and b/addons/medical/equipment/Personalaidkit.p3d differ
diff --git a/addons/medical/equipment/QuickClot.p3d b/addons/medical/equipment/QuickClot.p3d
new file mode 100644
index 0000000000..aa431372bb
Binary files /dev/null and b/addons/medical/equipment/QuickClot.p3d differ
diff --git a/addons/medical/equipment/Tourniquet.p3d b/addons/medical/equipment/Tourniquet.p3d
new file mode 100644
index 0000000000..300a74c166
Binary files /dev/null and b/addons/medical/equipment/Tourniquet.p3d differ
diff --git a/addons/medical/equipment/bandages/fielddressing.p3d b/addons/medical/equipment/bandages/fielddressing.p3d
new file mode 100644
index 0000000000..6b7f94ef9b
Binary files /dev/null and b/addons/medical/equipment/bandages/fielddressing.p3d differ
diff --git a/addons/medical/equipment/bandages/fielddressing.rvmat b/addons/medical/equipment/bandages/fielddressing.rvmat
new file mode 100644
index 0000000000..7eda45da4f
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/bandages/fielddressing_color.paa b/addons/medical/equipment/bandages/fielddressing_color.paa
new file mode 100644
index 0000000000..7d68a365c2
Binary files /dev/null and b/addons/medical/equipment/bandages/fielddressing_color.paa differ
diff --git a/addons/medical/equipment/bandages/fielddressing_garbage.p3d b/addons/medical/equipment/bandages/fielddressing_garbage.p3d
new file mode 100644
index 0000000000..0939de5c08
Binary files /dev/null and b/addons/medical/equipment/bandages/fielddressing_garbage.p3d differ
diff --git a/addons/medical/equipment/bandages/fielddressing_nohq.paa b/addons/medical/equipment/bandages/fielddressing_nohq.paa
new file mode 100644
index 0000000000..c66785cf13
Binary files /dev/null and b/addons/medical/equipment/bandages/fielddressing_nohq.paa differ
diff --git a/addons/medical/equipment/bandages/fielddressing_smdi.paa b/addons/medical/equipment/bandages/fielddressing_smdi.paa
new file mode 100644
index 0000000000..96376989f7
Binary files /dev/null and b/addons/medical/equipment/bandages/fielddressing_smdi.paa differ
diff --git a/addons/medical/equipment/bandages/packingbandage.p3d b/addons/medical/equipment/bandages/packingbandage.p3d
new file mode 100644
index 0000000000..c1cc09af35
Binary files /dev/null and b/addons/medical/equipment/bandages/packingbandage.p3d differ
diff --git a/addons/medical/equipment/bandages/packingbandage.rvmat b/addons/medical/equipment/bandages/packingbandage.rvmat
new file mode 100644
index 0000000000..3d65ab3b93
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/bandages/packingbandage_color.paa b/addons/medical/equipment/bandages/packingbandage_color.paa
new file mode 100644
index 0000000000..54b1f75e2e
Binary files /dev/null and b/addons/medical/equipment/bandages/packingbandage_color.paa differ
diff --git a/addons/medical/equipment/bandages/packingbandage_garbage.p3d b/addons/medical/equipment/bandages/packingbandage_garbage.p3d
new file mode 100644
index 0000000000..cb695caac6
Binary files /dev/null and b/addons/medical/equipment/bandages/packingbandage_garbage.p3d differ
diff --git a/addons/medical/equipment/bandages/packingbandage_nohq.paa b/addons/medical/equipment/bandages/packingbandage_nohq.paa
new file mode 100644
index 0000000000..1b3782c501
Binary files /dev/null and b/addons/medical/equipment/bandages/packingbandage_nohq.paa differ
diff --git a/addons/medical/equipment/bandages/packingbandage_smdi.paa b/addons/medical/equipment/bandages/packingbandage_smdi.paa
new file mode 100644
index 0000000000..8d5b3848ac
Binary files /dev/null and b/addons/medical/equipment/bandages/packingbandage_smdi.paa differ
diff --git a/addons/medical/equipment/bodybag.p3d b/addons/medical/equipment/bodybag.p3d
new file mode 100644
index 0000000000..4a6b6e85ab
Binary files /dev/null and b/addons/medical/equipment/bodybag.p3d differ
diff --git a/addons/medical/equipment/bodybagItem.p3d b/addons/medical/equipment/bodybagItem.p3d
new file mode 100644
index 0000000000..11168bf776
Binary files /dev/null and b/addons/medical/equipment/bodybagItem.p3d differ
diff --git a/addons/medical/equipment/data/Atropinpen_co.paa b/addons/medical/equipment/data/Atropinpen_co.paa
new file mode 100644
index 0000000000..3e44836bee
Binary files /dev/null and b/addons/medical/equipment/data/Atropinpen_co.paa differ
diff --git a/addons/medical/equipment/data/Epipen_co.paa b/addons/medical/equipment/data/Epipen_co.paa
new file mode 100644
index 0000000000..2a1afe1f33
Binary files /dev/null and b/addons/medical/equipment/data/Epipen_co.paa differ
diff --git a/addons/medical/equipment/data/Field-Dressing.rvmat b/addons/medical/equipment/data/Field-Dressing.rvmat
new file mode 100644
index 0000000000..9c43af9abf
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/data/Field-Dressing_nohq.paa b/addons/medical/equipment/data/Field-Dressing_nohq.paa
new file mode 100644
index 0000000000..6972636a3d
Binary files /dev/null and b/addons/medical/equipment/data/Field-Dressing_nohq.paa differ
diff --git a/addons/medical/equipment/data/Field-Dressing_smdi.paa b/addons/medical/equipment/data/Field-Dressing_smdi.paa
new file mode 100644
index 0000000000..f450605958
Binary files /dev/null and b/addons/medical/equipment/data/Field-Dressing_smdi.paa differ
diff --git a/addons/medical/equipment/data/Field-dressing.paa b/addons/medical/equipment/data/Field-dressing.paa
new file mode 100644
index 0000000000..07bae7d595
Binary files /dev/null and b/addons/medical/equipment/data/Field-dressing.paa differ
diff --git a/addons/medical/equipment/data/Liquid-skin.paa b/addons/medical/equipment/data/Liquid-skin.paa
new file mode 100644
index 0000000000..fda64304bc
Binary files /dev/null and b/addons/medical/equipment/data/Liquid-skin.paa differ
diff --git a/addons/medical/equipment/data/Tournequit_co.paa b/addons/medical/equipment/data/Tournequit_co.paa
new file mode 100644
index 0000000000..e83aada994
Binary files /dev/null and b/addons/medical/equipment/data/Tournequit_co.paa differ
diff --git a/addons/medical/equipment/data/bandage-elastic.paa b/addons/medical/equipment/data/bandage-elastic.paa
new file mode 100644
index 0000000000..3164b5d4ca
Binary files /dev/null and b/addons/medical/equipment/data/bandage-elastic.paa differ
diff --git a/addons/medical/equipment/data/bodybag.rvmat b/addons/medical/equipment/data/bodybag.rvmat
new file mode 100644
index 0000000000..b0e6c2363c
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/data/bodybagItem.rvmat b/addons/medical/equipment/data/bodybagItem.rvmat
new file mode 100644
index 0000000000..c72890391b
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/data/bodybagItem_co.paa b/addons/medical/equipment/data/bodybagItem_co.paa
new file mode 100644
index 0000000000..d04f8ec64c
Binary files /dev/null and b/addons/medical/equipment/data/bodybagItem_co.paa differ
diff --git a/addons/medical/equipment/data/bodybagItem_nohq.paa b/addons/medical/equipment/data/bodybagItem_nohq.paa
new file mode 100644
index 0000000000..5699ec5e04
Binary files /dev/null and b/addons/medical/equipment/data/bodybagItem_nohq.paa differ
diff --git a/addons/medical/equipment/data/bodybagItem_smdi.paa b/addons/medical/equipment/data/bodybagItem_smdi.paa
new file mode 100644
index 0000000000..cf4cf805e3
Binary files /dev/null and b/addons/medical/equipment/data/bodybagItem_smdi.paa differ
diff --git a/addons/medical/equipment/data/bodybag_co.paa b/addons/medical/equipment/data/bodybag_co.paa
new file mode 100644
index 0000000000..21996761b7
Binary files /dev/null and b/addons/medical/equipment/data/bodybag_co.paa differ
diff --git a/addons/medical/equipment/data/bodybag_nohq.paa b/addons/medical/equipment/data/bodybag_nohq.paa
new file mode 100644
index 0000000000..5c6b35c595
Binary files /dev/null and b/addons/medical/equipment/data/bodybag_nohq.paa differ
diff --git a/addons/medical/equipment/data/env_co.paa b/addons/medical/equipment/data/env_co.paa
new file mode 100644
index 0000000000..77645347b5
Binary files /dev/null and b/addons/medical/equipment/data/env_co.paa differ
diff --git a/addons/medical/equipment/data/morphin_co.paa b/addons/medical/equipment/data/morphin_co.paa
new file mode 100644
index 0000000000..8d91fd0e10
Binary files /dev/null and b/addons/medical/equipment/data/morphin_co.paa differ
diff --git a/addons/medical/equipment/data/quickclot_co.paa b/addons/medical/equipment/data/quickclot_co.paa
new file mode 100644
index 0000000000..bf0edccd7e
Binary files /dev/null and b/addons/medical/equipment/data/quickclot_co.paa differ
diff --git a/addons/medical/equipment/data/surgical_kit.rvmat b/addons/medical/equipment/data/surgical_kit.rvmat
new file mode 100644
index 0000000000..3f0deac2fa
--- /dev/null
+++ b/addons/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="z\ace\addons\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="z\ace\addons\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/addons/medical/equipment/data/surgical_kit_co.paa b/addons/medical/equipment/data/surgical_kit_co.paa
new file mode 100644
index 0000000000..3e622afe48
Binary files /dev/null and b/addons/medical/equipment/data/surgical_kit_co.paa differ
diff --git a/addons/medical/equipment/data/surgical_kit_metal.rvmat b/addons/medical/equipment/data/surgical_kit_metal.rvmat
new file mode 100644
index 0000000000..65192a777f
--- /dev/null
+++ b/addons/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/addons/medical/equipment/data/surgical_kit_nohq.paa b/addons/medical/equipment/data/surgical_kit_nohq.paa
new file mode 100644
index 0000000000..b8027515bc
Binary files /dev/null and b/addons/medical/equipment/data/surgical_kit_nohq.paa differ
diff --git a/addons/medical/equipment/field_dressing.p3d b/addons/medical/equipment/field_dressing.p3d
new file mode 100644
index 0000000000..39b516c6bc
Binary files /dev/null and b/addons/medical/equipment/field_dressing.p3d differ
diff --git a/addons/medical/equipment/field_dressing_used.p3d b/addons/medical/equipment/field_dressing_used.p3d
new file mode 100644
index 0000000000..a29958cca0
Binary files /dev/null and b/addons/medical/equipment/field_dressing_used.p3d differ
diff --git a/addons/medical/equipment/img/atropine.paa b/addons/medical/equipment/img/atropine.paa
new file mode 100644
index 0000000000..49b79e99e5
Binary files /dev/null and b/addons/medical/equipment/img/atropine.paa differ
diff --git a/addons/medical/equipment/img/bandageElastic.paa b/addons/medical/equipment/img/bandageElastic.paa
new file mode 100644
index 0000000000..bbf7901ceb
Binary files /dev/null and b/addons/medical/equipment/img/bandageElastic.paa differ
diff --git a/addons/medical/equipment/img/bloodbag.paa b/addons/medical/equipment/img/bloodbag.paa
new file mode 100644
index 0000000000..489614bf44
Binary files /dev/null and b/addons/medical/equipment/img/bloodbag.paa differ
diff --git a/addons/medical/equipment/img/bodybag.paa b/addons/medical/equipment/img/bodybag.paa
new file mode 100644
index 0000000000..a3a7257fc3
Binary files /dev/null and b/addons/medical/equipment/img/bodybag.paa differ
diff --git a/addons/medical/equipment/img/chestseal.paa b/addons/medical/equipment/img/chestseal.paa
new file mode 100644
index 0000000000..be0f4f77bf
Binary files /dev/null and b/addons/medical/equipment/img/chestseal.paa differ
diff --git a/addons/medical/equipment/img/epinephrine.paa b/addons/medical/equipment/img/epinephrine.paa
new file mode 100644
index 0000000000..d4c556281a
Binary files /dev/null and b/addons/medical/equipment/img/epinephrine.paa differ
diff --git a/addons/medical/equipment/img/field_dressing.paa b/addons/medical/equipment/img/field_dressing.paa
new file mode 100644
index 0000000000..bfe11f2a07
Binary files /dev/null and b/addons/medical/equipment/img/field_dressing.paa differ
diff --git a/addons/medical/equipment/img/liquidSkin.paa b/addons/medical/equipment/img/liquidSkin.paa
new file mode 100644
index 0000000000..40e72038ec
Binary files /dev/null and b/addons/medical/equipment/img/liquidSkin.paa differ
diff --git a/addons/medical/equipment/img/morphine.paa b/addons/medical/equipment/img/morphine.paa
new file mode 100644
index 0000000000..16918da53f
Binary files /dev/null and b/addons/medical/equipment/img/morphine.paa differ
diff --git a/addons/medical/equipment/img/nasopharyngeal_tube.paa b/addons/medical/equipment/img/nasopharyngeal_tube.paa
new file mode 100644
index 0000000000..6629605519
Binary files /dev/null and b/addons/medical/equipment/img/nasopharyngeal_tube.paa differ
diff --git a/addons/medical/equipment/img/packing_bandage.paa b/addons/medical/equipment/img/packing_bandage.paa
new file mode 100644
index 0000000000..5825d17a77
Binary files /dev/null and b/addons/medical/equipment/img/packing_bandage.paa differ
diff --git a/addons/medical/equipment/img/personal_aid_kit.paa b/addons/medical/equipment/img/personal_aid_kit.paa
new file mode 100644
index 0000000000..87d6a1612f
Binary files /dev/null and b/addons/medical/equipment/img/personal_aid_kit.paa differ
diff --git a/addons/medical/equipment/img/plasma_iv.paa b/addons/medical/equipment/img/plasma_iv.paa
new file mode 100644
index 0000000000..31eb3e34df
Binary files /dev/null and b/addons/medical/equipment/img/plasma_iv.paa differ
diff --git a/addons/medical/equipment/img/quickclot.paa b/addons/medical/equipment/img/quickclot.paa
new file mode 100644
index 0000000000..8727b7d1d0
Binary files /dev/null and b/addons/medical/equipment/img/quickclot.paa differ
diff --git a/addons/medical/equipment/img/saline_iv.paa b/addons/medical/equipment/img/saline_iv.paa
new file mode 100644
index 0000000000..a957e36d7c
Binary files /dev/null and b/addons/medical/equipment/img/saline_iv.paa differ
diff --git a/addons/medical/equipment/img/splint.paa b/addons/medical/equipment/img/splint.paa
new file mode 100644
index 0000000000..87c1cb8686
Binary files /dev/null and b/addons/medical/equipment/img/splint.paa differ
diff --git a/addons/medical/equipment/img/surgical_kit.paa b/addons/medical/equipment/img/surgical_kit.paa
new file mode 100644
index 0000000000..e6b3533a12
Binary files /dev/null and b/addons/medical/equipment/img/surgical_kit.paa differ
diff --git a/addons/medical/equipment/img/tourniquet.paa b/addons/medical/equipment/img/tourniquet.paa
new file mode 100644
index 0000000000..1a0dace011
Binary files /dev/null and b/addons/medical/equipment/img/tourniquet.paa differ
diff --git a/addons/medical/equipment/skinliquid.p3d b/addons/medical/equipment/skinliquid.p3d
new file mode 100644
index 0000000000..b3d761e256
Binary files /dev/null and b/addons/medical/equipment/skinliquid.p3d differ
diff --git a/addons/medical/equipment/splint.p3d b/addons/medical/equipment/splint.p3d
new file mode 100644
index 0000000000..42f3ad14b7
Binary files /dev/null and b/addons/medical/equipment/splint.p3d differ
diff --git a/addons/medical/equipment/surgical_kit.p3d b/addons/medical/equipment/surgical_kit.p3d
new file mode 100644
index 0000000000..9f616a100f
Binary files /dev/null and b/addons/medical/equipment/surgical_kit.p3d differ
diff --git a/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf
new file mode 100644
index 0000000000..4dd86cdbb1
--- /dev/null
+++ b/addons/medical/functions/fnc_ActionCheckBloodPressureLocal.sqf
@@ -0,0 +1,58 @@
+/**
+ * fn_checkBloodPressureLocal.sqf
+ * @Descr: Displays specified units current blood pressure
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_unit","_bloodPressure","_bloodPressureHigh","_bloodPressureLow","_title","_content"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+_bloodPressure = [_unit] call FUNC(getBloodPressure);
+if (!alive _unit) then {
+ _bloodPressure = [0,0];
+};
+
+_bloodPressureHigh = _bloodPressure select 1;
+_bloodPressureLow = _bloodPressure select 0;
+_output = "";
+_logOutPut = "";
+if ([_caller] call FUNC(medicClass)) then {
+ _output = "STR_ACE_CHECK_BLOODPRESSURE_OUTPUT_1";
+ _logOutPut = format["%1/%2",round(_bloodPressureHigh),round(_bloodPressureLow)];
+} else {
+ if (_bloodPressureHigh > 20) then {
+ _output = "STR_ACE_CHECK_BLOODPRESSURE_OUTPUT_2";
+ _logOutPut = "Low";
+ if (_bloodPressureHigh > 100) then {
+ _output = "STR_ACE_CHECK_BLOODPRESSURE_OUTPUT_3";
+ _logOutPut = "Normal";
+ if (_bloodPressureHigh > 160) then {
+ _output = "STR_ACE_CHECK_BLOODPRESSURE_OUTPUT_4";
+ _logOutPut = "High";
+ };
+
+ };
+ } else {
+ if (random(10) > 3) then {
+ _output = "STR_ACE_CHECK_BLOODPRESSURE_OUTPUT_5";
+ _logOutPut = "No Blood Pressure";
+ } else {
+ _output = "STR_ACE_CHECK_BLOODPRESSURE_OUTPUT_6";
+ };
+ };
+};
+
+_title = format["STR_ACE_CHECK_BLOODPRESSURE"];
+_content = ["STR_ACE_CHECK_BLOODPRESSURE_CHECKED_MEDIC", _output];
+[_caller, _title, _content, 0,[[_unit] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)] ] call EFUNC(gui,sendDisplayInformationTo);
+
+if (_logOutPut != "") then {
+ [_unit,"examine",format["%1 checked Blood Pressure: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToQuickViewLog);
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_ActionCheckPulse.sqf b/addons/medical/functions/fnc_ActionCheckPulse.sqf
new file mode 100644
index 0000000000..e55d648f32
--- /dev/null
+++ b/addons/medical/functions/fnc_ActionCheckPulse.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_checkPulse.sqf
+ * @Descr: Displays specified units current pulse
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+ #include "script_component.hpp"
+
+private ["_caller","_target","_title","_content"];
+_caller = _this select 0;
+_target = _this select 1;
+
+if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {};
+[_caller, true] call FUNC(treatmentMutex);
+
+_title = format["STR_ACE_CHECK_PULSE"];
+_content = ["STR_ACE_CHECK_PULSE_CONTENT"];
+[_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo);
+
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+[2 + round(random(6)),
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition
+ {
+ private ["_caller","_target"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ [_this, QUOTE(FUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc);
+ [_caller,false] call FUNC(treatmentMutex);
+ }, // on success
+ {
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+ [(_this select 0),false] call FUNC(treatmentMutex);
+ }, // on failure
+ [_caller, _target] // arguments
+] call EFUNC(gui,loadingBar);
diff --git a/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf b/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf
new file mode 100644
index 0000000000..f9e74a631b
--- /dev/null
+++ b/addons/medical/functions/fnc_ActioncheckBloodPressure.sqf
@@ -0,0 +1,40 @@
+/**
+ * fn_checkBloodPressure.sqf
+ * @Descr: Displays specified units current blood pressure
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_title","_content"];
+_caller = _this select 0;
+_target = _this select 1;
+
+if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {};
+[_caller, true] call FUNC(treatmentMutex);
+
+_title = format["STR_ACE_CHECK_BLOODPRESSURE"];
+_content = ["STR_ACE_CHECK_BLOODPRESSURE_CONTENT"];
+[_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo);
+
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+[2 + round(random(4)),
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition
+ {
+ private ["_caller","_target"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ [_this, QUOTE(FUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc);
+ [_caller,false] call FUNC(treatmentMutex);
+ }, // on success
+ {
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+ [(_this select 0),false] call FUNC(treatmentMutex);
+ }, // on failure
+ [_caller, _target] // arguments
+] call EFUNC(gui,loadingBar);
+
diff --git a/addons/medical/functions/fnc_actionCarryUnit.sqf b/addons/medical/functions/fnc_actionCarryUnit.sqf
new file mode 100644
index 0000000000..c65e53b618
--- /dev/null
+++ b/addons/medical/functions/fnc_actionCarryUnit.sqf
@@ -0,0 +1,88 @@
+/*
+ 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
+*/
+
+#include "script_component.hpp"
+
+
+private ["_caller", "_unit", "_positionUnit", "_killOnDrop"];
+_caller = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
+_unit = [_this, 1, objNull, [objNull]] call BIS_fnc_param;
+
+["FUNC(actionDragUnit) has been called",2] call EFUNC(common,debug);
+
+if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {};
+[_caller, true] call FUNC(treatmentMutex);
+
+if (!(_unit isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{ [_caller, false] call FUNC(treatmentMutex);};
+if (vehicle _caller != _caller || vehicle _unit != _unit) exitwith { [_caller, false] call FUNC(treatmentMutex);};
+
+if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _unit} || {(([_unit] call EFUNC(common,isAwake)))}) exitwith {
+ [_caller, false] call FUNC(treatmentMutex);
+};
+
+if (([_caller] call EFUNC(common,getCarriedObj)) != _unit && !(isNull ([_caller] call EFUNC(common,getCarriedObj))) || {!isNull(_unit getvariable [QGVAR(beingDragged),objNull]) || !isNull(_caller getvariable [QGVAR(dragging),objNull])} || {!isNull(_unit getvariable [QGVAR(beingCarried),objNull]) || !isNull(_caller getvariable [QGVAR(carrying),objNull])}) exitwith {
+ [_caller,objNull] call EFUNC(common,carryObj);
+ [_caller, false] call FUNC(treatmentMutex);
+};
+_caller action ["WeaponOnBack", _caller];
+_killOnDrop = false;
+if (!alive _unit) then {
+ _unit = [_unit,_caller] call EFUNC(common,makeCopyOfBody_F);
+ _killOnDrop = true;
+};
+
+if !([_caller,_unit] call EFUNC(common,carryObj)) exitwith {
+ ["couldn't carry object!"] call EFUNC(common,debug); [_caller,"release"] call FUNC(treatmentMutex);
+};
+
+_caller selectWeapon (primaryWeapon _caller);
+
+[_caller,"acinpercmstpsraswrfldnon",1] call EFUNC(common,doAnimation);
+_unit attachTo [_caller, [0.1, -0.1, -1.25], "LeftShoulder"];
+[_unit,"AinjPfalMstpSnonWnonDf_carried_dead",1] call EFUNC(common,doAnimation);
+
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+[3,
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1.5))}, // the condition
+ {
+ private ["_caller","_target"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _killOnDrop = _this select 2;
+ [_caller, false] call FUNC(treatmentMutex);
+
+ // Registration for drag/carry functions
+ _target setvariable [QGVAR(beingCarried),_caller,true];
+ _caller setvariable [QGVAR(carrying),_unit,true];
+
+ // Removing any old drop scroll wheel actions
+ // TODO Do we still want scroll wheel actions?
+ if (!isnil QGVAR(DROP_ADDACTION)) then {
+ _caller removeAction GVAR(DROP_ADDACTION);
+ GVAR(DROP_ADDACTION) = nil;
+ };
+ // Adding the drop scroll wheel action.
+ GVAR(DROP_ADDACTION) = _caller addAction [format["Drop %1",[_target] call EFUNC(common,getName)], {[_this select 1, _this select 2] call FUNC(actionDropUnit);}];
+
+ // Raise an event
+ ["onStartMovingUnit", [_caller], [_caller, _Target, _killOnDrop, false]] call EFUNC(common,targetEvent);
+
+ }, // on success
+ {
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+ [(_this select 0), false] call FUNC(treatmentMutex);
+ [(_this select 0), objNull,[0, 0, 0]] call EFUNC(common,carryObj);
+ }, // on failure
+ [_caller, _unit, _killOnDrop] // arguments
+] call EFUNC(gui,loadingBar);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf
new file mode 100644
index 0000000000..984e22155a
--- /dev/null
+++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf
@@ -0,0 +1,52 @@
+/**
+ * fn_checkPulseLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_unit"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+_heartRate = [_unit,QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
+if (!alive _unit) then {
+ _heartRate = 0;
+};
+_heartRateOutput = "";
+_logOutPut = "";
+if (_heartRate > 1.0) then {
+ if ([_caller] call FUNC(medicClass)) then {
+ _heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_1";
+ _logOutPut = format["%1",round(_heartRate)];
+ } else {
+ // non medical personel will only find a pulse/HR
+ _heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_2";
+ _logOutPut = "Weak";
+ if (_heartRate > 60) then {
+ if (_heartRate > 100) then {
+ _heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_3";
+ _logOutPut = "Strong";
+ } else {
+ _heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_4";
+ _logOutPut = "Normal";
+ };
+ };
+ };
+} else {
+ _heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_5";
+ _logOutPut = "No heart rate";
+};
+
+_title = "STR_ACE_CHECK_PULSE";
+_content = ["STR_ACE_CHECK_PULSE_CHECKED_MEDIC",_heartRateOutput];
+[_caller, _title, _content,0, [[_unit] call EFUNC(common,getName), round(_heartRate)]] call EFUNC(gui,sendDisplayInformationTo);
+
+if (_logOutPut != "") then {
+ [_unit,"examine",format["%1 checked Heart Rate: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToQuickViewLog);
+};
diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf
new file mode 100644
index 0000000000..1e1b2a9752
--- /dev/null
+++ b/addons/medical/functions/fnc_actionCheckResponse.sqf
@@ -0,0 +1,51 @@
+/**
+ * fn_checkResponse.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target"];
+_caller = _this select 0;
+_target = _this select 1;
+
+if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {};
+[_caller, true] call FUNC(treatmentMutex);
+
+_title = format["STR_ACE_CHECK_RESPONSE"];
+_content = ["STR_ACE_CHECK_RESPONSE_CONTENT"];
+[_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo);
+
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+[2 + round(random(2)),
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition
+ {
+ private ["_caller","_target", "_output", "_title", "_content"];
+ _caller = _this select 0;
+ _target = _this select 1;
+
+ _output = "";
+ if ([_unit] call EFUNC(common,isAwake)) then {
+ _output = format[localize "STR_ACE_CHECK_REPONSE_RESPONSIVE",[_unit] call EFUNC(common,getName)];
+ } else {
+ _output = format[localize "STR_ACE_CHECK_REPONSE_UNRESPONSIVE",[_unit] call EFUNC(common,getName)];
+ };
+
+ _title = format["STR_ACE_CHECK_RESPONSE"];
+ _content = [format[localize "STR_ACE_CHECK_REPONSE_YOU_CHECKED",[_unit] call EFUNC(common,getName)],_output];
+ [_caller, _title, _content] call EFUNC(gui,sendDisplayInformationTo);
+ [_unit,"examine",_output] call FUNC(addToQuickViewLog);
+
+ [_caller,false] call FUNC(treatmentMutex);
+ }, // on success
+ {
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+ [(_this select 0),false] call FUNC(treatmentMutex);
+ }, // on failure
+ [_caller, _target] // arguments
+] call EFUNC(gui,loadingBar);
diff --git a/addons/medical/functions/fnc_actionDragUnit.sqf b/addons/medical/functions/fnc_actionDragUnit.sqf
new file mode 100644
index 0000000000..9f5ce03ed4
--- /dev/null
+++ b/addons/medical/functions/fnc_actionDragUnit.sqf
@@ -0,0 +1,91 @@
+/*
+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: call
+*/
+
+#include "script_component.hpp"
+
+private ["_caller", "_unit", "_positionUnit", "_killOnDrop"];
+_caller = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
+_unit = [_this, 1, objNull, [objNull]] call BIS_fnc_param;
+
+["FUNC(actionDragUnit) has been called",2] call EFUNC(common,debug);
+
+if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {};
+[_caller, true] call FUNC(treatmentMutex);
+
+if (!(_unit isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{ [_caller, false] call FUNC(treatmentMutex);};
+if (vehicle _caller != _caller || vehicle _unit != _unit) exitwith { [_caller, false] call FUNC(treatmentMutex);};
+
+if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _unit} || {(([_unit] call EFUNC(common,isAwake)))}) exitwith {
+ [_caller, false] call FUNC(treatmentMutex);
+};
+
+if (([_caller] call EFUNC(common,getCarriedObj)) != _unit && !(isNull ([_caller] call EFUNC(common,getCarriedObj))) || {!isNull(_unit getvariable [QGVAR(beingDragged),objNull]) || !isNull(_caller getvariable [QGVAR(dragging),objNull])}) exitwith {
+ [_caller,objNull] call EFUNC(common,carryObj);
+ [_caller, false] call FUNC(treatmentMutex);
+};
+_caller action ["WeaponOnBack", _caller];
+_killOnDrop = false;
+if (!alive _unit) then {
+ _unit = [_unit,_caller] call EFUNC(common,makeCopyOfBody_F);
+ _killOnDrop = true;
+};
+
+if !([_caller,_unit,[0.125, 1.007, 0]] call EFUNC(common,carryObj)) exitwith {
+ [_caller, false] call FUNC(treatmentMutex);
+};
+
+_unit setDir 180;
+[_unit,"AinjPpneMstpSnonWrflDb",true] call EFUNC(common,doAnimation);
+
+_caller selectWeapon (primaryWeapon _caller); // if no primairy weapon, add a fake one first
+if (currentWeapon _caller == primaryWeapon _caller) then {
+ [_caller,"AcinPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
+} else {
+ [_caller,"AcinPknlMstpSnonWnonDnon", 1] call EFUNC(common,doAnimation);
+};
+
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+[3,
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1.5))}, // the condition
+ {
+ private ["_caller","_target"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _killOnDrop = _this select 2;
+ [_caller, false] call FUNC(treatmentMutex);
+
+ // Registration for drag/carry functions
+ _target setvariable [QGVAR(beingDragged),_caller,true];
+ _caller setvariable [QGVAR(dragging), _target,true];
+
+ // Removing any old drop scroll wheel actions
+ // TODO Do we still want scroll wheel actions?
+ if (!isnil QGVAR(DROP_ADDACTION)) then {
+ _caller removeAction GVAR(DROP_ADDACTION);
+ GVAR(DROP_ADDACTION) = nil;
+ };
+ // Adding the drop scroll wheel action.
+ GVAR(DROP_ADDACTION) = _caller addAction [format["Drop %1",[_target] call EFUNC(common,getName)], {[_this select 1, _this select 2] call FUNC(actionDropUnit);}];
+
+ // Raise an event
+ ["onStartMovingUnit", [_caller], [_caller, _Target, _killOnDrop, true]] call EFUNC(common,targetEvent);
+
+ }, // on success
+ {
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+ [(_this select 0), false] call FUNC(treatmentMutex);
+ [(_this select 0), objNull,[0, 0, 0]] call EFUNC(common,carryObj);
+ }, // on failure
+ [_caller, _unit, _killOnDrop] // arguments
+] call EFUNC(gui,loadingBar);
diff --git a/addons/medical/functions/fnc_actionDropUnit.sqf b/addons/medical/functions/fnc_actionDropUnit.sqf
new file mode 100644
index 0000000000..fefedba662
--- /dev/null
+++ b/addons/medical/functions/fnc_actionDropUnit.sqf
@@ -0,0 +1,25 @@
+
+/*
+ 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:
+*/
+
+#include "script_component.hpp"
+
+private ["_caller", "_unit","_info","_draggedPerson"];
+_caller = _this select 0;
+_unit = _this select 1;
+
+[_caller,objNull] call EFUNC(common,carryObj);
+
+if (!isnil QGVAR(DROP_ADDACTION)) then {
+_caller removeAction GVAR(DROP_ADDACTION);
+ GVAR(DROP_ADDACTION) = nil;
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf
new file mode 100644
index 0000000000..cd20140bdb
--- /dev/null
+++ b/addons/medical/functions/fnc_actionLoadUnit.sqf
@@ -0,0 +1,31 @@
+/**
+ * fn_load_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+
+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;
+
+_vehicle = [_caller, _unit] call EFUNC(common,loadPerson_F);
+if (!isNull _vehicle) then {
+ if (!isnil QGVAR(DROP_ADDACTION)) then {
+ _caller removeAction GVAR(DROP_ADDACTION);
+ GVAR(DROP_ADDACTION) = nil;
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf b/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
new file mode 100644
index 0000000000..8df95c24d9
--- /dev/null
+++ b/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf
@@ -0,0 +1,43 @@
+/**
+ * fn_placeInBodyBag.sqf
+ * @Descr:
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_caller"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+if !([_caller, "ACE_itemBodyBag"] call EFUNC(common,hasItem)) exitwith {};
+
+[_caller, "ACE_itemBodyBag"] call EFUNC(common,useItem);
+
+_nameOfUnit = [_unit] call EFUNC(common,getName);
+if (alive _unit) then {
+ // force kill the unit.
+ [_unit, true] call EFUNC(common,setDead);
+};
+_onPosition = getPos _unit;
+_allVariables = [_unit] call EFUNC(common,getAllDefinedSetVariables);
+deleteVehicle _unit;
+
+_bodyBagCreated = createVehicle ["ACE_bodyBag", _onPosition, [], 0, "NONE"];
+_bodyBagCreated setvariable [QEGVAR(common,nameOfBody), _nameOfUnit, true];
+
+{
+// [_bodyBagCreated,_x select 0, _x select 2] call EFUNC(common,setDefinedVariable);
+}foreach _allVariables;
+// reset the position to ensure it is on the correct one.
+_bodyBagCreated setPos _onPosition;
+
+[[_bodyBagCreated], QEFUNC(common,revealObject_f), true] call BIS_fnc_MP;
+
+_bodyBagCreated setvariable [QEGVAR(logistics,enableDrag), true, true];
+
+_bodyBagCreated;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf
new file mode 100644
index 0000000000..d110c4c6c8
--- /dev/null
+++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf
@@ -0,0 +1,43 @@
+/**
+ * fn_removeTourniquet.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 EFUNC(common,sendHintTo);
+if (call FUNC(isSetTreatmentMutex)) exitwith {["MUTEX HAS BEEN SET - EXITING"] call EFUNC(common,debug);};
+ [_caller,"set"] call FUNC(treatmentMutex);
+
+
+if !([_unit, _selectionName] call FUNC(hasTourniquetAppliedTo)) exitwith {
+ [_caller,"release"] call FUNC(treatmentMutex);
+ [_caller,"There is no tourniquet on this body part!"] call EFUNC(common,sendHintTo);
+};
+
+if (vehicle _caller == _caller && (vehicle _unit == _unit)) then {
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic", 1] call EFUNC(common,doAnimation);
+};
+GVAR(ORIGINAL_POSITION_PLAYER) = getPos _caller;
+if !([5,{((vehicle player != player) ||((getPos player) distance GVAR(ORIGINAL_POSITION_PLAYER)) < 1)}, {},{hint "Action aborted. You moved away";}] call EFUNC(gui,loadingBar)) exitwith {
+ [_caller,"release"] call FUNC(treatmentMutex);
+};
+_part = [_selectionName] call FUNC(getBodyPartNumber);
+_tourniquets = [_unit,QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable);
+_tourniquets set[_part,0];
+[_unit,QGVAR(tourniquets),_tourniquets] call EFUNC(common,setDefinedVariable);
+
+_caller addMagazine "ACE_tourniquet";
+[_caller,"release"] call FUNC(treatmentMutex);
+
+[_unit,"treatment",format["%1 removed a tourniquet on %2",[_caller] call EFUNC(common,getName),_selectionName]] call FUNC(addActivityToLog);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf
new file mode 100644
index 0000000000..6eefb4b138
--- /dev/null
+++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf
@@ -0,0 +1,28 @@
+/**
+ * fn_unload_CMS.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 {};
+
+if ([_caller, _unit] call EFUNC(common,unloadPerson_F)) then {
+ if (_drag) then {
+ if ((vehicle _caller) == _caller) then {
+ [[_caller,_unit], QUOTE(FUNC(actionDragUnit)), _caller, false] call BIS_fnc_MP;
+ };
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_addActivityToLog.sqf b/addons/medical/functions/fnc_addActivityToLog.sqf
new file mode 100644
index 0000000000..c5fd4b1976
--- /dev/null
+++ b/addons/medical/functions/fnc_addActivityToLog.sqf
@@ -0,0 +1,46 @@
+/**
+ * fn_addActivityToLog.sqf
+ * @Descr: adds an item to the activity log
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT, type STRING, message STRING]
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_caller","_type","_activity","_log"];
+
+_unit = _this select 0;
+_type = _this select 1;
+_message = _this select 2;
+
+if (!local _unit) exitwith {
+ [_this, QUOTE(FUNC(addActivityToLog)), _unit] call EFUNC(common,execRemoteFnc);
+};
+_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, QGVAR(activityLog)] call EFUNC(common,getDefinedVariable);
+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, QGVAR(activityLog),_log] call EFUNC(common,setDefinedVariable);
+["Medical_OnActivityLogChanged", [_unit, _type, _message]] call ace_common_fnc_localEvent;
diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf
new file mode 100644
index 0000000000..798ec18b0e
--- /dev/null
+++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf
@@ -0,0 +1,22 @@
+/**
+ * fn_addHeartRateAdjustment.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
+ */
+
+#include "script_component.hpp"
+
+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, QGVAR(heartRateAdjustments)] call EFUNC(common,getDefinedVariable);
+_adjustment pushback [_value, _time, _callBack];
+_unit setvariable [QGVAR(heartRateAdjustments), _adjustment ];
+["Medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call ace_common_fnc_localEvent;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_addOpenWounds.sqf b/addons/medical/functions/fnc_addOpenWounds.sqf
new file mode 100644
index 0000000000..9f401b9cec
--- /dev/null
+++ b/addons/medical/functions/fnc_addOpenWounds.sqf
@@ -0,0 +1,46 @@
+/**
+ * fn_addOpenWounds.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
+ */
+
+#include "script_component.hpp"
+
+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 FUNC(getBodyPartNumber);
+};
+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 EFUNC(common,debug);
+};
+
+_openWounds = [_unit,QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
+_selection = _openWounds select _bodyPart;
+_newAmount = (_selection select _type) + _amount;
+if (_newAmount < 0) then {
+ _newAmount = 0;
+};
+_selection set [ _type, _newAmount];
+_openWounds set [ _bodyPart , _selection];
+[_unit, QGVAR(openWounds),_openWounds] call EFUNC(common,setDefinedVariable);
+
+[_unit] call FUNC(addToInjuredCollection);
+["Medical_onOpenWoundsAdded", [_unit, _bodyPart, _type, _amount]] call ace_common_fnc_localEvent;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf
new file mode 100644
index 0000000000..780f6e80bf
--- /dev/null
+++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf
@@ -0,0 +1,31 @@
+/**
+ * fnc_addToInjuredCollection.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private "_unit";
+_unit = _this select 0;
+if !(local _unit) exitwith{
+ [[_unit], QUOTE(FUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc);
+};
+
+if !(_unit getvariable[QGVAR(addedToUnitLoop),false]) then{
+ _unit setvariable [QGVAR(addedToUnitLoop),true];
+};
+
+if ([_unit] call FUNC(hasMedicalEnabled)) then {
+ if (isnil QGVAR(injuredUnitCollection)) then {
+ GVAR(injuredUnitCollection) = [];
+ };
+ if (_unit in GVAR(injuredUnitCollection)) exitwith {};
+ GVAR(injuredUnitCollection) pushback _unit;
+} else {
+ systemChat format["has no medical system enabled: %1",_unit];
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_addToQuickViewLog.sqf b/addons/medical/functions/fnc_addToQuickViewLog.sqf
new file mode 100644
index 0000000000..7a09078506
--- /dev/null
+++ b/addons/medical/functions/fnc_addToQuickViewLog.sqf
@@ -0,0 +1,44 @@
+/**
+ * fn_addToQuickViewLog.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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, QUOTE(FUNC(addToQuickViewLog)), _unit] call EFUNC(common,execRemoteFnc);
+};
+_moment = format["%1:%2",date select 3, _lastNumber];
+if (_lastNumber < 10) then {
+ _moment = format["%1:0%2",date select 3, _lastNumber];
+};
+
+
+_log = [_unit,QGVAR(quickViewLog)] call EFUNC(common,getDefinedVariable);
+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,QGVAR(quickViewLog),_log] call EFUNC(common,setDefinedVariable);
+["Medical_onQuickViewLogChanged", [_unit, _type, _message]] call ace_common_fnc_localEvent;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_addToTriageList.sqf b/addons/medical/functions/fnc_addToTriageList.sqf
new file mode 100644
index 0000000000..ec6fbc7d60
--- /dev/null
+++ b/addons/medical/functions/fnc_addToTriageList.sqf
@@ -0,0 +1,41 @@
+/**
+ * fn_addToTriageList.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_caller","_newItem","_log", "_inList","_amount"];
+_unit = _this select 0;
+_newItem = _this select 1;
+
+if (!local _unit) exitwith {
+ [_this, QUOTE(FUNC(addToTriageList)), _unit] call EFUNC(common,execRemoteFnc);
+};
+
+_log = [_unit,QGVAR(triageCard)] call EFUNC(common,getDefinedVariable);
+_inList = false;
+_amount = 1;
+{
+ if ((_x select 0) == _newItem) exitwith {
+ private "_info";
+ _info = _log select _foreachIndex;
+ _info set [1,(_info select 1) + 1];
+ _log set [_foreachIndex, _info];
+
+ _amount = (_info select 1);
+ _inList = true;
+ };
+}foreach _log;
+
+if (!_inList) then {
+ _log pushback [_newItem,1];
+};
+
+[_unit,QGVAR(triageCard),_log] call EFUNC(common,setDefinedVariable);
+["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call ace_common_fnc_localEvent;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_addTreatmentOption.sqf b/addons/medical/functions/fnc_addTreatmentOption.sqf
new file mode 100644
index 0000000000..12d5cb1da1
--- /dev/null
+++ b/addons/medical/functions/fnc_addTreatmentOption.sqf
@@ -0,0 +1,31 @@
+/**
+ * fnc_addTreatmentOption.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_displayName","_tooltip","_condition","_code", "_category","_options"];
+_displayName = _this select 0;
+_tooltip = _this select 1;
+_condition = _this select 2;
+_code = _this select 3;
+_category = _this select 4;
+
+if (isLocalized _displayName) then {
+ _displayName = localize _displayName;
+};
+
+if (isLocalized _tooltip) then {
+ _tooltip = localize _tooltip;
+};
+
+_options = missionNamespace getvariable [QGVAR(registeredTreatmentOptions_)+_category, []];
+_options pushback [_displayName, _tooltip, _condition, _code];
+
+missionNamespace setvariable [QGVAR(registeredTreatmentOptions_)+_category, _options];
diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf
new file mode 100644
index 0000000000..d0522a79dd
--- /dev/null
+++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf
@@ -0,0 +1,27 @@
+/**
+ * fn_canAccessMedicalEquipment.sqf
+ * @Descr: Check if caller can access targets medical equipment, based upon accessLevel
+ * @Author: Glowbal
+ *
+ * @Arguments: [target OBJECT, caller OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_target", "_caller", "_accessLevel", "_return"];
+_target = _this select 0;
+_caller = _this select 1;
+
+_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -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/addons/medical/functions/fnc_canPutInBodyBag.sqf b/addons/medical/functions/fnc_canPutInBodyBag.sqf
new file mode 100644
index 0000000000..18427b1d37
--- /dev/null
+++ b/addons/medical/functions/fnc_canPutInBodyBag.sqf
@@ -0,0 +1,17 @@
+/**
+ * fn_canPutInBodyBag.sqf
+ * @Descr:
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_caller"];
+_caller = _this select 0;
+_target = _this select 1;
+
+([_caller, "ACE_itemBodyBag"] call EFUNC(common,hasItem) && {(!(alive _target) || (_target getvariable [QEGVAR(common,isDead),false]) || (_target getvariable [QEGVAR(common,inReviveState), false]))} && {(_target distance _caller) < 7.5} && (vehicle _target == _unit)); // return
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf
new file mode 100644
index 0000000000..d407ff783a
--- /dev/null
+++ b/addons/medical/functions/fnc_determineIfFatal.sqf
@@ -0,0 +1,43 @@
+/**
+ * fn_determineIfFatal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+#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[QGVAR(unitDamageThreshold), [GVAR(damageThreshold_Players), GVAR(damageThreshold_Players), GVAR(damageThreshold_Players)]];
+} else {
+ _damageThreshold =_unit getvariable[QGVAR(unitDamageThreshold), [GVAR(damageThreshold_AI), GVAR(damageThreshold_AI), GVAR(damageThreshold_AI)]];
+};
+
+_damageBodyPart = ([_unit,QGVAR(bodyPartStatus),[0,0,0,0,0,0]] call EFUNC(common,getDefinedVariable)) 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/addons/medical/functions/fnc_determineIfUnconscious.sqf b/addons/medical/functions/fnc_determineIfUnconscious.sqf
new file mode 100644
index 0000000000..ebc3af26eb
--- /dev/null
+++ b/addons/medical/functions/fnc_determineIfUnconscious.sqf
@@ -0,0 +1,40 @@
+/**
+ * fn_determineIfUnconscious.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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[QGVAR(unitDamageThreshold), [GVAR(damageThreshold_Players), GVAR(damageThreshold_Players), GVAR(damageThreshold_Players)]];
+} else {
+ missionNamespace getvariable[QGVAR(unitDamageThreshold), [GVAR(damageThreshold_AI), GVAR(damageThreshold_AI), GVAR(damageThreshold_AI)]];
+};
+
+_damageBodyPart = ([_unit,QGVAR(bodyPartStatus),[0,0,0,0,0,0]] call EFUNC(common,getDefinedVariable)) select _part;
+
+// Check if damage to body part is higher as damage head
+if (_part == 0) exitwith {
+ ((_damageBodyPart * GVAR(setting_medicalDifficulty)) >= ((_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 * GVAR(setting_medicalDifficulty)) >= ((_damageThreshold select 1) * 0.5) && {(random(1) > 0.4)});
+};
+// Check if damage to body part is higher as damage limbs
+((_damageBodyPart * GVAR(setting_medicalDifficulty)) >= ((_damageThreshold select 2) * 0.8) && {(random(1) > 0.7)});
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_fromNumberToBodyPart.sqf b/addons/medical/functions/fnc_fromNumberToBodyPart.sqf
new file mode 100644
index 0000000000..a556ea1211
--- /dev/null
+++ b/addons/medical/functions/fnc_fromNumberToBodyPart.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_fromNumberToBodyPart.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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/addons/medical/functions/fnc_getActivityLog.sqf b/addons/medical/functions/fnc_getActivityLog.sqf
new file mode 100644
index 0000000000..5f5f1ba6de
--- /dev/null
+++ b/addons/medical/functions/fnc_getActivityLog.sqf
@@ -0,0 +1,23 @@
+/**
+ * fn_getActivityLog.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private["_unit"];
+_unit = _this select 0;
+_log = [_unit,QGVAR(activityLog)] call EFUNC(common,getDefinedVariable);
+
+if (isnil "_log") then {
+ _log = [];
+};
+if (typeName _log != typeName []) then {
+ _log = [];
+};
+_log
diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf
new file mode 100644
index 0000000000..929ca2b856
--- /dev/null
+++ b/addons/medical/functions/fnc_getBloodLoss.sqf
@@ -0,0 +1,36 @@
+/**
+ * fn_getBloodLoss.sqf
+ * @Descr: Calculate the total blood loss of a unit.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: NUMBER Total blood loss of unit
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+#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, QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable);
+_openWounds = [_this, QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
+_cardiacOutput = [_this] call FUNC(getCardiacOutput);
+
+{
+ 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/addons/medical/functions/fnc_getBloodPressure.sqf b/addons/medical/functions/fnc_getBloodPressure.sqf
new file mode 100644
index 0000000000..620b8d541d
--- /dev/null
+++ b/addons/medical/functions/fnc_getBloodPressure.sqf
@@ -0,0 +1,31 @@
+/**
+ * fn_getBloodPressure.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
+ */
+
+#include "script_component.hpp"
+
+/*
+ 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 FUNC(getCardiacOutput);
+_resistance = [_unit, QGVAR(peripheralResistance)] call EFUNC(common,getDefinedVariable);
+
+_bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
+_bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
+
+[_bloodPressureLow, _bloodPressureHigh];
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf
new file mode 100644
index 0000000000..69b240b1d7
--- /dev/null
+++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf
@@ -0,0 +1,59 @@
+/**
+ * fn_getBloodVolumeChange.sqf
+ * @Descr: Calculates the blood volume change and decreases the IVs given to the unit.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return: NUMBER Bloodvolume change
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+/*
+ 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 [QGVAR(bloodVolume), 100];
+_bloodVolumeChange = -(_unit call FUNC(getBloodLoss));
+
+if (_bloodVolume < 100.0) then {
+ if ((_unit getvariable [QGVAR(salineIVVolume), 0]) > 0) then {
+ _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
+ _ivVolume = (_unit getvariable [QGVAR(salineIVVolume), 0]) + IV_CHANGE_PER_SECOND;
+ _unit setvariable [QGVAR(salineIVVolume),_ivVolume];
+ if ([QEGVAR(fieldRations,module)] call EFUNC(common,isModuleEnabled_F)) then {
+ if ([_unit] call EFUNC(fieldRations,canDrink)) then {
+ _unit setvariable [QEGVAR(fieldRations,drinkStatus), (_unit getvariable [QEGVAR(fieldRations,drinkStatus), 100]) + 0.2];
+ };
+ };
+ };
+ if ((_unit getvariable [QGVAR(plasmaIVVolume), 0]) > 0) then {
+ _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
+ _ivVolume = (_unit getvariable [QGVAR(plasmaIVVolume), 0]) + IV_CHANGE_PER_SECOND;
+ _unit setvariable [QGVAR(plasmaIVVolume),_ivVolume];
+ };
+ if ((_unit getvariable [QGVAR(bloodIVVolume), 0]) > 0) then {
+ _bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
+ _ivVolume = (_unit getvariable [QGVAR(bloodIVVolume), 0]) + IV_CHANGE_PER_SECOND;
+ _unit setvariable [QGVAR(bloodIVVolume),_ivVolume];
+ };
+};
+
+_bloodVolumeChange
diff --git a/addons/medical/functions/fnc_getBodyPartNumber.sqf b/addons/medical/functions/fnc_getBodyPartNumber.sqf
new file mode 100644
index 0000000000..20a514a9ed
--- /dev/null
+++ b/addons/medical/functions/fnc_getBodyPartNumber.sqf
@@ -0,0 +1,54 @@
+/**
+ * fn_getBodyPartNumber.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf
new file mode 100644
index 0000000000..a22bb3d5d9
--- /dev/null
+++ b/addons/medical/functions/fnc_getCardiacOutput.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_getCardiacOutput.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
+ */
+
+#include "script_component.hpp"
+
+/*
+ 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 [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getvariable [QGVAR(heartRate), 80])/80-1);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_getCurrentSelectedInjuryData.sqf b/addons/medical/functions/fnc_getCurrentSelectedInjuryData.sqf
new file mode 100644
index 0000000000..93e2a6c871
--- /dev/null
+++ b/addons/medical/functions/fnc_getCurrentSelectedInjuryData.sqf
@@ -0,0 +1,19 @@
+/**
+ * fn_getCurrentSelectedInjuryData.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_return", "_current"];
+_return = "";
+if (dialog) then {
+ _current = lbCurSel 213;
+ _return = lbData [213,_current];
+};
+_return;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf
new file mode 100644
index 0000000000..a3c0c239cd
--- /dev/null
+++ b/addons/medical/functions/fnc_getHeartRateChange.sqf
@@ -0,0 +1,82 @@
+/**
+ * fn_getHeartRateChange.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+#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 [QGVAR(inCardiacArrest),false])) then {
+ _heartRate = _unit getvariable [QGVAR(heartRate), 80];
+ _bloodLoss = _unit call FUNC(getBloodLoss);
+
+ _adjustment = _unit getvariable [QGVAR(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 [QGVAR(heartRateAdjustments), _adjustment];
+
+ _bloodVolume = _unit getvariable [QGVAR(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/addons/medical/functions/fnc_getNewDamageBodyPart.sqf b/addons/medical/functions/fnc_getNewDamageBodyPart.sqf
new file mode 100644
index 0000000000..ec1efcab9f
--- /dev/null
+++ b/addons/medical/functions/fnc_getNewDamageBodyPart.sqf
@@ -0,0 +1,28 @@
+/**
+ * fnc_getNewDamageBodyPart.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_selectionName","_newDamage", "_previousDamage", "_origDamage", "_number"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_number = _this select 2;
+
+_previousDamage = _unit getvariable [QGVAR(bodyPartStatusPrevious), [0,0,0,0,0,0]];
+_newDamage = _amountOfDamage - (_previousDamage select _number);
+_previousDamage set [_number, _newDamage];
+[_unit,QGVAR(bodyPartStatusPrevious),_previousDamage] call EFUNC(common,setDefinedVariable);
+
+
+_origDamage = [_unit,QGVAR(bodyPartStatus),[0,0,0,0,0,0]] call EFUNC(common,getDefinedVariable);
+_origDamage set [_number, (_origDamage select _number) + _newDamage]; /* We are storing the total Damage done on a body part for determining the damage properly */
+[_unit,QGVAR(bodyPartStatus),_origDamage] call EFUNC(common,setDefinedVariable);
+
+_newDamage
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_getQuickViewLog.sqf b/addons/medical/functions/fnc_getQuickViewLog.sqf
new file mode 100644
index 0000000000..356c08391e
--- /dev/null
+++ b/addons/medical/functions/fnc_getQuickViewLog.sqf
@@ -0,0 +1,22 @@
+/**
+ * fn_getQuickViewLog.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private["_unit"];
+_unit = _this select 0;
+_log = [_unit,QGVAR(quickViewLog)] call EFUNC(common,getDefinedVariable);
+if (isnil "_log") then {
+ _log = [];
+};
+if (typeName _log != typeName []) then {
+ _log = [];
+};
+_log
diff --git a/addons/medical/functions/fnc_getSelectedBodyPart.sqf b/addons/medical/functions/fnc_getSelectedBodyPart.sqf
new file mode 100644
index 0000000000..6e018c2aac
--- /dev/null
+++ b/addons/medical/functions/fnc_getSelectedBodyPart.sqf
@@ -0,0 +1,16 @@
+/**
+ * fn_getSelectedBodyPart.sqf
+ * @Descr: Get the current selected body part for client
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return: STRING bodyPart selected
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+if (isnil QGVAR(selectedBodyPart)) then {
+ GVAR(selectedBodyPart) = "head";
+};
+GVAR(selectedBodyPart)
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_getTreatmentOptions.sqf b/addons/medical/functions/fnc_getTreatmentOptions.sqf
new file mode 100644
index 0000000000..aa69c9ea7e
--- /dev/null
+++ b/addons/medical/functions/fnc_getTreatmentOptions.sqf
@@ -0,0 +1,49 @@
+/**
+ * fnc_getTreatmentOptions.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+
+private ["_caller","_target","_category", "_result", "_nameCaller", "_nameTarget"];
+_caller = _this select 0;
+_target = _this select 1;
+_category = _this select 2;
+
+if ((_category == "advanced" || _category == "airway" || _category == "drag") && (_caller == _target)) exitwith {
+ [];
+};
+
+if (!([_caller] call EFUNC(common,canInteract))) exitwith {
+ [];
+};
+
+if (([_caller] call EFUNC(common,beingCarried))) exitwith {
+ [];
+};
+
+if (!(isNull([_caller] call EFUNC(common,getCarriedObj))) && _category != "drag") exitwith {
+ [];
+};
+
+_nameCaller = [_caller] call EFUNC(common,getName);
+_nameTarget = [_Target] call EFUNC(common,getName);
+
+_result = [];
+{
+ if ([_caller, _target] call (_x select 2)) then {
+
+ private ["_caller", "_target", "_category"];
+
+ // title, code, tooltip
+ _result pushback [format[_x select 0, _nameCaller, _nameTarget], _x select 3, format[_x select 1, _nameCaller, _nameTarget]];
+ };
+}foreach (missionNamespace getvariable [QGVAR(registeredTreatmentOptions_)+_category, []]);
+
+_result;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_getTriageList.sqf b/addons/medical/functions/fnc_getTriageList.sqf
new file mode 100644
index 0000000000..89660d7c97
--- /dev/null
+++ b/addons/medical/functions/fnc_getTriageList.sqf
@@ -0,0 +1,22 @@
+/**
+ * fn_getTriageList.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private["_unit"];
+_unit = _this select 0;
+_log = [_unit,QGVAR(triageCard)] call EFUNC(common,getDefinedVariable);
+if (isnil "_log") then {
+ _log = [];
+};
+if (typeName _log != typeName []) then {
+ _log = [];
+};
+_log
diff --git a/addons/medical/functions/fnc_getTriageStatus.sqf b/addons/medical/functions/fnc_getTriageStatus.sqf
new file mode 100644
index 0000000000..58b2f3f0d5
--- /dev/null
+++ b/addons/medical/functions/fnc_getTriageStatus.sqf
@@ -0,0 +1,24 @@
+/**
+ * fn_getTriageStatus.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_return","_status"];
+_unit = _this select 0;
+_status = _unit getvariable [QGVAR(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/addons/medical/functions/fnc_getTypeOfDamage.sqf b/addons/medical/functions/fnc_getTypeOfDamage.sqf
new file mode 100644
index 0000000000..80bbb0c972
--- /dev/null
+++ b/addons/medical/functions/fnc_getTypeOfDamage.sqf
@@ -0,0 +1,30 @@
+/**
+ * fn_getTypeOfDamage.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf
new file mode 100644
index 0000000000..721def7d3d
--- /dev/null
+++ b/addons/medical/functions/fnc_handleBandageOpening.sqf
@@ -0,0 +1,86 @@
+/**
+ * fn_handleBandageOpening.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+#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", "_waitingTime", "_selectedConfig"];
+_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 = [
+ ["ACE_bandage_basic", 900 + random (120), 0.75, 0.4],
+ ["ACE_packing_bandage", 1200 + random (120), 0.5, 0.6],
+ ["ACE_bandageElastic", 900 + random (900), 0.75, 0.2],
+ ["ACE_quikclot", 1, 0.1, 0],
+ ["default", 1, CFG_DEFAULT_WAITING_TIME, 1]
+];
+_selectedConfig = _config select (count _config - 1);
+_waitingTime = -1;
+
+_found = false;
+{
+ if (_item == _x select 0) exitwith {
+ _found = true;
+ if (random(1)> (1 - (_x select CHANCE))) then {
+
+ _waitingTime = (_x select WAITINGTIME);
+ _selectedConfig = _x;
+ };
+ };
+}foreach _config;
+
+if (!_found && (random(1)>0.2)) then {
+ _waitingTime = CFG_DEFAULT_WAITING_TIME;
+};
+
+if (_waitingTime > 0) then {
+ [{
+ private ["_params", "_config", "_person", "_amount","_bodyPart","_woundClass","_item", "_bandagedWounds","_bandagedBodyPart","_bandagedWoundClass","_openWounds", "_openWoundsBodyPart","_openWoundClass"];
+ _params = (_this select 0) select 0;
+ _config = (_this select 0) select 1;
+
+ _person = _params select 0;
+ _amount = _params select 1;
+ _bodyPart = _params select 2;
+ _woundClass = _params select 3;
+ _item = _params select 4;
+
+ _bandagedWounds = [_person,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable);
+ _bandagedBodyPart = _bandagedWounds select _bodyPart;
+ _bandagedWoundClass = _bandagedBodyPart select _woundClass;
+ if (_bandagedWoundClass >= _amount) then {
+ _openWounds =[_person,QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
+ _openWoundsBodyPart = _openWounds select _bodyPart;
+ _openWoundClass = _openWoundsBodyPart select _woundClass;
+
+ _bandagedBodyPart set [_woundClass,_bandagedWoundClass - (_amount * (_config select RATIO))];
+ _openWoundsBodyPart set [_woundClass,_openWoundClass + (_amount * (_config select RATIO))];
+
+ _bandagedWounds set[_bodyPart,_bandagedBodyPart];
+ _openWounds set[_bodyPart,_openWoundsBodyPart];
+ [_person,QGVAR(openWounds),_openWounds] call EFUNC(common,setDefinedVariable);
+ [_person,QGVAR(bandagedWounds),_bandagedWounds] call EFUNC(common,setDefinedVariable);
+
+ ["Medical_onWoundsReopened", [_person, (_amount * (_config select RATIO)), _bodyPart, _woundClass, _item]] call ace_common_fnc_localEvent;
+ };
+ // Delete this PFH, so it is only executed once
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ } , _waitingTime, [_this, _selectedConfig] ] call CBA_fnc_addPerFrameHandler;
+
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf
new file mode 100644
index 0000000000..8e528a203c
--- /dev/null
+++ b/addons/medical/functions/fnc_handleDamage.sqf
@@ -0,0 +1,83 @@
+/**
+ * fn_handleDamage.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 FUNC(getBodyPartNumber);
+
+// Check for vehicle crash
+if (vehicle _unit != _unit && {_bodyPartn < 0} && {isNull _sourceOfDamage} && {_typeOfProjectile == ""} && {_selectionName == ""}) then {
+ if (GVAR(setting_allowVehicleCrashInjuries)) 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 FUNC(hasMedicalEnabled))}) then {
+ _returnDamage = 0;
+ if (_amountOfDamage < 0) then {
+ _amountOfDamage = 0;
+ };
+
+ // Ensure damage is being handled correctly.
+ [_unit, _bodyPartn, _amountOfDamage] call FUNC(setDamageBodyPart);
+ _newDamage = [_unit, _amountOfDamage, _bodyPartn] call FUNC(getNewDamageBodyPart);
+
+ // figure out the type of damage so we can use that to determine what injures should be given.
+ _typeOfDamage = [_typeOfProjectile] call FUNC(getTypeOfDamage);
+
+ [_unit, _newDamage, _typeOfDamage, _bodyPartn] call FUNC(onInjury_assignOpenWounds);
+
+ if ((missionNamespace getvariable[QGVAR(setting_AdvancedLevel), 0]) > 0) then {
+ //[_unit,_newDamage,_typeOfDamage,_bodyPartn] call FUNC(onInjury_assignFractures);
+ if (GVAR(setting_allowAirwayInjuries)) then {
+ [_unit, _amountOfDamage, _typeOfDamage, _bodyPartn] call FUNC(onInjury_assignAirwayStatus);
+ };
+ };
+ [_unit, _newDamage, _bodyPartn] call FUNC(increasePain);
+
+ if (([_unit, _bodyPartn] call FUNC(determineIfFatal)) || !(alive (vehicle _unit))) then {
+ [_unit] call FUNC(setDead);
+ _returnDamage = 1;
+ } else {
+ [_unit] call FUNC(addToInjuredCollection);
+ if ([_unit, _bodyPartn] call FUNC(determineIfUnconscious)) then {
+ [_unit] call EFUNC(common,setUnconsciousState);
+ } else {
+ [_unit,_newDamage] call FUNC(handleReactionHit);
+ };
+ };
+
+ if (!(alive (vehicle _unit))) then {
+ _returnDamage = 1;
+ [_unit] call FUNC(setDead);
+ };
+ ["Medical_onHandleDamage", _this] call ace_common_fnc_localEvent;
+} else {
+ // handle damage thresholds
+};
+
+_returnDamage
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleDisplayEffects.sqf b/addons/medical/functions/fnc_handleDisplayEffects.sqf
new file mode 100644
index 0000000000..78de9e8912
--- /dev/null
+++ b/addons/medical/functions/fnc_handleDisplayEffects.sqf
@@ -0,0 +1,72 @@
+/**
+ * fn_handleDisplayEffects.sqf
+ * @Descr: displays visual effects to user
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+if (!hasInterface) exitwith{};
+45 cutRsc [QEGVAR(gui,ScreenEffectsBlack),"PLAIN"];
+
+FUNC(hb_effect) = {
+ _heartRate = _this select 0;
+ if (_heartRate < 0.1) exitwith {};
+ _hbSoundsFast = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3", "ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
+ _hbSoundsNorm = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
+ _hbSoundsSlow = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2", "ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
+ if (isnil QGVAR(playingHeartBeatSound)) then {
+ GVAR(playingHeartBeatSound) = false;
+ };
+ if (GVAR(playingHeartBeatSound)) exitwith {};
+ GVAR(playingHeartBeatSound) = true;
+
+ _sleep = 60 / _heartRate;
+ if (_heartRate < 60) then {
+ _sound = _hbSoundsSlow select (random((count _hbSoundsSlow) -1));
+ playSound _sound;
+
+ [{
+ if (time - ((_this select 0) select 1) < ((_this select 0) select 0)) exitwith {};
+
+ GVAR(playingHeartBeatSound) = false;
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ }, _sleep, [_sleep, time] ] call CBA_fnc_addPerFrameHandler;
+ } else {
+ if (_heartRate > 120) then {
+ _sound = _hbSoundsFast select (random((count _hbSoundsFast) -1));
+ playSound _sound;
+ [{
+ if (time - ((_this select 0) select 1) < ((_this select 0) select 0)) exitwith {};
+
+ GVAR(playingHeartBeatSound) = false;
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ }, _sleep, [_sleep, time] ] call CBA_fnc_addPerFrameHandler;
+ };
+ };
+};
+
+
+
+[{
+ private ["_unit","_bloodLoss"];
+ _unit = ACE_player;
+ if ([_unit] call EFUNC(common,isAwake)) then {
+ _bloodLoss = _unit call FUNC(getBloodLoss);
+ if (_bloodLoss >0) then {
+ [_bloodLoss] call EFUNC(gui,effectBleeding);
+ };
+
+ [{
+ [((_this select 0) select 0 getvariable[QGVAR(amountOfPain), 0])] call EFUNC(gui,effectPain);
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ }, 0.25, [_unit] ] call CBA_fnc_addPerFrameHandler;
+
+ [(_unit getvariable[QGVAR(heartRate), 70])] call FUNC(hb_effect);
+ ["medicalEffectsLoop", [_unit]] call ace_common_fnc_localEvent
+ };
+ } , 0.5, [] ] call CBA_fnc_addPerFrameHandler;
diff --git a/addons/medical/functions/fnc_handleHeal.sqf b/addons/medical/functions/fnc_handleHeal.sqf
new file mode 100644
index 0000000000..04e17a5d4c
--- /dev/null
+++ b/addons/medical/functions/fnc_handleHeal.sqf
@@ -0,0 +1,29 @@
+/**
+ * fn_handleHeal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit",'_healer'];
+_unit = _this select 0;
+_healer = _this select 1;
+
+if (!(isPlayer _healer) && GVAR(setting_allowAIFullHeal) && !([_unit] call EFUNC(common,isUnconscious))) then {
+ [_unit, QGVAR(openWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call EFUNC(common,setDefinedVariable);
+ [_unit, QGVAR(bandagedWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call EFUNC(common,setDefinedVariable);
+
+ if (_unit != _healer) then {
+ [_unit,"STR_ACE_BANDAGED","STR_ACE_IS_BANDAGING_YOU", 0, [[_healer] call EFUNC(common,getName)]] call EFUNC(gui,sendDisplayMessageTo);
+ };
+ [_unit,"treatment",format["%1 has patched up the patient",[_healer] call EFUNC(common,getName)]] call FUNC(addActivityToLog);
+
+ ["Medical_onHandleHeal", _this] call ace_common_fnc_localEvent;
+};
+
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleReactionHit.sqf b/addons/medical/functions/fnc_handleReactionHit.sqf
new file mode 100644
index 0000000000..7f10a64620
--- /dev/null
+++ b/addons/medical/functions/fnc_handleReactionHit.sqf
@@ -0,0 +1,51 @@
+/**
+ * fn_handleReactionHit.sqf
+ * @Descr: triggers a reaction to being hit for a unit and spawns on screen effects.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_amountOfDamage"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+
+if (_amountOfDamage > 0.2) then {
+ // [_unit] call FUNC(playInjuredSound);
+ 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 EFUNC(common,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 EFUNC(common,setProne);
+ };
+ };
+ if (isPlayer _unit) then {
+ 76 cutRsc [QEGVAR(gui,ScreenEffectsHit),"PLAIN"];
+ addCamShake [3, 5, _amountOfDamage + random 10];
+ };
+} else {
+ if (_amountOfDamage > 0) then {
+ if (isPlayer _unit) then {
+ 76 cutRsc [QEGVAR(gui,ScreenEffectsHit),"PLAIN"];
+ };
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment.sqf b/addons/medical/functions/fnc_handleTreatment.sqf
new file mode 100644
index 0000000000..ec91260615
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment.sqf
@@ -0,0 +1,69 @@
+/**
+ * fnc_handleTreatment.sqf
+ * @Descr: entry point for all treatment actions. Handles the syncronization between treatment actions and equipment usages. Will pass on the the treatment action to their category handlers.
+ * When using an undefined category, the caller is responsible for cleaning up, including unlocking the treatment mutex.
+ * @Author: Glowbal
+ *
+ * @Arguments: [caller OBJECT, target OBJECT, selectionName STRING, removeItem STRING, category STRING]
+ * @Return: nil
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+diag_log format["handleTreatment has been called - args: %1 ",_this];
+systemChat format["handleTreatment has been called - args: %1 ",_this];
+
+private ["_treatingPerson","_injuredPerson","_selectionName","_removeItem","_attributes","_patient", "_continue", "_prevAnim"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_category = _this select 4;
+
+if (!local _caller) exitwith {
+ [[_caller, _target, _selectionName, _removeItem, _category], QUOTE(FUNC(handleTreatment)), _caller] call EFUNC(common,execRemoteFnc);
+ false;
+};
+
+if ([_caller] call FUNC(isSetTreatmentMutex)) exitwith {
+ if (_caller == ACE_player) then {
+ // display a message - currently occupied with treatment already
+ };
+ false
+};
+[_caller, true] call FUNC(treatmentMutex);
+
+if (!([_caller, _target, _removeItem] call FUNC(hasEquipment)) && _removeItem != "") exitwith {
+ [_caller,"release"] call FUNC(treatmentMutex);
+};
+
+// TODO make dynamic
+switch (toLower _category) do {
+ case "bandage": {
+ ([_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Category_Bandaging));
+ };
+ case "medication": {
+ ([_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Category_Medication));
+ };
+ case "advanced": {
+ ([_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Category_Advanced));
+ };
+ case "airway": {
+ ([_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Category_Airway));
+ };
+ default {
+ // do not handle the request
+ false;
+ };
+};
+
+// Entry point for any un supported treatment actions.
+// Expected to have one of the local events call the treatment completed event.
+["Medical_performingTreatment", [_caller, _target, _selectionName, _removeItem, _category]] call ace_common_fnc_localEvent;
+
+if ([_target] call FUNC(hasMedicalEnabled)) then {
+ [_target] call FUNC(addToInjuredCollection);
+};
+
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_AdvancedLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_AdvancedLocal.sqf
new file mode 100644
index 0000000000..85e29aff31
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_AdvancedLocal.sqf
@@ -0,0 +1,49 @@
+/**
+ * fn_heal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_caller", "_selectionName", "_removeItem", "_prevAnim"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_prevAnim = _this select 4;
+
+// TODO old code, has to be replaced by something more dynamic.
+_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 = [_target,(_attributes select 0)] call EFUNC(common,getDefinedVariable);
+ _value = _value + (_attributes select 1);
+ [_target,(_attributes select 0),_value] call EFUNC(common,setDefinedVariable);
+
+ _patient = "patient";
+ if (_target == _caller) then {
+ _patient = "himself";
+ };
+
+ // TODO localization
+ [_target,"treatment",format["%1 has given %4 a %2(%3ml)",[_caller] call cse_fnc_getName,_attributes select 2,_attributes select 1,_target]] call FUNC(addActivityToLog);
+ [_target,_removeItem] call FUNC(addToTriageList);
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf
new file mode 100644
index 0000000000..bc593d5520
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_AirwayLocal.sqf
@@ -0,0 +1,36 @@
+/**
+ * fn_treatmentAirwayLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim", "_displayingIcon", "_part"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+
+if (!local _target) exitwith{};
+
+[_target,"STR_ACE_AIRWAY","STR_ACE_IS_TREATING_YOUR_AIRWAY",0, [([_caller] call EFUNC(common,getName))]] call EFUNC(gui,sendDisplayMessageTo);
+[_target,_removeItem] call FUNC(addToTriageList);
+
+
+_airwayStatus = [_target,QGVAR(airway)] call EFUNC(common,getDefinedVariable);
+if (_airwayStatus > 0) then {
+ if (!([_treatingPerson] call FUNC(medicClass))) then {
+ _target setvariable [QGVAR(airwayTreated), true, true];
+ } else {
+ if (random (1) >= 0.35) then {
+ _target setvariable [QGVAR(airwayTreated), true, true];
+ };
+ };
+};
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf
new file mode 100644
index 0000000000..04315656d6
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_BandageLocal.sqf
@@ -0,0 +1,145 @@
+/**
+ * fn_bandageLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_Target","_selectionName","_removeItem","_part","_openWounds","_woundsArray","_highest_amount","_highestSpot","_collectiveImpact", "_highestTotal","_totalNumber", "_selectedData"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+systemChat format ["Local bandage: %1",_this];
+
+// TODO figure this out later on
+//_selectedData = [_this, 4, "", [""]] call BIS_fnc_Param;
+
+if (!local _target) exitwith{
+ ["fnc_bandageLocal called on non local machine",3] call EFUNC(common,debug);
+};
+
+if (_caller != _target) then {
+ [_target,"STR_ACE_BANDAGING", "STR_ACE_IS_BANDAGING_YOU", 0, [[_treatingPerson] call EFUNC(common,getName)]] call EFUNC(gui,sendDisplayMessageTo);
+};
+
+[_target,_removeItem] call FUNC(addToTriageList);
+
+// TODO make dynamic
+_collectiveImpact = switch (_removeItem) do {
+ case "ACE_packing_bandage": {[1.0, 1.5, 1.2]};
+ case "ACE_bandageElastic": {[1.3, 0.9, 0.9]};
+ case "ACE_bandage_basic": {[1.5, 1.0, 0.6]};
+ case "ACE_stitching": {[2.0, 2.0, 2.0]};
+ case "ACE_quikclot": {[0.9, 0.3, 0.3]};
+ default {[0.9, 0.5, 0.5]};
+};
+
+_part = [_selectionName] call FUNC(getBodyPartNumber);
+
+_openWounds = [_target,QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
+_woundsArray = _openWounds select _part;
+
+// Find the type of which we have the most injures and the amount of this for the selected bodypart.
+_highestSpot = 0;
+_highest_amount = 0;
+{
+ if (_x > _highest_amount) then {
+ _highestSpot = _foreachIndex;
+ _highest_amount = _x;
+ };
+}foreach _woundsArray;
+
+// If we have bandaging aid enabled (on easy difficulty), we will find the body part with the most injuries and use that instead.
+if (GVAR(setting_enableBandagingAid)) then {
+ _highestTotal = 0;
+ {
+ // find out how many injuries this bodypart has
+ _totalNumber = 0;
+ {
+ _totalNumber = _totalNumber + _x;
+ }foreach _x;
+
+ // Check if this body part has the highest amount of injuries
+ if (_totalNumber > _highestTotal) then {
+ _part = _foreachIndex;
+ _highestTotal = _totalNumber;
+ };
+ }foreach _openWounds;
+
+ // Find the type of which we have the most injures and the amount of this for the selected bodypart.
+ _woundsArray = _openWounds select _part;
+ _highestSpot = 0;
+ _highest_amount = 0;
+ {
+ if (_x > _highest_amount) then {
+ _highestSpot = _foreachIndex;
+ _highest_amount = _x;
+ };
+ }foreach _woundsArray;
+};
+
+// Find the amount of impact the used bandage has for the injury
+_impactOfBandage = (_collectiveImpact select _highestSpot);
+
+_wounds = _highest_amount;
+_amountOfInpact = 0;
+
+// if we have wounds, log that we have bandaged those and find the real impact of the bandage
+if (_wounds > 0) then {
+ [_target,"treatment",format["%2 has bandaged a wound on %1",[_part] call FUNC(fromNumberToBodyPart),[_caller] call EFUNC(common,getName)]] call FUNC(addActivityToLog);
+
+ _amountOfInpact = _impactOfBandage;
+ if (_impactOfBandage > _wounds) then {
+ _amountOfInpact = _wounds;
+ };
+};
+
+// Decrease the impact
+_wounds = (_wounds - _impactOfBandage);
+if (_wounds < 0) then {
+ _wounds = 0;
+};
+// Adjust the wounds value for the unit
+_woundsArray set[_highestSpot, _wounds];
+_openWounds set [_part, _woundsArray];
+[_target,QGVAR(openWounds),_openWounds] call EFUNC(common,setDefinedVariable);
+
+
+// Check if we have wounds opening enabled
+if (isnil QGVAR(setting_advancedWoundsSetting)) then {
+ GVAR(setting_advancedWoundsSetting) = true;
+};
+if (_amountOfInpact > 0.0 && GVAR(setting_advancedWoundsSetting)) then {
+
+ // Find the bandaged body part
+ _bandagedWounds = [_target,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable);
+ _bandagedPart = _bandagedWounds select _part;
+
+ // Increase the amount of bandaged wounds
+ _bandagedWound = _bandagedPart select _highestSpot;
+ _bandagedPart set [_highestSpot,_bandagedWound + _amountOfInpact];
+ _bandagedWounds set[_part,_bandagedPart];
+
+ // Store the new bandaged wounds
+ [_target,QGVAR(bandagedWounds),_bandagedWounds] call EFUNC(common,setDefinedVariable);
+
+ // Do not provide the possibility for small injuries to open again
+ if (_highestSpot > 0) then {
+ [_target, _amountOfInpact,_part,_highestSpot, _removeItem] call FUNC(handleBandageOpening);
+ };
+};
+
+// If all wounds have been bandaged, we will reset all damage to 0.
+if (!([_target] call FUNC(hasOpenWounds))) then {
+ _target setDamage 0;
+ // TODO also set hitpoints to 0
+};
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf b/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf
new file mode 100644
index 0000000000..61e12687a7
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_CPR.sqf
@@ -0,0 +1,71 @@
+/**
+ * fn_performCPR.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
+ */
+
+#include "script_component.hpp"
+
+#define CPR_TIME 25 // time in seconds
+
+private ["_caller","_target", "_selectionName", "_prevAnim"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_prevAnim = _this select 4;
+
+// only allow CPR once
+if (_caller getvariable[QGVAR(isProvidingCPR), false]) exitwith {true};
+
+_caller setvariable[QGVAR(isProvidingCPR), true, true];
+
+[_this] call EFUNC(common,debug);
+[_caller] call FUNC(treatmentMutex);
+
+if (_target == _caller) exitwith{[_caller,"You cannot give yourself CPR"] call EFUNC(common,sendHintTo); true};
+
+[_caller,"You start providing CPR"] call EFUNC(common,sendHintTo);
+
+if (vehicle _target == _target) then {
+ [_unit,"AinjPpneMstpSnonWrflDnon_rolltoback", 1] call EFUNC(common,doAnimation);
+};
+
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+[CPR_TIME,
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1)) && (_caller getvariable[QGVAR(isProvidingCPR), false])}, // the condition
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+
+ [[_caller, _target], QUOTE(FUNC(handleTreatment_Action_CPRLocal)), _target] call EFUNC(common,execRemoteFnc);
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ _caller setvariable[QGVAR(isProvidingCPR), nil, true];
+ ["Medical_handleTreatment_CPR", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on success
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim"];
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+ _caller setvariable[QGVAR(isProvidingCPR), nil, true];
+ ["Medical_handleTreatment_CPR", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on failure
+ [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments
+] call EFUNC(gui,loadingBar);
+
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_CPRLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_CPRLocal.sqf
new file mode 100644
index 0000000000..537fd85088
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_CPRLocal.sqf
@@ -0,0 +1,35 @@
+/**
+ * fnc_handleTreatment_Action_CPRLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target", "_n"];
+_caller = _this select 0;
+_target = _this select 1;
+
+
+_n = _target getvariable [QEGVAR(common,ENABLE_REVIVE_COUNTER),0];
+if (_n > 0) then {
+ _n = _n - random(20);
+ if (_n < 0) then {
+ _n = 0;
+ };
+ _target setvariable [QEGVAR(common,ENABLE_REVIVE_COUNTER), _n];
+};
+
+if (random(1)>= 0.6) exitwith {
+ [_caller,"CPR Success"] call cse_fnc_sendHintTo;
+ _target setvariable [QGVAR(inCardiacArrest), nil,true];
+
+ [_target, QGVAR(heartRate),40] call EFUNC(common,setDefinedVariable);
+ [_target, QGVAR(bloodPressure),[50,70]] call EFUNC(common,setDefinedVariable);
+};
+
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_MedicationLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_MedicationLocal.sqf
new file mode 100644
index 0000000000..bdaa9d7d73
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_MedicationLocal.sqf
@@ -0,0 +1,172 @@
+/**
+ * fnc_handleTreatment_Action_MedicationLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_selectionName","_removeItem","_attributes"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+_attributes = switch (_removeItem) do {
+ case "ACE_morphine": {
+ [QGVAR(givenMorphine),"Morphine"]
+ };
+ case "ACE_atropine": {
+ [QGVAR(givenAtropine),"Atropine"]
+ };
+ case "ACE_epinephrine": {
+ [QGVAR(givenEpinephrine),"Epinephrine"]
+ };
+ default {[]};
+};
+
+if (count _attributes > 1) then {
+ private ["_value","_patient"];
+ [_target] call FUNC(addToInjuredCollection);
+ _value = [_target,(_attributes select 0)] call EFUNC(common,getDefinedVariable);
+ [_target,(_attributes select 0),_value + 1] call EFUNC(common,setDefinedVariable);
+
+ _patient = "patient";
+ if (_target == _caller) then {
+ _patient = "himself";
+ };
+ [_target,"treatment",format["%1 has given %3 %2",[_caller] call EFUNC(common,getName), (_attributes select 1),_patient]] call FUNC(addActivityToLog);
+ [_target,_removeItem] call FUNC(addToTriageList);
+
+ _usedMedication = {
+ private ["_target","_var","_usedMed","_morphineUsed","_epiUsed","_atroUsed","_totalUsed"];
+ _target = _this select 0;
+ _var = _this select 1;
+ _overDose = 5;
+ _wearOff = 120;
+
+ if (!alive _target) exitwith{};
+ if (count _this > 2) then {
+ _overDose = _this select 2;
+ if (count _this > 3) then {
+ _wearOff = _this select 3;
+ };
+ };
+ _usedMed = [_target, _var, 0] call EFUNC(common,getDefinedVariable);
+ if (isnil "_usedMed") then {
+ _usedMed = 0;
+ };
+ if (_usedMed > (_overDose + round(random(2)))) then {
+ [_target] call EFUNC(common,setDead);
+ };
+
+ _morphineUsed = _target getvariable [QGVAR(givenMorphine), 0];
+ _epiUsed = _target getvariable [QGVAR(givenEpinephrine), 0];
+ _atroUsed = _target getvariable [QGVAR(givenAtropine), 0];
+ _totalUsed = _morphineUsed + _epiUsed + _atroUsed;
+
+ if (_totalUsed > 10) then {
+ [_target] call EFUNC(common,setDead);
+ };
+
+ // TODO use PFH instead
+ [_target,_wearOff,_var] spawn {
+ sleep ((_this select 1) + (round(random(30))));
+ _amountDecreased = 0;
+ _usedMed = [_this select 0, _this select 2] call EFUNC(common,getDefinedVariable);
+ if (typeName _usedMed != typeName 0) then {
+ _usedMed = 0;
+ };
+ while {(_usedMed > 0.000000 && _amountDecreased < 1.000000)} do {
+ _usedMed = ([_this select 0, _this select 2] call EFUNC(common,getDefinedVariable));
+ if ( typeName _usedMed != typeName 0) then {
+ _usedMed = 0;
+ };
+ [_this select 0, _this select 2,_usedMed - 0.001] call EFUNC(common,setDefinedVariable);
+ _amountDecreased = _amountDecreased + 0.001;
+ sleep 1;
+ };
+ };
+ };
+
+ private ["_heartRate","_pain"];
+
+ switch (_removeItem) do {
+ case "ACE_atropine": {
+
+ _heartRate = [_target, QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
+ //_heartRate = [_target, QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
+ if (alive _target) then {
+ if (_heartRate > 0) then {
+ if (_heartRate <= 40) then {
+ [_target, -(10 + random(20)), 30] call FUNC(addHeartRateAdjustment);
+ };
+
+ if (_heartRate > 40) then {
+ if (_heartRate > 120) then {
+ [_target, -(10 + random(50)), 30] call FUNC(addHeartRateAdjustment);
+ } else {
+ [_target, -(10 + random(40)), 30] call FUNC(addHeartRateAdjustment);
+ };
+ };
+ };
+ //[_target, QGVAR(heartRate),_heartRate] call EFUNC(common,setDefinedVariable);
+ [_target,(_attributes select 0),5] call _usedMedication;
+ };
+ };
+ case "ACE_epinephrine": {
+ _heartRate = [_target, QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
+ if (alive _target) then {
+ if (_heartRate > 0) then {
+ if (_heartRate <= 40) then {
+ [_target, (10 + random(20)), 30] call FUNC(addHeartRateAdjustment);
+ };
+
+ if (_heartRate > 40) then {
+ if (_heartRate > 120) then {
+ [_target, (10 + random(50)), 30] call FUNC(addHeartRateAdjustment);
+ } else {
+ [_target, (10 + random(40)), 30, {}] call FUNC(addHeartRateAdjustment);
+ };
+ };
+ };
+ [_target,(_attributes select 0),3] call _usedMedication;
+ };
+ };
+ case "ACE_morphine": {
+ private ["_usedMorphine"];
+ _pain = [_target, QGVAR(amountOfPain)] call EFUNC(common,getDefinedVariable);
+ _pain = 0;
+ //_pain = _pain - 35;
+ if (_pain <= 0) then {
+ _pain = 0;
+ };
+ _heartRate = [_target, QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
+ [format["used morphine: %1",_heartRate]] call EFUNC(common,debug);
+ if (alive _target) then {
+ if (_heartRate > 0) then {
+ if (_heartRate <= 40) then {
+ [_target, -(10 + random(20)), 40] call FUNC(addHeartRateAdjustment);
+ };
+ if (_heartRate > 40) then {
+ if (_heartRate > 120) then {
+ [_target, -(10 + random(50)), 40] call FUNC(addHeartRateAdjustment);
+ } else {
+ [_target, -(10 + random(40)), 40] call FUNC(addHeartRateAdjustment);
+ };
+ };
+ };
+ };
+ [_target, QGVAR(amountOfPain),_pain] call EFUNC(common,setDefinedVariable);
+ [_target,(_attributes select 0),4,120] call _usedMedication;
+ };
+ default {
+
+ };
+ };
+};
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf b/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf
new file mode 100644
index 0000000000..a6e9156966
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_Stitching.sqf
@@ -0,0 +1,104 @@
+/**
+ * fn_performStitching.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+#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"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_prevAnim = _this select 4;
+
+[_caller,"STR_ACE_STITCHING","STR_ACE_START_STITCHING_INJURIES", 0, [[_injuredPerson] call EFUNC(common,getName),_selectionName]] call EFUNC(gui,sendDisplayMessageTo);
+
+_bandagedWounds = [_injuredPerson,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable);
+_bodyPartN = [_selectionName] call FUNC(getBodyPartNumber);
+
+_allWounds = _bandagedWounds select _bodyPartN;
+_totalTime = ((_allWounds select 0) * WAITING_TIME_MEDIUM) + ((_allWounds select 1) * WAITING_TIME_MEDIUM) + ((_allWounds select 2) * WAITING_TIME_MEDIUM);
+
+
+// Get the current position for the treatment person
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+
+_caller setvariable [QGVAR(lastStichPerformed), diag_tickTime];
+[{
+ private ["_caller","_target", "_selectionName", "_prevAnim", "_removeItem","_args"];
+ _args = _this select 0;
+ _caller = _args select 0;
+ _target = _args select 1;
+ _selectionName = _args select 2;
+ _removeItem = _args select 3;
+ _prevAnim = _args select 4;
+
+ if ((vehicle _caller != _caller) || ((getPos _caller) distance (_caller getvariable GVAR(ORIGINAL_POSITION_PLAYER))) >= 1) then {
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+ [QGVAR(treatmentIconID), false, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon);
+ ["Medical_handleTreatment_Stitching", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ };
+
+ if (diag_tickTime - (_caller getvariable [QGVAR(lastStichPerformed), diag_tickTime - WAITING_TIME_MEDIUM]) >= WAITING_TIME_MEDIUM) then {
+ _caller setvariable [QGVAR(lastStichPerformed), diag_tickTime];
+
+ _bandagedWounds = [_target,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable);
+ _allWounds = _bandagedWounds select _bodyPartN;
+ {
+ if (_x > 0) exitwith {
+ _value = _x - 1;
+ if (_value < 0) then {
+ _value = 0;
+ };
+
+ _allWounds set[_foreachIndex, _value];
+ };
+ }foreach _allWounds;
+
+ _bandagedWounds set [_bodyPartN, _allWounds];
+ [_target, QGVAR(bandagedWounds), _bandagedWounds] call EFUNC(common,setDefinedVariable);
+
+ if (((_allWounds select 0) * 2.5) + ((_allWounds select 1) * 3.5) + ((_allWounds select 2) * 4.5) <= 0) then {
+ [_target,"treatment",format["%1 has stitched up some bandages wounds",[_caller] call EFUNC(common,getName)]] call FUNC(addActivityToLog);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+ [QGVAR(treatmentIconID), false, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon);
+ ["Medical_handleTreatment_Stitching", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ };
+ };
+}, 0.1, [_caller, _target, _selectionName, _removeItem, _prevAnim] ] call CBA_fnc_addPerFrameHandler;
+
+
+// Necessary for showing the loading bar along side
+[_totalTime, // the time to wait
+ {_caller = _this select 0; ((vehicle _caller != _caller) ||((getPos _caller) distance GVAR(ORIGINAL_POSITION_PLAYER)) < 1)}, // the condition, called every frame
+ {}, // on success
+ {}, // on failure
+ [_caller] // arguments
+] call EFUNC(gui,loadingBar);
+
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf
new file mode 100644
index 0000000000..53f82f74f0
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_fullHeal.sqf
@@ -0,0 +1,74 @@
+/**
+ * fn_heal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_caller", "_selectionName", "_removeItem", "_prevAnim"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+_prevAnim = _this select 4;
+
+if !((GVAR(setting_aidKitRestrictions) == 0 && ([_caller] call FUNC(inMedicalFacility))) || (GVAR(setting_aidKitRestrictions) == 1 && ([_caller] call FUNC(inMedicalFacility)) && (!([_unit] call FUNC(hasOpenWounds)))) || (GVAR(setting_aidKitRestrictions) == 2) || (GVAR(setting_aidKitRestrictions) == 3 && (!([_unit] call FUNC(hasOpenWounds))))) exitwith {false};
+
+
+// Get the current position for the treatment person
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+
+[7, // the time to wait
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition, called every frame
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim", "_removeItem"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+ _prevAnim = _this select 4;
+
+ if (GVAR(setting_removeAidKitOnUse)) then {
+ [_caller, _target, _removeItem] call FUNC(useEquipment);
+ };
+ [[_caller, _target], QUOTE(FUNC(handleTreatment_Action_HealLocal)), _target] call EFUNC(common,execRemoteFnc);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ [QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(gui,displayIcon);
+ ["Medical_handleTreatment_FullHeal", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on success
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim", "_removeItem"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+ _prevAnim = _this select 4;
+
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ [QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(gui,displayIcon);
+ ["Medical_handleTreatment_FullHeal", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on failure
+ [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments
+] call EFUNC(gui,loadingBar);
+
+
+if (!(_unit getvariable [QEGVAR(common,isDead),false]) && alive _unit) then {
+ [[_unit,_caller], QUOTE(FUNC(healLocal)), _unit] call EFUNC(common,execRemoteFnc);
+};
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_fullHealLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_fullHealLocal.sqf
new file mode 100644
index 0000000000..1d08a00e23
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_fullHealLocal.sqf
@@ -0,0 +1,67 @@
+/**
+ * fn_healLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_caller"];
+_unit = _this select 0;
+_caller = _this select 1;
+
+if (alive _unit) exitwith {
+ [_unit,"treatment",format["%1 used a personal aid kit",[_caller] call EFUNC(common,getName)]] call FUNC(addActivityToLog);
+
+ // Public variables
+ [_unit,QGVAR(openWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(bandagedWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call EFUNC(common,setDefinedVariable);
+
+ if (GVAR(setting_AdvancedLevel) > 0) then {
+ [_unit,QGVAR(fractures),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(airway),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(splints),0] call EFUNC(common,setDefinedVariable);
+ };
+
+ [_unit,QGVAR(tourniquets),[0,0,0,0,0,0]] call EFUNC(common,setDefinedVariable);
+
+ //[QGVAR(activityLog),[]] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(triageLevel),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(triageCard),[]] call EFUNC(common,setDefinedVariable);
+
+ // Private variables
+ [_unit,QGVAR(bloodVolume),100] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(bloodIVVolume),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(plasmaIVVolume),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(salineIVVolume),0] call EFUNC(common,setDefinedVariable);
+
+ if (GVAR(setting_AdvancedLevel) > 0) then {
+ [_unit,QGVAR(heartRate),80] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(andrenaline),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(bloodPressure),[80,120]] call EFUNC(common,setDefinedVariable);
+ };
+ [_unit,QGVAR(amountOfPain),0] call EFUNC(common,setDefinedVariable);
+
+ [_unit,QGVAR(givenMorphine),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(givenAtropine),0] call EFUNC(common,setDefinedVariable);
+ [_unit,QGVAR(givenEpinephrine),0] call EFUNC(common,setDefinedVariable);
+
+ [_unit,QGVAR(bodyPartStatus),[0,0,0,0,0,0]] call EFUNC(common,setDefinedVariable);
+
+ // Resetting damage
+ _unit setDamage 0;
+
+ // Resetting potential revive state
+ [_unit,QEGVAR(common,ENABLE_REVIVE_SETDEAD_F), 0] call EFUNC(common,setDefinedVariable);
+ [_unit,QEGVAR(common,ENABLE_REVIVE_COUNTER), 0] call EFUNC(common,setDefinedVariable);
+
+
+ ["Medical_onFullyHealed", [_unit, true]] call ace_common_fnc_localEvent;
+ [format["Completed healLocal %1", _this]] call EFUNC(common,debug);
+};
+
+["Medical_onFullyHealed", [_unit, false]] call ace_common_fnc_localEvent;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_tourniquet.sqf b/addons/medical/functions/fnc_handleTreatment_Action_tourniquet.sqf
new file mode 100644
index 0000000000..49f50e0506
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_tourniquet.sqf
@@ -0,0 +1,36 @@
+/**
+ * fnc_handleTreatment_Action_tourniquet.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_part","_selectionName","_removeItem", "_tourniquets"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+_part = [_selectionName] call FUNC(getBodyPartNumber);
+if (_part == 0 || _part == 1) exitwith {
+ [_caller,"You cannot apply a CAT on this body part!"] call EFUNC(common,sendHintTo);
+ false;
+};
+
+[_caller, _target, _removeItem] call FUNC(useEquipment);
+
+_tourniquets = [_target, QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable);
+if ((_tourniquets select _part) > 0) exitwith {
+ [_caller,"There is already a tourniquet on this body part!"] call EFUNC(common,sendHintTo);
+ false;
+};
+
+[_caller, _unit,_removeItem] call FUNC(useEquipment);
+[[_caller, _target, _selectionName, _removeItem], QUOTE(FUNC(tourniquetLocal)), _unit] call EFUNC(common,execRemoteFnc);
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Action_tourniquetLocal.sqf b/addons/medical/functions/fnc_handleTreatment_Action_tourniquetLocal.sqf
new file mode 100644
index 0000000000..f2ce6ff6a5
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Action_tourniquetLocal.sqf
@@ -0,0 +1,56 @@
+/**
+ * fnc_handleTreatment_Action_tourniquetLocal.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_part","_selectionName","_removeItem", "_tourniquets", "_applyingTo"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+
+[_target,"treatment",format["%1 applied a tourniquet on %2",[_caller] call EFUNC(common,getName),_selectionName]] call FUNC(addActivityToLog);
+[_target,_removeItem] call FUNC(addToTriageList);
+[_target] call FUNC(addToInjuredCollection);
+
+
+_part = [_selectionName] call FUNC(getBodyPartNumber);
+
+// Place a tourniquet on the bodypart
+_tourniquets = [_target, QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable);
+_applyingTo = (_tourniquets select _part) + 1 + round(random(100));
+_tourniquets set[_part, _applyingTo];
+[_target, QGVAR(tourniquets), _tourniquets] call EFUNC(common,setDefinedVariable);
+
+[{
+ private ["_args","_target","_applyingTo","_part", "_tourniquets"];
+ _args = _this select 0;
+ _target = _args select 0;
+ _applyingTo = _args select 1;
+ _part = _args select 2;
+
+ if (!alive _target) exitwith {
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ };
+
+ _tourniquets = [_injuredPerson,QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable);
+ if !((_tourniquets select _part) == _applyingTo) exitwith {
+ // Tourniquet has been removed
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ };
+
+ _pain = [_target, QGVAR(amountOfPain)] call EFUNC(common,getDefinedVariable);
+ _pain = _pain + 0.005;
+ [_target, QGVAR(amountOfPain),_pain] call EFUNC(common,setDefinedVariable);
+
+}, 5, [_target, _applyingTo, _part] ] call CBA_fnc_addPerFrameHandler;
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf
new file mode 100644
index 0000000000..2189a57a29
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Category_Advanced.sqf
@@ -0,0 +1,94 @@
+/**
+ * fnc_handleTreatment_Category_Advanced.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+// Time in seconds
+#define ADVANCED_TREATMENT_TIME 5
+
+private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim", "_displayingIcon"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+// TODO add fake weapon for treatment, in case no primairy weapon is present
+// Handle the animations
+_prevAnim = "";
+if (vehicle _caller == _caller && (vehicle _target == _target) && !(stance _caller == "PRONE")) then {
+ if (primaryWeapon _caller == "") then {
+ _prevAnim = animationState _caller;
+ };
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic", 1] call EFUNC(common,doAnimation);
+};
+
+if (ACE_player == _caller) then {
+ // Displaying the treatment icon action
+ [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\icon_advanced_treatment.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon);
+};
+
+_isHandled = switch (_removeItem) do {
+ case "ACE_personal_aid_kit": {
+ ([_caller, _target, _selectionName, _removeItem, _prevAnim] call FUNC(handleTreatment_Action_FullHeal));
+ };
+ case "ACE_surgical_kit": {
+ ([_caller, _target, _selectionName, _removeItem, _prevAnim] call FUNC(handleTreatment_Action_Stitching));
+ };
+ case "ACE_CPR": {
+ ([_caller, _target, _selectionName, _removeItem, _prevAnim] call FUNC(handleTreatment_Action_CPR));
+ };
+ default {
+ // handle it ourself
+
+ // Get the current position for the treatment person
+ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+
+ [ADVANCED_TREATMENT_TIME, // the time to wait
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition, called every frame
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim", "_removeItem"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+ _prevAnim = _this select 4;
+
+ [_caller, _target, _removeItem] call FUNC(useEquipment);
+ [[_caller, _target, _selectionName, _removeItem], QUOTE(FUNC(handleTreatment_Action_AdvancedLocal)), _target] call EFUNC(common,execRemoteFnc);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ ["Medical_handleTreatment_Advanced", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on success
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim", "_removeItem"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+ _prevAnim = _this select 4;
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ ["Medical_handleTreatment_Advanced", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on failure
+ [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments
+ ] call EFUNC(gui,loadingBar);
+ true;
+ };
+};
+_isHandled;
diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf
new file mode 100644
index 0000000000..3456e6df18
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Category_Airway.sqf
@@ -0,0 +1,77 @@
+/**
+ * fnc_handleTreatment_Category_Airway.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim", "_displayingIcon", "_part"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+// we can only treat the head or torso for this
+_part = [_selectionName] call FUNC(getBodyPartNumber);
+if (_part == 0 || _part == 1) exitwith {
+ // TODO add fake weapon for treatment, in case no primairy weapon is present
+ // Handle the animations
+ _prevAnim = "";
+ if (vehicle _caller == _caller && (vehicle _target == _target) && !(stance _caller == "PRONE")) then {
+ if (primaryWeapon _caller == "") then {
+ _prevAnim = animationState _caller;
+ };
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic", 1] call EFUNC(common,doAnimation);
+ };
+
+ if (ACE_player == _caller) then {
+ // Displaying the treatment icon action
+ [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\icon_airway_management.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon);
+ };
+
+ // Get the current position for the treatment person
+ _caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+
+ [5, // the time to wait
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+ [_caller, _target, _removeItem] call FUNC(useEquipment);
+
+ [[_caller, _target, _selectionName, _removeItem], QUOTE(FUNC(handleTreatment_Action_AirwayLocal)), _target] call EFUNC(common,execRemoteFnc);
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ ["Medical_handleTreatment_Airway", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on success
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim"];
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ ["Medical_handleTreatment_Airway", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on failure
+ [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments
+ ] call EFUNC(gui,loadingBar);
+ true;
+};
+// TODO display message to caller
+
+["Medical_handleTreatment_Airway", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+
+false;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf
new file mode 100644
index 0000000000..2a2602da9e
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Category_Bandaging.sqf
@@ -0,0 +1,88 @@
+/**
+ * fnc_handleTreatment_Category_Bandaging.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim", "_displayingIcon"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+// TODO find selected data/wound in menu
+_selectedData = [_this, 4, "", [""]] call BIS_fnc_Param;
+
+
+// TODO add fake weapon for treatment, in case no primairy weapon is present
+// Handle the animations
+_prevAnim = "";
+if (vehicle _caller == _caller && (vehicle _target == _target) && !(stance _caller == "PRONE")) then {
+ if (primaryWeapon _caller == "") then {
+ _prevAnim = animationState _caller;
+ };
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic", 1] call EFUNC(common,doAnimation);
+};
+
+if (ACE_player == _caller) then {
+ [_caller, "STR_ACE_BANDAGING", "STR_ACE_APPLY_BANDAGE", 0, [[_target] call EFUNC(common,getName), _selectionName]] call EFUNC(gui,sendDisplayMessageTo);
+
+ // Displaying the treatment icon action
+ [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\bandage_fracture_small.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon);
+};
+
+// Get the current position for the treatment person
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+
+if (isnil QGVAR(setting_bandageWaitingTime)) then {
+ GVAR(setting_bandageWaitingTime) = 5;
+};
+
+[GVAR(setting_bandageWaitingTime), // the time to wait
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition
+ {
+ private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+
+ switch (_removeItem) do {
+ case "ACE_tourniquet": {
+ [_caller, _target, _selectionName, _removeItem] call FUNC(handleTreatment_Action_Tourniquet);
+ };
+ case "ACE_splint": {
+ // TODO implement splints
+ };
+ default {
+ [[_caller, _target, _selectionName, _removeItem], QUOTE(FUNC(handleTreatment_Action_BandageLocal)), _target] call EFUNC(common,execRemoteFnc);
+ [_caller, _target, _removeItem] call FUNC(useEquipment);
+ };
+ };
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+ ["Medical_handleTreatment_Bandaging", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on success
+ {
+ private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim"];
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+ ["Medical_handleTreatment_Bandaging", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on failure
+ [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments
+] call EFUNC(gui,loadingBar);
+
+true;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf b/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf
new file mode 100644
index 0000000000..f57ab20783
--- /dev/null
+++ b/addons/medical/functions/fnc_handleTreatment_Category_Medication.sqf
@@ -0,0 +1,69 @@
+/**
+ * fnc_handleTreatment_Category_Medication.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller","_target","_selectedData", "_selectionName", "_prevAnim", "_displayingIcon"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+// TODO add fake weapon for treatment, in case no primairy weapon is present
+// Handle the animations
+_prevAnim = "";
+if (vehicle _caller == _caller && (vehicle _target == _target) && !(stance _caller == "PRONE")) then {
+ if (primaryWeapon _caller == "") then {
+ _prevAnim = animationState _caller;
+ };
+ [_caller,"AinvPknlMstpSlayWrflDnon_medic", 1] call EFUNC(common,doAnimation);
+};
+
+if (ACE_player == _caller) then {
+ // Displaying the treatment icon action
+ [QGVAR(treatmentIconID), true, QUOTE(PATHTOF(data\icons\medication_small.paa)), [1,1,1,1]] call EFUNC(gui,displayIcon);
+};
+
+// Get the current position for the treatment person
+_caller setvariable [QGVAR(StartingPositionHandleTreatment), getPos _caller];
+
+[4, // the time to wait
+ {((vehicle (_this select 0) != (_this select 0)) ||((getPos (_this select 0)) distance ((_this select 0) getvariable QGVAR(StartingPositionHandleTreatment)) < 1))}, // the condition
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim"];
+ _caller = _this select 0;
+ _target = _this select 1;
+ _selectionName = _this select 2;
+ _removeItem = _this select 3;
+ [_caller, _target, _removeItem] call FUNC(useEquipment);
+
+ [[_caller, _target, _selectionName, _removeItem], QUOTE(FUNC(handleTreatment_Action_MedicationLocal)), _target] call EFUNC(common,execRemoteFnc);
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ ["Medical_handleTreatment_Medication", [_caller, _target, _selectionName, _removeItem, true]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on success
+ {
+ private ["_caller","_target", "_selectionName", "_prevAnim"];
+ [(_this select 0), "STR_ACE_CANCELED", ["STR_ACE_ACTION_CANCELED","STR_ACE_YOU_MOVED_AWAY"]] call EFUNC(gui,sendDisplayInformationTo);
+
+ if (_prevAnim != "") then {
+ [_caller,_prevAnim, 0] call EFUNC(common,doAnimation);
+ };
+
+ ["Medical_handleTreatment_Medication", [_caller, _target, _selectionName, _removeItem, false]] call ace_common_fnc_localEvent;
+ ["Medical_treatmentCompleted", [_caller, _target, _selectionName, _removeItem]] call ace_common_fnc_localEvent;
+ }, // on failure
+ [_caller, _target, _selectionName, _removeItem, _prevAnim] // arguments
+] call EFUNC(gui,loadingBar);
+
+true;
diff --git a/addons/medical/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical/functions/fnc_handleUI_DisplayOptions.sqf
new file mode 100644
index 0000000000..f56bbbf699
--- /dev/null
+++ b/addons/medical/functions/fnc_handleUI_DisplayOptions.sqf
@@ -0,0 +1,85 @@
+/**
+ * fn_displayOptions.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+#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 (!hasInterface) exitwith{};
+
+disableSerialization;
+_display = uiNamespace getVariable QGVAR(medicalMenu);
+if (isNil "_display") exitwith {}; // no valid dialog present
+
+if ((_name == "toggle")) exitwith {
+
+ if (GVAR(INTERACTION_TARGET) != ACE_player) then {
+ _newTarget = ACE_player;
+ } else {
+ _newTarget = GVAR(INTERACTION_TARGET_PREVIOUS);
+ };
+
+ GVAR(INTERACTION_TARGET_PREVIOUS) = GVAR(INTERACTION_TARGET);
+ [_newTarget] spawn {
+ closeDialog 0;
+ sleep 0.1;
+ [_this select 0] call FUNC(openMenu);
+ };
+};
+
+// Clean the dropdown options list from all actions
+for [{_x=START_IDC},{_x <= END_IDC},{_x=_x+1}] do {
+ _ctrl = (_display displayCtrl (_x));
+ _ctrl ctrlSetText "";
+ _ctrl ctrlShow false;
+ _ctrl ctrlSetEventHandler ["ButtonClick",""];
+ _ctrl ctrlSetTooltip "";
+ _ctrl ctrlCommit 0;
+};
+
+GVAR(LatestDisplayOptionMenu) = _name;
+
+// The triage card has no options available
+lbClear 212;
+if (_name == "triage") exitwith {
+ ctrlEnable[212,true];
+ _card = ([GVAR(INTERACTION_TARGET)] call FUNC(getTriageList));
+ {
+ lbadd[212,format["%1 x%2", getText(configFile >> "CfgWeapons" >> (_x select 0) >> "displayName"), _x select 1]];
+ }foreach _card;
+ if (count _card == 0) then {
+ lbadd[212,"No Entries"];
+ };
+};
+
+ctrlEnable[212,false];
+
+_entries = [ACE_player, GVAR(INTERACTION_TARGET),_name] call FUNC(getTreatmentOptions);
+
+{
+ //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["[ACE_player, ACE_medical_INTERACTION_TARGET] call %1;",(_x select 1)];
+ _ctrl ctrlSetEventHandler ["ButtonClick", _code];
+ _ctrl ctrlSetTooltip (_x select 2);
+ _ctrl ctrlShow true;
+ } else {
+ _ctrl ctrlSetText "";
+ _ctrl ctrlSetEventHandler ["ButtonClick",""];
+ };
+ _ctrl ctrlCommit 0;
+}foreach _entries;
diff --git a/addons/medical/functions/fnc_handleUI_dropDownTriageCard.sqf b/addons/medical/functions/fnc_handleUI_dropDownTriageCard.sqf
new file mode 100644
index 0000000000..2d895cae70
--- /dev/null
+++ b/addons/medical/functions/fnc_handleUI_dropDownTriageCard.sqf
@@ -0,0 +1,28 @@
+/**
+ * fn_handleUI_dropDownTriageCard.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_display","_pos","_ctrl","_curPos","_idc"];
+disableSerialization;
+_display = uiNamespace getVariable QGVAR(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/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf
new file mode 100644
index 0000000000..e6e3be14fc
--- /dev/null
+++ b/addons/medical/functions/fnc_handleUnitVitals.sqf
@@ -0,0 +1,131 @@
+/**
+ * fn_handleUnitVitals.sqf
+ * @Descr: Updates the vitals. Is expected to be called every second.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: void
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_heartRate","_bloodPressure","_bloodVolume","_painStatus"];
+_unit = _this select 0;
+
+_bloodVolume = ([_unit, QGVAR(bloodVolume)] call EFUNC(common,getDefinedVariable)) + ([_unit] call FUNC(getBloodVolumeChange));
+if (_bloodVolume <= 0) then {
+ _bloodVolume = 0;
+};
+_unit setvariable [QGVAR(bloodVolume), _bloodVolume];
+
+
+// Set variables for synchronizing information across the net
+if (_bloodVolume < 90) then {
+ if !(_unit getvariable [QGVAR(hasLostBlood), false]) then {
+ _unit setvariable [QGVAR(hasLostBlood), true, true];
+ };
+} else {
+ if (_unit getvariable [QGVAR(hasLostBlood),false]) then {
+ _unit setvariable [QGVAR(hasLostBlood), false, true];
+ };
+};
+
+if ((_unit call FUNC(getBloodLoss)) > 0) then {
+ if !(_unit getvariable [QGVAR(isBleeding), false]) then {
+ _unit setvariable [QGVAR(isBleeding), true, true];
+ };
+} else {
+ if (_unit getvariable [QGVAR(isBleeding), false]) then {
+ _unit setvariable [QGVAR(isBleeding), false, true];
+ };
+};
+
+_painStatus = [_unit,QGVAR(amountOfPain),0] call EFUNC(common,getDefinedVariable);
+if (_painStatus > 0) then {
+ if !(_unit getvariable [QGVAR(hasPain), false]) then {
+ _unit setvariable [QGVAR(hasPain), true, true];
+ };
+} else {
+ if (_unit getvariable [QGVAR(hasPain), false]) then {
+ _unit setvariable [QGVAR(hasPain), false, true];
+ };
+};
+
+
+if (_bloodVolume < 30) exitwith {
+ [_unit] call FUNC(setDead);
+};
+
+if ([_unit] call EFUNC(common,isAwake)) then {
+ if (_bloodVolume < 60) then {
+ if (random(1) > 0.9) then {
+ [_unit] call EFUNC(common,setUnconsciousState);
+ };
+ };
+};
+
+// handle advanced medical, with vitals
+if ((missionNamespace getvariable[QGVAR(setting_AdvancedLevel), 0]) > 0) exitwith {
+
+ // Set the vitals
+ _heartRate = ([_unit, QGVAR(heartRate)] call EFUNC(common,getDefinedVariable)) + ([_unit] call FUNC(getHeartRateChange));
+ _unit setvariable [QGVAR(heartRate), _heartRate];
+
+ _bloodPressure = [_unit] call FUNC(getBloodPressure);
+ _unit setvariable [QGVAR(bloodPressure), _bloodPressure];
+
+ // Handle airway
+ if (GVAR(setting_allowAirwayInjuries)) then {
+ _airwayStatus = _unit getvariable [QGVAR(airwayStatus), 100];
+ if (((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) && !((_unit getvariable [QGVAR(airwaySecured), false]))) then {
+ if (_airwayStatus >= 0.5) then {
+ _unit setvariable [QGVAR(airwayStatus), _airwayStatus - 0.5];
+ };
+ } else {
+ if !((_unit getvariable [QGVAR(airwayOccluded), false]) || (_unit getvariable [QGVAR(airwayCollapsed), false])) then {
+ if (_airwayStatus <= 98.5) then {
+ _unit setvariable [QGVAR(airwayStatus), _airwayStatus + 1.5];
+ };
+ };
+ };
+ };
+
+ // Check vitals for medical status
+ // TODO check for in revive state instead of variable
+ if ((_unit getvariable[QEGVAR(common,ENABLE_REVIVE_SETDEAD_F),0]) == 0) then {
+ _bloodPressureL = _bloodPressure select 0;
+ _bloodPressureH = _bloodPressure select 1;
+
+
+ if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then {
+ [_unit] call EFUNC(common,setUnconsciousState); // safety check to ensure unconsciousness for units if they are not dead already.
+ };
+
+
+ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
+ if (_bloodPressureH > 260) then {
+ if (random(1) > 0.7) then {
+ [_unit] call FUNC(setCardiacArrest);
+ };
+ };
+ if (_bloodPressureL < 40 && _heartRate > 190) then {
+ if (random(1) > 0.7) then {
+ [_unit] call FUNC(setCardiacArrest);
+ };
+ };
+ if (_bloodPressureH > 145 && _heartRate > 150) then {
+ if (random(1) > 0.7) then {
+ [_unit] call FUNC(setCardiacArrest);
+ };
+ };
+ if (_heartRate > 200) then {
+ [_unit] call FUNC(setCardiacArrest);
+ };
+
+ if (_heartRate < 20) then {
+ [_unit] call FUNC(setCardiacArrest);
+ };
+ };
+ };
+};
diff --git a/addons/medical/functions/fnc_hasEquipment.sqf b/addons/medical/functions/fnc_hasEquipment.sqf
new file mode 100644
index 0000000000..bdf652fd30
--- /dev/null
+++ b/addons/medical/functions/fnc_hasEquipment.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_hasEquipment.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
+ */
+
+#include "script_component.hpp"
+
+private ["_medic", "_patient", "_item", "_return"];
+_medic = _this select 0;
+_patient = _this select 1;
+_item = _this select 2;
+
+if (isnil QGVAR(setting_allowSharedEquipment)) then {
+ GVAR(setting_allowSharedEquipment) = true;
+};
+if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith {
+ true;
+};
+
+if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
+ true;
+};
+
+_return = false;
+if ([vehicle _medic] call FUNC(isMedicalVehicle) && {(vehicle _medic != _medic)}) then {
+ _crew = crew vehicle _medic;
+ {
+ if ([_x, _medic] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
+ _return = true;
+ };
+ }foreach _crew;
+};
+
+_return
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf
new file mode 100644
index 0000000000..7a14d97c51
--- /dev/null
+++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf
@@ -0,0 +1,21 @@
+/**
+ * fn_hasMedicalEnabled.sqf
+ * @Descr: Check if unit has CMS enabled.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_medicalEnabled"];
+_unit = _this select 0;
+
+_medicalEnabled = _unit getvariable QGVAR(enableMedical);
+if (isnil "_medicalEnabled") exitwith {
+ (((GVAR(setting_enableForUnits) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(setting_enableForUnits) == 1));
+};
+
+_medicalEnabled;
diff --git a/addons/medical/functions/fnc_hasOpenWounds.sqf b/addons/medical/functions/fnc_hasOpenWounds.sqf
new file mode 100644
index 0000000000..fdfef6883f
--- /dev/null
+++ b/addons/medical/functions/fnc_hasOpenWounds.sqf
@@ -0,0 +1,16 @@
+/**
+ * fn_hasOpenWounds.sqf
+ * @Descr: Check if unit has open wounds
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT (The unit to check)]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private "_openWounds";
+_openWounds = [_this select 0,QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
+
+({(((_x select 0) + (_x select 1) + (_x select 2)) > 0)}count _openWounds > 0);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf
new file mode 100644
index 0000000000..ee6cd5fd61
--- /dev/null
+++ b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf
@@ -0,0 +1,13 @@
+/**
+ * fnc_hasTourniquetAppliedTo.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+((([(_this select 0),QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable)) select ([(_this select 1)] call FUNC(getBodyPartNumber))) > 0);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_inMedicalFacility.sqf b/addons/medical/functions/fnc_inMedicalFacility.sqf
new file mode 100644
index 0000000000..1e175ffccb
--- /dev/null
+++ b/addons/medical/functions/fnc_inMedicalFacility.sqf
@@ -0,0 +1,51 @@
+/**
+ * fn_inMedicalFacility.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
+ */
+
+#include "script_component.hpp"
+
+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 [QGVAR(isMedicalFacility),false])) exitwith {
+ _isInBuilding = true;
+ };
+}foreach _objects;
+if (!_isInBuilding) then {
+ _objects = position _unit nearObjects 7.5;
+ {
+ if (((typeOf _x) in _medicalFacility) || (_x getVariable [QGVAR(isMedicalFacility),false])) exitwith {
+ _isInBuilding = true;
+ };
+ }foreach _objects;
+};
+_isInBuilding
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_increasePain.sqf b/addons/medical/functions/fnc_increasePain.sqf
new file mode 100644
index 0000000000..64a29989e4
--- /dev/null
+++ b/addons/medical/functions/fnc_increasePain.sqf
@@ -0,0 +1,46 @@
+/**
+ * fn_increasePain.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
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_amountOfDamage","_selectionName","_sourceOfDamage","_painStatus"];
+_unit = _this select 0;
+_amountOfDamage = _this select 1;
+_selectionName = _this select 2;
+
+if (!alive _unit || (_amountOfDamage <= 0)) exitwith{};
+_painStatus = [_unit,QGVAR(amountOfPain),0] call EFUNC(common,getDefinedVariable);
+
+if (typeName _selectionName == "STRING") then {
+ _selectionName = [_selectionName] call FUNC(getBodyPartNumber);
+};
+
+_amountOfDamage = _amountOfDamage * 10;
+
+_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,QGVAR(amountOfPain),_painStatus] call EFUNC(common,setDefinedVariable);
+["Medical_onPainIncreased", [_unit, _selectionName, _painStatus]] call ace_common_fnc_localEvent;
+
+nil;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_initalizeModuleCMS.sqf b/addons/medical/functions/fnc_initalizeModuleCMS.sqf
new file mode 100644
index 0000000000..3c6c7f8e8e
--- /dev/null
+++ b/addons/medical/functions/fnc_initalizeModuleCMS.sqf
@@ -0,0 +1,71 @@
+/*
+init.sqf
+Usage:
+Author: Glowbal
+
+Arguments:
+Returns:
+
+Affects: Local
+Executes: call
+*/
+
+#include "script_component.hpp"
+
+private ["_logic"];
+_logic = _this select 0;
+
+if (isNull _logic) exitwith {};
+
+// Damage thresholds only in case the damge threshold module hasn't been placed down.
+if (isnil QGVAR(damageThreshold_AI)) then {
+ GVAR(damageThreshold_AI) = 1;
+};
+
+if (isnil QGVAR(damageThreshold_Players)) then {
+ GVAR(damageThreshold_Players) = 1;
+};
+
+GVAR(setting_allowInstantDead) = _logic getvariable["setting_allowInstantDead", true];
+GVAR(setting_AdvancedLevel) = _logic getvariable["advancedLevel", 0];
+GVAR(setting_advancedWoundsSetting) = _logic getvariable["openingOfWounds", true];
+GVAR(setting_advancedMedicRoles) = _logic getvariable["medicSetting", false];
+GVAR(setting_medicalDifficulty) = _logic getvariable["difficultySetting", 1];
+GVAR(setting_enableBandagingAid) = _logic getvariable["bandagingAid", GVAR(setting_AdvancedLevel) == 0];
+GVAR(setting_allowAIFullHeal) = _logic getvariable["allowAIFullHeal", false];
+GVAR(setting_enableForUnits) = _logic getvariable["enableFor", 1];
+GVAR(setting_allowAirwayInjuries) = (_logic getvariable["enableAirway", 0]) == 1;
+GVAR(setting_aidKitRestrictions) = _logic getvariable["aidKitRestrictions", 0];
+GVAR(setting_removeAidKitOnUse) = _logic getvariable["aidKitUponUsage", false];
+GVAR(setting_aidKitMedicsOnly) = _logic getvariable["aidKitMedicsOnly", false];
+GVAR(setting_bandageWaitingTime) = _logic getvariable["bandageTime", 5];
+GVAR(setting_allowVehicleCrashInjuries) = _logic getvariable["vehCrashes", true];
+GVAR(setting_allowStitching) = _logic getvariable["stitchingMedicsOnly", 0];
+
+if (GVAR(setting_AdvancedLevel) == -1) exitwith{};
+GVAR(isEnabled) = true;
+
+
+waituntil{!isnil "ACE_gui" && !isnil "ACE_common"};
+
+
+if (GVAR(setting_AdvancedLevel) > 0) then {
+ [
+ {(([_this select 0,QGVAR(heartRate)] call EFUNC(common,getDefinedVariable)) < 20)}
+ ] call EFUNC(common,registerUnconsciousCondition);
+
+ if (GVAR(setting_allowAirwayInjuries)) then {
+ [
+ {(([_this select 0,QGVAR(airway)] call EFUNC(common,getDefinedVariable)) > 2)}
+ ] call EFUNC(common,registerUnconsciousCondition);
+ };
+};
+
+if (!hasInterface) exitwith{};
+
+{
+ if(_x == "FirstAidKit" || {_x == "Medikit"}) then {
+ player removeItem _x;
+ };
+}foreach (items player);
+
diff --git a/addons/medical/functions/fnc_isMedic.sqf b/addons/medical/functions/fnc_isMedic.sqf
new file mode 100644
index 0000000000..ef824c06f1
--- /dev/null
+++ b/addons/medical/functions/fnc_isMedic.sqf
@@ -0,0 +1,33 @@
+/**
+ * fn_medicClass.sqf
+ * @Descr: Check if a unit is any medical class above normal.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_class","_return"];
+_unit = [_this, 0, objNull,[ObjNull]] call BIS_fnc_Param;
+
+if (isnil QGVAR(setting_advancedMedicRoles)) exitwith {
+ true;
+};
+
+if (GVAR(setting_advancedMedicRoles)) then {
+ _class = [_unit,QGVAR(medicClass)] call EFUNC(common,getDefinedVariable);
+ _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/addons/medical/functions/fnc_isMedicalVehicle.sqf b/addons/medical/functions/fnc_isMedicalVehicle.sqf
new file mode 100644
index 0000000000..9489c518b7
--- /dev/null
+++ b/addons/medical/functions/fnc_isMedicalVehicle.sqf
@@ -0,0 +1,17 @@
+/**
+ * fn_isMedicalVehicle.sqf
+ * @Descr: Check if vehicle is a medical vehicle
+ * @Author: Glowbal
+ *
+ * @Arguments: [vehicle OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_veh"];
+_veh = _this select 0;
+
+if !(_veh getvariable [QGVAR(isMedicalVehicle), true]) exitwith {false}; // exit in case the false is set.
+((getNumber(configFile >> "CfgVehicles" >> typeOf _veh >> QGVAR(isMedicalVehicle)) == 1) || (_veh getvariable [QGVAR(isMedicalVehicle), false]));
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_isSetTreatmentMutex.sqf b/addons/medical/functions/fnc_isSetTreatmentMutex.sqf
new file mode 100644
index 0000000000..2280b066df
--- /dev/null
+++ b/addons/medical/functions/fnc_isSetTreatmentMutex.sqf
@@ -0,0 +1,16 @@
+/**
+ * fn_isSetTreatmentMutex.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+// Max locked time is 2 minutes.
+#define MAX_LOCKED_TIME 120
+
+(time - ((_this select 0) getvariable [QGVAR(PerformingTreatmentMutex), -MAX_LOCKED_TIME]) <= MAX_LOCKED_TIME);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf
new file mode 100644
index 0000000000..2236d30fce
--- /dev/null
+++ b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf
@@ -0,0 +1,61 @@
+/**
+ * fn_assignMedicRoles.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_logic","_setting","_objects"];
+_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
+
+ [format["AssignMedicalRoles called. Arguments are: %1 %2", _this]] call EFUNC(common,debug);
+
+if (!isNull _logic) then {
+ _list = _logic getvariable ["EnableList",""];
+
+ _splittedList = [_list, ","] call BIS_fnc_splitString;
+ _nilCheckPassedList = "";
+ {
+ _x = [_x] call EFUNC(common,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 {
+ [["synchronizedObjects for the 'Assign Medic Role' Module is deprecated. Please use the enable for list instead!"], 1] call EFUNC(common,debug);
+ {
+ if (!isnil "_x") then {
+ if (typeName _x == typeName objNull) then {
+ if (local _x) then {
+ [_x,_setting] call FUNC(setMedicRole);
+ };
+ };
+ };
+ }foreach _objects;
+ };
+ {
+ if (!isnil "_x") then {
+ if (typeName _x == typeName objNull) then {
+ if (local _x) then {
+ [_x,_setting] call FUNC(setMedicRole);
+ };
+ };
+ };
+ }foreach _parsedList;
+ };
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf b/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf
new file mode 100644
index 0000000000..5d76e4bde2
--- /dev/null
+++ b/addons/medical/functions/fnc_moduleAssignMedicalEquipment.sqf
@@ -0,0 +1,84 @@
+/**
+ * fn_assignMedicalEquipment.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 "ACE_bandage_basic"
+#define PACKING_BANDAGES "ACE_packing_bandage"
+
+#include "script_component.hpp"
+
+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 "ACE_gui"}; // ensure the player unit is available.
+ waituntil {time>0};
+
+ _start = diag_tickTime;
+ waituntil {(["ACE_sys_medical"] call EFUNC(common,isModuleEnabled_F)) || (diag_tickTime - _start > 10000)};
+
+ if (!(["ACE_sys_medical"] call EFUNC(common,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 "ACE_tourniquet";
+ };
+ for "_i" from 1 to 3 do {
+ player addItem "ACE_morphine";
+ };
+ for "_i" from 1 to 2 do {
+ player addItem "ACE_epinephrine";
+ };
+ };
+
+ _nonMedics = {
+ for "_i" from 1 to 3 do {
+ player addItem BASIC_BANDAGES;
+ };
+ player addItem "ACE_tourniquet";
+ player addItem "ACE_morphine";
+ };
+
+
+ // TODO make this neat code.
+ switch (_setting) do {
+ case ALL_PLAYERS: {
+ _code = if ([player] call FUNC(medicClass)) then {
+ _medicsLoadout;
+ } else {
+ _nonMedics;
+ };
+
+ call _code;
+ player addEventhandler["Respawn", _code];
+ };
+ case ONLY_MEDICS: {
+ _code = if ([player] call FUNC(medicClass)) then {
+ _medicsLoadout;
+ } else {
+ {};
+ };
+ call _code;
+ player addEventhandler["Respawn", _code];
+ };
+ default {};
+ };
+ };
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf
new file mode 100644
index 0000000000..92ac746303
--- /dev/null
+++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_assignMedicalFacility.sqf
+ * @Descr: Register synchronized objects from passed object as a medical facility for CMS.
+ * @Author: Glowbal
+ *
+ * @Arguments: [logic OBJECT]
+ * @Return: BOOL
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+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[QGVAR(isMedicalFacility), true, true];
+ };
+ }foreach _objects;
+};
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf
new file mode 100644
index 0000000000..485eaba63b
--- /dev/null
+++ b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf
@@ -0,0 +1,62 @@
+/**
+ * fn_assignMedicalVehicle.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 EFUNC(common,debug);
+
+if (!isNull _logic) then {
+ _list = _logic getvariable ["EnableList",""];
+ _setting = _logic getvariable ["enabled",0];
+
+ _splittedList = [_list, ","] call BIS_fnc_splitString;
+ _nilCheckPassedList = "";
+ {
+ _x = [_x] call EFUNC(common,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 [QGVAR(isMedicalVehicle), _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 [QGVAR(isMedicalVehicle), _setting, true];
+ };
+ };
+ };
+ };
+ }foreach _parsedList;
+ };
+
+true
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onInitForUnit.sqf b/addons/medical/functions/fnc_onInitForUnit.sqf
new file mode 100644
index 0000000000..0a2cac9b6c
--- /dev/null
+++ b/addons/medical/functions/fnc_onInitForUnit.sqf
@@ -0,0 +1,34 @@
+/**
+ * fn_onInitForUnit.sqf
+ * @Descr: Deprecated. Is no longer used, as we dropped init eventhandler methods.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_handler"];
+_unit = _this select 0;
+
+systemChat format["Initalizing CMS for %1", _this];
+diag_log format["Initalizing CMS for %1", _this];
+
+if (!local _unit) exitwith {};
+if !(_unit isKindOf "CAManBase") exitwith{};
+
+_unit addEventhandler["handleDamage", {
+ if ((missionNamespace getvariable[QGVAR(setting_AdvancedLevel), 0]) >= 0) then {
+ call FUNC(handleDamage);
+ };
+}];
+
+_unit addEventHandler["handleHeal", {
+ if ((missionNamespace getvariable[QGVAR(setting_AdvancedLevel), 0]) >= 0) then {
+ call FUNC(handleHeal)
+ };
+}];
+
+["medical_onInitForUnit", [_unit]] call ace_common_fnc_localEvent;
diff --git a/addons/medical/functions/fnc_onInjury_assignAirwayStatus.sqf b/addons/medical/functions/fnc_onInjury_assignAirwayStatus.sqf
new file mode 100644
index 0000000000..df233be89d
--- /dev/null
+++ b/addons/medical/functions/fnc_onInjury_assignAirwayStatus.sqf
@@ -0,0 +1,26 @@
+/**
+ * fn_assignAirwayStatus.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 [QGVAR(airwayCollapsed), true, true];
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onInjury_assignFractures.sqf b/addons/medical/functions/fnc_onInjury_assignFractures.sqf
new file mode 100644
index 0000000000..19b4e95858
--- /dev/null
+++ b/addons/medical/functions/fnc_onInjury_assignFractures.sqf
@@ -0,0 +1,70 @@
+/**
+ * fn_assignFractures.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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,QGVAR(fractures)] call EFUNC(common,getDefinedVariable);
+ _selection = _fractures select _bodyPartn;
+ _selection set [ _size, (_selection select _size) + _amountOfBrokenBones ];
+ _fractures set [ _bodyPartn , _selection];
+
+ [_unit, QGVAR(fractures),_fractures] call EFUNC(common,setDefinedVariable);
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onInjury_assignOpenWounds.sqf b/addons/medical/functions/fnc_onInjury_assignOpenWounds.sqf
new file mode 100644
index 0000000000..1850000000
--- /dev/null
+++ b/addons/medical/functions/fnc_onInjury_assignOpenWounds.sqf
@@ -0,0 +1,71 @@
+/**
+ * fn_assignOpenWounds.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 FUNC(addOpenWounds);
+ _return = true;
+ };
+};
+
+_return;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onKilled.sqf b/addons/medical/functions/fnc_onKilled.sqf
new file mode 100644
index 0000000000..e3609a57e5
--- /dev/null
+++ b/addons/medical/functions/fnc_onKilled.sqf
@@ -0,0 +1,12 @@
+#include "script_component.hpp"
+
+private["_unit"];
+_unit = _this select 0;
+if (!local _unit) exitwith {};
+[_unit, QGVAR(amountOfPain),0,true] call EFUNC(common,setDefinedVariable);
+[_unit, QGVAR(heartRate),0,true] call EFUNC(common,setDefinedVariable);
+[_unit, QGVAR(bloodPressure), [0,0],true] call EFUNC(common,setDefinedVariable);
+if (_unit getvariable[QEGVAR(common,unconscious_non_captive_f),false]) then {
+ _unit setCaptive false;
+ _unit setvariable[QEGVAR(common,unconscious_non_captive_f),nil];
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onLocal.sqf b/addons/medical/functions/fnc_onLocal.sqf
new file mode 100644
index 0000000000..83611baa04
--- /dev/null
+++ b/addons/medical/functions/fnc_onLocal.sqf
@@ -0,0 +1,10 @@
+#include "script_component.hpp"
+
+private["_unit", "_local"];
+_unit = _this select 0;
+_local = _this select 1;
+if (_local) then {
+ if (_unit getvariable[QGVAR(addedToUnitLoop),false]) then {
+ [_unit] call FUNC(addToInjuredCollection);
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onMenuOpen.sqf b/addons/medical/functions/fnc_onMenuOpen.sqf
new file mode 100644
index 0000000000..0469b1b898
--- /dev/null
+++ b/addons/medical/functions/fnc_onMenuOpen.sqf
@@ -0,0 +1,75 @@
+/**
+ * fn_onMenuOpen.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+if (isnil QGVAR(LatestDisplayOptionMenu)) then {
+ GVAR(LatestDisplayOptionMenu) = "triage";
+} else {
+ if (GVAR(LatestDisplayOptionMenu) == "toggle") then {
+ GVAR(LatestDisplayOptionMenu) = "triage";
+ GVAR(INTERACTION_TARGET) = GVAR(INTERACTION_TARGET_PREVIOUS);
+ };
+};
+
+private ["_display","_target"];
+_target = GVAR(INTERACTION_TARGET);
+if (isnil QGVAR(INTERACTION_TARGET_PREVIOUS)) then {
+ GVAR(INTERACTION_TARGET_PREVIOUS) = _target;
+};
+[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
+
+[] call FUNC(updateActivityLog);
+[_target] call FUNC(updateUIInfo);
+
+// 11 till 18
+disableSerialization;
+_display = _this select 0; //uiNamespace getVariable QGVAR(medicalMenu);
+if (isnil "_display") exitwith {
+
+};
+systemChat format["onMenuOpen: %1", _this];
+
+(_display displayCtrl 11) ctrlSetTooltip localize "STR_ACE_UI_VIEW_TRIAGE_CARD";
+(_display displayCtrl 12) ctrlSetTooltip localize "STR_ACE_UI_EXAMINE_PATIENT";
+(_display displayCtrl 13) ctrlSetTooltip localize "STR_ACE_UI_BANDAGE_FRACTURES";
+(_display displayCtrl 14) ctrlSetTooltip localize "STR_ACE_UI_MEDICATION";
+(_display displayCtrl 15) ctrlSetTooltip localize "STR_ACE_UI_AIRWAY_MANAGEMENT";
+(_display displayCtrl 16) ctrlSetTooltip localize "STR_ACE_UI_ADVANCED_TREATMENT";
+(_display displayCtrl 17) ctrlSetTooltip localize "STR_ACE_UI_DRAG_CARRY";
+(_display displayCtrl 18) ctrlSetTooltip localize "STR_ACE_UI_TOGGLE_SELF";
+
+(_display displayCtrl 301) ctrlSetTooltip localize "STR_ACE_UI_SELECT_HEAD";
+(_display displayCtrl 302) ctrlSetTooltip localize "STR_ACE_UI_SELECT_TORSO";
+(_display displayCtrl 303) ctrlSetTooltip localize "STR_ACE_UI_SELECT_ARM_R";
+(_display displayCtrl 304) ctrlSetTooltip localize "STR_ACE_UI_SELECT_ARM_L";
+(_display displayCtrl 305) ctrlSetTooltip localize "STR_ACE_UI_SELECT_LEG_R";
+(_display displayCtrl 306) ctrlSetTooltip localize "STR_ACE_UI_SELECT_LEG_L";
+(_display displayCtrl 2001) ctrlSetTooltip localize "STR_ACE_UI_SELECT_TRIAGE_STATUS";
+
+
+(_display displayCtrl 1) ctrlSetText format["%1",[_target] call EFUNC(common,getName)];
+setMousePosition [ 0.4, 0.4];
+
+[QGVAR(onMenuOpen), "onEachFrame", {
+ if (isNull GVAR(INTERACTION_TARGET)) then {
+ GVAR(INTERACTION_TARGET) = ACE_player;
+ };
+ [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo);
+ [GVAR(INTERACTION_TARGET)] call FUNC(updateIcons);
+ [GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
+
+ [] call FUNC(updateActivityLog);
+
+ _status = [GVAR(INTERACTION_TARGET)] call FUNC(getTriageStatus);
+ ((_this select 0) displayCtrl 2000) ctrlSetText (_status select 0);
+ ((_this select 0) displayCtrl 2000) ctrlSetBackgroundColor (_status select 2);
+
+ }, [_display]] call BIS_fnc_addStackedEventHandler;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onStartMovingUnit.sqf b/addons/medical/functions/fnc_onStartMovingUnit.sqf
new file mode 100644
index 0000000000..1757666b24
--- /dev/null
+++ b/addons/medical/functions/fnc_onStartMovingUnit.sqf
@@ -0,0 +1,93 @@
+/**
+ * fnc_onStartMovingUnit.sqf
+ * @Descr: is called when a unit start to move another unit through either carry or drag actions.
+ * This will monitor until the caller (unit carrying another unit) is no longer awake, in a vehicle or dropped the unit,
+ * after which it will handle the required animations and administration.
+ *
+ * @Author: Glowbal
+ *
+ * @Arguments: [caller OBJECT, unit OBJECT, killOnDrop BOOL (Should the unit be killed when being dropped), dragging BOOL (true means the dragging animations should be played, false will play carry animations)]
+ * @Return: nil
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+// Time in seconds. There is no need to run this every frame, but it should still be in real time. The user should not experience any delays here.
+#define TIME_BETWEEN_CHECKS 0.1
+
+private ["_caller","_target","_killOnDrop","_dragging"];
+_caller = _this select 0;
+_target = _this select 1;
+_killOnDrop = _this select 2;
+_dragging = _this select 3;
+
+[{
+ private ["_caller","_target","_killOnDrop","_dragging"];
+ _caller = (_this select 0) select 0;
+ _target = (_this select 0) select 1;
+ _killOnDrop = (_this select 0) select 2;
+ _dragging = (_this select 0) select 3;
+
+ if ((isNull ([_caller] call EFUNC(common,getCarriedObj))) || !([_caller] call EFUNC(common,isAwake)) || (vehicle _caller != _caller)) then {
+ [_caller,ObjNull] call EFUNC(common,carryObj);
+
+ // handle the drag & carry administration
+ if (_dragging) then {
+ _target setvariable [QGVAR(beingDragged),objNull,true];
+ _caller setvariable [QGVAR(dragging),objNull,true];
+ } else {
+ _target setvariable [QGVAR(beingCarried),objNull,true];
+ _caller setvariable [QGVAR(carrying),objNull,true];
+ };
+
+ // handle the drag & carry animiations
+ if ([_caller] call EFUNC(common,isAwake) && (vehicle _caller == _caller)) then {
+ if (vehicle _caller == _caller) then {
+ [_caller,"amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon", 1] call EFUNC(common,doAnimation);
+ };
+ };
+
+ if ([_target] call EFUNC(common,isAwake)) then {
+ if (vehicle _target == _target) then {
+ if (_dragging) then {
+ [_target,"AinjPpneMstpSnonWrflDb_release",1] call EFUNC(common,doAnimation);
+ } else {
+ [_target,"",1] call EFUNC(common,doAnimation);
+ };
+ } else {
+ [_target,"", 1] call EFUNC(common,doAnimation); // TODO play animation for the current seat instead
+ };
+ } else {
+ // TODO play animation for dropping first.
+ [_target,([_target] call EFUNC(common,getDeathAnim)), 1] call EFUNC(common,doAnimation);
+ };
+
+
+ if (!surfaceIsWater getPos _caller) then {
+
+ [{
+ EXPLODE_3_PVT(_this,_caller,_target,_killOnDrop);
+ if (vehicle _target == _target && (vehicle _caller == _caller)) then {
+ // This will set the target body/unit on the correct position, so it doesn't fall through floors.
+ _positionUnit = getPosATL _target;
+ _positionUnit set [2, (getPosATL _caller) select 2];
+ _target setPosATL _positionUnit;
+ };
+
+ if (_killOnDrop) then {
+ _unit setDamage 1;
+ };
+
+ }, [_caller,_target,_killOnDrop], 0.5, 0.5] call EFUNC(common,waitAndExecute);
+
+ } else {
+ if (_killOnDrop) then {
+ _unit setDamage 1;
+ };
+ };
+
+ ["onDropInjured", [_caller], [_caller, _unit, 0]] call EFUNC(common,targetEvent);
+ [(_this select 1)] call cba_fnc_removePerFrameHandler;
+ };
+}, TIME_BETWEEN_CHECKS, [_caller, _unit, _killOnDrop, _dragging] ] call CBA_fnc_addPerFrameHandler;
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onTreatmentCompleted.sqf b/addons/medical/functions/fnc_onTreatmentCompleted.sqf
new file mode 100644
index 0000000000..3a161952ef
--- /dev/null
+++ b/addons/medical/functions/fnc_onTreatmentCompleted.sqf
@@ -0,0 +1,22 @@
+/**
+ * fnc_handleTreatmentCompleted.sqf
+ * @Descr: Called when a treatment action has been completed.
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_caller", "_target","_selectionName","_removeItem"];
+_caller = _this select 0;
+_target = _this select 1;
+_selectionName = _this select 2;
+_removeItem = _this select 3;
+
+[_caller,false] call FUNC(treatmentMutex);
+
+// TODO: BUG: if AI finishes treatment, it will also hide the icon for the player
+[QGVAR(treatmentIconID), false, "", [1,1,1,1]] call EFUNC(gui,displayIcon);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_onUnconscious.sqf b/addons/medical/functions/fnc_onUnconscious.sqf
new file mode 100644
index 0000000000..b18f55c099
--- /dev/null
+++ b/addons/medical/functions/fnc_onUnconscious.sqf
@@ -0,0 +1,23 @@
+/**
+ * fnc_onUnconscious.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_state"];
+_unit = _this select 0;
+_state = _this select 1;
+
+if (_state) then {
+ if (GVAR(setting_allowAirwayInjuries)) then {
+ if (random(1) >= 0.3) then {
+ _unit setvariable [QGVAR(airwayOccluded), true, true];
+ };
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_openMenu.sqf b/addons/medical/functions/fnc_openMenu.sqf
new file mode 100644
index 0000000000..d79c772013
--- /dev/null
+++ b/addons/medical/functions/fnc_openMenu.sqf
@@ -0,0 +1,34 @@
+/**
+ * fn_openMenu.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+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 = player;
+};
+GVAR(INTERACTION_TARGET) = _interactionTarget;
+createDialog QGVAR(medicalMenu);
+
+["Medical_onMenuOpened", [ACE_player, _interactionTarget]] call ace_common_fnc_localEvent;
diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf
new file mode 100644
index 0000000000..907255a2a7
--- /dev/null
+++ b/addons/medical/functions/fnc_playInjuredSound.sqf
@@ -0,0 +1,75 @@
+/**
+ * fn_playInjuredSound.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_amountOfDamage","_bodyPartStatus","_availableSounds_A","_availableSounds_B","_availableSounds_C","_sound"];
+_unit = _this select 0;
+if (!local _unit) exitwith{};
+
+if ((_unit getvariable [QGVAR(playingInjuredSound),false])) exitwith {};
+_unit setvariable [QGVAR(playingInjuredSound),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,QGVAR(bodyPartStatus)] call EFUNC(common,getDefinedVariable);
+
+_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], QUOTE(EFUNC(common,broadcastSound3D_F)), true] call EFUNC(common,execRemoteFnc);
+ if (_amountOfDamage < 1) then {
+ sleep 10;
+ sleep (random(50));
+ } else {
+ sleep (60 / _amountOfDamage);
+ };
+
+};
+_unit setvariable [QGVAR(playingInjuredSound),nil];
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf
new file mode 100644
index 0000000000..e0e4df20c3
--- /dev/null
+++ b/addons/medical/functions/fnc_setCardiacArrest.sqf
@@ -0,0 +1,39 @@
+/**
+ * fn_setCardiacArrest.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
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_modifier","_timer","_counter", "_heartRate"];
+_unit = _this select 0;
+
+if (_unit getvariable [QGVAR(inCardiacArrest),false]) exitwith {};
+[format["%1 is put into cardiac arrest",_unit]] call EFUNC(common,debug);
+_unit setvariable [QGVAR(inCardiacArrest), true,true];
+[_unit,QGVAR(heartRate), 0] call EFUNC(common,setDefinedVariable);
+
+["Medical_onEnteredCardiacArrest", [_unit]] call ace_common_fnc_localEvent;
+
+[_unit] call EFUNC(common,setUnconsciousState);
+_counter = 120 + round(random(600));
+_timer = 0;
+while {(_timer < _counter && alive _unit)} do {
+ _heartRate = [_unit,QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
+ if (_heartRate > 0) exitwith {
+ [format["%1 is moved out of cardiac: %2",_unit, _heartRate]] call EFUNC(common,debug);
+ _unit setvariable [QGVAR(inCardiacArrest), nil,true];
+ };
+ if (_counter - _timer < 1) exitwith {
+ [_unit] call FUNC(setDead);
+ };
+ sleep 1;
+ _timer = _timer + 1;
+};
+
+_unit setvariable [QGVAR(inCardiacArrest), nil,true];
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_setDamageBodyPart.sqf b/addons/medical/functions/fnc_setDamageBodyPart.sqf
new file mode 100644
index 0000000000..523b49d332
--- /dev/null
+++ b/addons/medical/functions/fnc_setDamageBodyPart.sqf
@@ -0,0 +1,25 @@
+#include "script_component.hpp"
+
+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/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf
new file mode 100644
index 0000000000..deec4f36f7
--- /dev/null
+++ b/addons/medical/functions/fnc_setDead.sqf
@@ -0,0 +1,24 @@
+/**
+ * fn_setDead.sqf
+ * @Descr: Set a unit dead from within CMS.
+ * @Author: Glowbal
+ *
+ * @Arguments: [unit OBJECT]
+ * @Return: void
+ * @PublicAPI: true
+ */
+
+#include "script_component.hpp"
+
+private ["_unit"];
+_unit = _this select 0;
+
+if (!alive _unit) exitwith{};
+if (!local _unit) exitwith {};
+
+[_unit, QGVAR(amountOfPain),0,true] call EFUNC(common,setDefinedVariable);
+[_unit, QGVAR(heartRate),0,true] call EFUNC(common,setDefinedVariable);
+[_unit, QGVAR(bloodPressure), [0,0],true] call EFUNC(common,setDefinedVariable);
+[_unit, QGVAR(airway), 3, true] call EFUNC(common,setDefinedVariable);
+
+[_unit] call EFUNC(common,setDead); // calling framework function
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_setMedicRole.sqf b/addons/medical/functions/fnc_setMedicRole.sqf
new file mode 100644
index 0000000000..ee82f516fa
--- /dev/null
+++ b/addons/medical/functions/fnc_setMedicRole.sqf
@@ -0,0 +1,21 @@
+/**
+ * fn_setMedicRole.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
+ */
+
+#include "script_component.hpp"
+
+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 [QGVAR(medicClass),1,true];
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_setTriageStatus.sqf b/addons/medical/functions/fnc_setTriageStatus.sqf
new file mode 100644
index 0000000000..c37a636c14
--- /dev/null
+++ b/addons/medical/functions/fnc_setTriageStatus.sqf
@@ -0,0 +1,21 @@
+/**
+ * fn_setTriageStatus.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit","_caller","_type","_activity","_status"];
+
+_unit = _this select 0;
+_status = _this select 1;
+
+if (!local _unit) exitwith {
+ [_this, QUOTE(FUNC(setTriageStatus)), _unit] call EFUNC(common,execRemoteFnc);
+};
+[_unit,QGVAR(triageLevel),_status] call EFUNC(common,setDefinedVariable);
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_treatmentMutex.sqf b/addons/medical/functions/fnc_treatmentMutex.sqf
new file mode 100644
index 0000000000..38992acf05
--- /dev/null
+++ b/addons/medical/functions/fnc_treatmentMutex.sqf
@@ -0,0 +1,25 @@
+/**
+ * fn_treatmentMutex.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
+ */
+
+#include "script_component.hpp"
+
+_unit = _this select 0;
+_set = if (count _this > 1) then {_this select 1} else {true};
+
+systemchat format["fn_treatmentMutex %1", _this];
+diag_log format["fn_treatmentMutex %1", _this];
+
+
+if (_set) exitwith {
+ _unit setvariable [QGVAR(PerformingTreatmentMutex), time, true];
+};
+
+// Max locked time is 2 minutes.
+_unit setvariable [QGVAR(PerformingTreatmentMutex), -120, true];
\ No newline at end of file
diff --git a/addons/medical/functions/fnc_updateActivityLog.sqf b/addons/medical/functions/fnc_updateActivityLog.sqf
new file mode 100644
index 0000000000..30dc344e8b
--- /dev/null
+++ b/addons/medical/functions/fnc_updateActivityLog.sqf
@@ -0,0 +1,47 @@
+/**
+ * fn_updateActivityLog.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+[] spawn {
+ _log = [GVAR(INTERACTION_TARGET)] call FUNC(getActivityLog);
+ _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 = [GVAR(INTERACTION_TARGET)] call FUNC(getQuickViewLog);
+ _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/addons/medical/functions/fnc_updateBodyImg.sqf b/addons/medical/functions/fnc_updateBodyImg.sqf
new file mode 100644
index 0000000000..194d2b6e08
--- /dev/null
+++ b/addons/medical/functions/fnc_updateBodyImg.sqf
@@ -0,0 +1,71 @@
+/**
+ * fn_updateBodyImg.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_unit", "_interactionDialog", "_openWounds", "_part", "_total", "_amountOfWoundsSmall", "_amountOfWoundsMedium", "_amountOfWoundsLarge", "_bandagedWounds","_alphaLevel", "_damaged"];
+_openWounds = _this select 0;
+_bandagedWounds = _this select 1;
+
+disableSerialization;
+_interactionDialog = uiNamespace getvariable QGVAR(medicalMenu);
+if (isnil "_interactionDialog") exitwith {};
+
+_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/addons/medical/functions/fnc_updateIcons.sqf b/addons/medical/functions/fnc_updateIcons.sqf
new file mode 100644
index 0000000000..81c071efca
--- /dev/null
+++ b/addons/medical/functions/fnc_updateIcons.sqf
@@ -0,0 +1,27 @@
+/**
+ * fn_updateIcons.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_display","_startIDC","_idc","_options","_name","_amount"];
+disableSerialization;
+_display = uiNamespace getVariable QGVAR(medicalMenu);
+
+_startIDC = 111;
+
+_options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"];
+for "_idc" from _startIDC to 118 step 1 do {
+ _amount = [ACE_player, GVAR(INTERACTION_TARGET), _options select (_idc - 111)] call FUNC(getTreatmentOptions);
+ 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/addons/medical/functions/fnc_updateUIInfo.sqf b/addons/medical/functions/fnc_updateUIInfo.sqf
new file mode 100644
index 0000000000..2d847e7c26
--- /dev/null
+++ b/addons/medical/functions/fnc_updateUIInfo.sqf
@@ -0,0 +1,218 @@
+/**
+ * fn_updateUIInfo.sqf
+ * @Descr: N/A
+ * @Author: Glowbal
+ *
+ * @Arguments: []
+ * @Return:
+ * @PublicAPI: false
+ */
+
+#include "script_component.hpp"
+
+private ["_targetObj","_bodyPartText","_bodyPartN","_openWounds","_bandagedWounds","_fractures","_listOfWounds","_listOfBandagedWounds","_listOfFractures","_counter","_nameEntry","_untreatedWounds" ,"_remainder", "_numberOf", "_airwayStatus", "_airwayTreated"];
+_targetObj = _this select 0;
+
+_bodyPartText = (call FUNC(getSelectedBodyPart));
+_bodyPartN = [_bodyPartText] call FUNC(getBodyPartNumber);
+
+if (_bodyPartN < 0 || _bodyPartN > 5) exitwith {};
+
+systemChat format["updateUIInfo %1", _this];
+
+_openWounds = [_targetObj,QGVAR(openWounds)] call EFUNC(common,getDefinedVariable);
+_bandagedWounds = [_targetObj,QGVAR(bandagedWounds)] call EFUNC(common,getDefinedVariable);
+_fractures = [_targetObj,QGVAR(fractures)] call EFUNC(common,getDefinedVariable);
+_airwayStatus = [_targetObj,QGVAR(airway)] call EFUNC(common,getDefinedVariable);
+
+if (count _this > 1) then {
+ switch (_this select 1) do {
+ case QGVAR(openWounds): { _openWounds = _this select 2; };
+ case QGVAR(bandagedWounds): { _bandagedWounds = _this select 2; };
+ case QGVAR(fractures): { _fractures = _this select 2; };
+ };
+};
+
+[_openWounds,_bandagedWounds] call FUNC(updateBodyImg);
+_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_ACE_UI_HEAD";
+ };
+ case "body": {
+ localize "STR_ACE_UI_TORSO";
+ };
+ case "hand_r": {
+ localize "STR_ACE_UI_ARM_R";
+ };
+ case "hand_l": {
+ localize "STR_ACE_UI_ARM_L";
+ };
+ case "leg_r": {
+ localize "STR_ACE_UI_LEG_R";
+ };
+ case "leg_l": {
+ localize "STR_ACE_UI_LEG_L";
+ };
+ default {"-"};
+};
+
+
+lbadd[213,format[localize "STR_ACE_UI_SELECTED_BODY_PART",_displayBodyPartText]];
+lbSetData [213, _numberOf, ""];
+lbSetColor [213, _numberOf, [0.27, 0.40, 0.26, 1]];
+//[] spawn FUNC(updateActivityLog);
+_numberOf = _numberOf + 1;
+
+if (GVAR(setting_allowAirwayInjuries)) then {
+ _airwayTreated = _targetObj getvariable [QGVAR(airwayTreated), false];
+
+ if (_airwayStatus > 0) then {
+ _nameEntry = switch (_airwayStatus) do {
+ case 0: {localize "STR_ACE_UI_NORMAL_BREATHING"};
+ case 1: {localize "STR_ACE_UI_DIFFICULT_BREATHING"};
+ case 2: {localize "STR_ACE_UI_ALMOST_NO_BREATHING"};
+ default {localize "STR_ACE_UI_NO_BREATHING"};
+ };
+
+ if (!(alive _targetObj) || (_targetObj getvariable [QEGVAR(common,isDead), false])) then {
+ lbadd[213,format["%1",localize "STR_ACE_UI_NO_BREATHING"]];
+ } else {
+ lbadd[213,format["%1",_nameEntry]];
+ };
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+ } else {
+ if (!(alive _targetObj) || (_targetObj getvariable [QEGVAR(common,isDead), false])) then {
+ lbadd[213,format["%1",localize "STR_ACE_UI_NO_BREATHING"]];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+ };
+ };
+
+ if (_airwayTreated) then {
+ lbadd[213,localize "STR_ACE_UI_STATUS_NPA_APPLIED"];
+ lbSetData [213, _numberOf, ""];
+ lbSetColor [213, _numberOf, [0.5, 0.5, 0, 1]];
+ _numberOf = _numberOf + 1;
+ };
+};
+
+if (([_targetObj,QGVAR(isBleeding)] call EFUNC(common,getDefinedVariable))) then {
+ lbadd[213,localize "STR_ACE_UI_STATUS_BLEEDING"];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+if (([_targetObj,QGVAR(hasLostBlood)] call EFUNC(common,getDefinedVariable))) then {
+ lbadd[213,localize "STR_ACE_UI_STATUS_LOST_BLOOD"];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+
+if (([_targetObj,QGVAR(hasPain)] call EFUNC(common,getDefinedVariable))) then {
+ lbadd[213,localize "STR_ACE_UI_STATUS_PAIN"];
+ lbSetData [213, _numberOf, ""];
+ _numberOf = _numberOf + 1;
+};
+if (([_targetObj, _bodyPartText] call FUNC(hasTourniquetAppliedTo))) then {
+ lbadd[213,localize "STR_ACE_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_ACE_UI_SMALL"};
+ case 1: {localize "STR_ACE_UI_MEDIUM"};
+ case 2: {localize "STR_ACE_UI_LARGE"};
+ default {localize "STR_ACE_UI_SMALL"};
+ };
+
+ if (_untreatedWounds > 1) then {
+ lbadd[213,format[localize "STR_ACE_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_ACE_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_ACE_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_ACE_UI_SMALL"};
+ case 1: {localize "STR_ACE_UI_MEDIUM"};
+ case 2: {localize "STR_ACE_UI_LARGE"};
+ default {localize "STR_ACE_UI_SMALL"};
+ };
+
+ if (_untreatedWounds > 1) then {
+ lbadd[213,format[localize "STR_ACE_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_ACE_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_ACE_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_ACE_UI_SMALL"};
+ case 1: {localize "STR_ACE_UI_MEDIUM"};
+ case 2: {localize "STR_ACE_UI_LARGE"};
+ default {localize "STR_ACE_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/addons/medical/functions/fnc_useEquipment.sqf b/addons/medical/functions/fnc_useEquipment.sqf
new file mode 100644
index 0000000000..e432585de9
--- /dev/null
+++ b/addons/medical/functions/fnc_useEquipment.sqf
@@ -0,0 +1,43 @@
+/**
+ * fn_useEquipment.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
+ */
+
+#include "script_component.hpp"
+
+private ["_medic", "_patient", "_item", "_return","_crew"];
+_medic = _this select 0;
+_patient = _this select 1;
+_item = _this select 2;
+
+if (isnil QGVAR(setting_allowSharedEquipment)) then {
+ GVAR(setting_allowSharedEquipment) = true;
+};
+
+if (GVAR(setting_allowSharedEquipment) && {[_patient, _item] call EFUNC(common,hasItem)}) exitwith {
+ [[_patient, _item], QUOTE(EFUNC(common,useItem)), _patient] call BIS_fnc_MP;
+ true;
+};
+
+if ([_medic, _item] call EFUNC(common,hasItem)) exitwith {
+ [[_medic, _item], QUOTE(EFUNC(common,useItem)), _medic] call BIS_fnc_MP;
+ true;
+};
+
+_return = false;
+if ([vehicle _medic] call FUNC(isMedicalVehicle) && {vehicle _medic != _medic}) then {
+ _crew = crew vehicle _medic;
+ {
+ if ([_x, _medic] call FUNC(canAccessMedicalEquipment) && {([_x, _item] call EFUNC(common,hasItem))}) exitwith {
+ _return = true;
+ [[_x, _item], QUOTE(EFUNC(common,useItem)), _x] call BIS_fnc_MP;
+ };
+ }foreach _crew;
+};
+
+_return
\ No newline at end of file
diff --git a/addons/medical/functions/print.txt b/addons/medical/functions/print.txt
new file mode 100644
index 0000000000..c6b431d30b
--- /dev/null
+++ b/addons/medical/functions/print.txt
@@ -0,0 +1,100 @@
+fnc_actionCarryUnit.sqf
+fnc_ActioncheckBloodPressure.sqf
+fnc_ActionCheckBloodPressureLocal.sqf
+fnc_ActionCheckPulse.sqf
+fnc_actionCheckPulseLocal.sqf
+fnc_actionCheckResponse.sqf
+fnc_actionDragUnit.sqf
+fnc_actionDropUnit.sqf
+fnc_actionLoadUnit.sqf
+fnc_actionPlaceInBodyBag.sqf
+fnc_actionRemoveTourniquet.sqf
+fnc_actionUnloadUnit.sqf
+fnc_addActivityToLog.sqf
+fnc_addHeartRateAdjustment.sqf
+fnc_addOpenWounds.sqf
+fnc_addToInjuredCollection.sqf
+fnc_addToQuickViewLog.sqf
+fnc_addToTriageList.sqf
+fnc_addTreatmentOption.sqf
+fnc_canAccessMedicalEquipment.sqf
+fnc_canPutInBodyBag.sqf
+fnc_determineIfFatal.sqf
+fnc_determineIfUnconscious.sqf
+fnc_fromNumberToBodyPart.sqf
+fnc_getActivityLog.sqf
+fnc_getBloodLoss.sqf
+fnc_getBloodPressure.sqf
+fnc_getBloodVolumeChange.sqf
+fnc_getBodyPartNumber.sqf
+fnc_getCardiacOutput.sqf
+fnc_getCurrentSelectedInjuryData.sqf
+fnc_getHeartRateChange.sqf
+fnc_getNewDamageBodyPart.sqf
+fnc_getQuickViewLog.sqf
+fnc_getSelectedBodyPart.sqf
+fnc_getTreatmentOptions.sqf
+fnc_getTriageList.sqf
+fnc_getTriageStatus.sqf
+fnc_getTypeOfDamage.sqf
+fnc_handleBandageOpening.sqf
+fnc_handleDamage.sqf
+fnc_handleDisplayEffects.sqf
+fnc_handleHeal.sqf
+fnc_handleReactionHit.sqf
+fnc_handleTreatment.sqf
+fnc_handleTreatment_Action_AdvancedLocal.sqf
+fnc_handleTreatment_Action_AirwayLocal.sqf
+fnc_handleTreatment_Action_BandageLocal.sqf
+fnc_handleTreatment_Action_CPR.sqf
+fnc_handleTreatment_Action_CPRLocal.sqf
+fnc_handleTreatment_Action_fullHeal.sqf
+fnc_handleTreatment_Action_fullHealLocal.sqf
+fnc_handleTreatment_Action_MedicationLocal.sqf
+fnc_handleTreatment_Action_Stitching.sqf
+fnc_handleTreatment_Action_tourniquet.sqf
+fnc_handleTreatment_Action_tourniquetLocal.sqf
+fnc_handleTreatment_Category_Advanced.sqf
+fnc_handleTreatment_Category_Airway.sqf
+fnc_handleTreatment_Category_Bandaging.sqf
+fnc_handleTreatment_Category_Medication.sqf
+fnc_handleUI_DisplayOptions.sqf
+fnc_handleUI_dropDownTriageCard.sqf
+fnc_handleUnitVitals.sqf
+fnc_hasEquipment.sqf
+fnc_hasMedicalEnabled.sqf
+fnc_hasOpenWounds.sqf
+fnc_increasePain.sqf
+fnc_initalizeModuleCMS.sqf
+fnc_inMedicalFacility.sqf
+fnc_isMedic.sqf
+fnc_isMedicalVehicle.sqf
+fnc_isSetTreatmentMutex.sqf
+fnc_moduleAssignMedicalEquipment.sqf
+fnc_moduleAssignMedicalFacility.sqf
+fnc_moduleAssignMedicalVehicle.sqf
+fnc_moduleAssignMedicRoles.sqf
+fnc_onInitForUnit.sqf
+fnc_onInjury_assignAirwayStatus.sqf
+fnc_onInjury_assignFractures.sqf
+fnc_onInjury_assignOpenWounds.sqf
+fnc_onKilled.sqf
+fnc_onLocal.sqf
+fnc_onMenuOpen.sqf
+fnc_onTreatmentCompleted.sqf
+fnc_onUnconscious.sqf
+fnc_openMenu.sqf
+fnc_playInjuredSound.sqf
+fnc_setCardiacArrest.sqf
+fnc_setDamageBodyPart.sqf
+fnc_setDead.sqf
+fnc_setMedicRole.sqf
+fnc_setTriageStatus.sqf
+fnc_treatmentMutex.sqf
+fnc_updateActivityLog.sqf
+fnc_updateBodyImg.sqf
+fnc_updateIcons.sqf
+fnc_updateUIInfo.sqf
+fnc_useEquipment.sqf
+print.txt
+script_component.hpp
diff --git a/addons/medical/functions/script_component.hpp b/addons/medical/functions/script_component.hpp
new file mode 100644
index 0000000000..140463d68d
--- /dev/null
+++ b/addons/medical/functions/script_component.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\medical\script_component.hpp"
diff --git a/addons/medical/script_component.hpp b/addons/medical/script_component.hpp
new file mode 100644
index 0000000000..cdbccbd643
--- /dev/null
+++ b/addons/medical/script_component.hpp
@@ -0,0 +1,25 @@
+#define COMPONENT medical
+#include "\z\ace\addons\main\script_mod.hpp"
+
+#ifdef DEBUG_ENABLED_MEDICAL
+ #define DEBUG_MODE_FULL
+#endif
+
+#ifdef DEBUG_SETTINGS_MEDICAL
+ #define DEBUG_SETTINGS DEBUG_SETTINGS_MEDICAL
+#endif
+
+#include "\z\ace\addons\main\script_macros.hpp"
+
+
+#define TREATMENT_AIRWAY(ITEM) {[_this select 0,_this select 1,call FUNC(getSelectedBodyPart),ITEM,'airway'] call FUNC(handleTreatment)}
+#define TREATMENT_ADVANCED(ITEM) {[_this select 0,_this select 1,call FUNC(getSelectedBodyPart),ITEM,'advanced'] call FUNC(handleTreatment)}
+#define TREATMENT_BANDAGE(ITEM) {[_this select 0,_this select 1,call FUNC(getSelectedBodyPart),ITEM,'bandage'] call FUNC(handleTreatment)}
+#define TREATMENT_MEDICATION(ITEM) {[_this select 0,_this select 1,call FUNC(getSelectedBodyPart),ITEM,'medication'] call FUNC(handleTreatment)}
+#define TREATMENT_OTHER(ITEM) {[_this select 0,_this select 1,call FUNC(getSelectedBodyPart),ITEM,'other'] call FUNC(handleTreatment)}
+
+#define ADD_TREATMENT_AIRWAY(TITLE,TOOLTIP,ITEM) [TITLE,TOOLTIP,{[_this select 0,_this select 1,ITEM] call FUNC(hasEquipment)},TREATMENT_AIRWAY(ITEM),'airway'] call FUNC(addTreatmentOption)
+#define ADD_TREATMENT_ADVANCED(TITLE,TOOLTIP,ITEM) [TITLE,TOOLTIP,{[_this select 0,_this select 1,ITEM] call FUNC(hasEquipment)},TREATMENT_ADVANCED(ITEM),'advanced'] call FUNC(addTreatmentOption)
+#define ADD_TREATMENT_BANDAGE(TITLE,TOOLTIP,ITEM) [TITLE,TOOLTIP,{[_this select 0,_this select 1,ITEM] call FUNC(hasEquipment)},TREATMENT_BANDAGE(ITEM),'bandage'] call FUNC(addTreatmentOption)
+#define ADD_TREATMENT_MEDICATION(TITLE,TOOLTIP,ITEM) [TITLE,TOOLTIP,{[_this select 0,_this select 1,ITEM] call FUNC(hasEquipment)},TREATMENT_MEDICATION(ITEM),'medication'] call FUNC(addTreatmentOption)
+#define ADD_TREATMENT_OTHER(TITLE,TOOLTIP,ITEM) [TITLE,TOOLTIP,{[_this select 0,_this select 1,ITEM] call FUNC(hasEquipment)},TREATMENT_OTHER(ITEM),'other'] call FUNC(addTreatmentOption)
diff --git a/addons/medical/sounds/heart_beats/fast_1.wav b/addons/medical/sounds/heart_beats/fast_1.wav
new file mode 100644
index 0000000000..4ac1fe6c7d
Binary files /dev/null and b/addons/medical/sounds/heart_beats/fast_1.wav differ
diff --git a/addons/medical/sounds/heart_beats/fast_2.wav b/addons/medical/sounds/heart_beats/fast_2.wav
new file mode 100644
index 0000000000..38bae9cb2a
Binary files /dev/null and b/addons/medical/sounds/heart_beats/fast_2.wav differ
diff --git a/addons/medical/sounds/heart_beats/fast_3.wav b/addons/medical/sounds/heart_beats/fast_3.wav
new file mode 100644
index 0000000000..f600d30567
Binary files /dev/null and b/addons/medical/sounds/heart_beats/fast_3.wav differ
diff --git a/addons/medical/sounds/heart_beats/norm_1.wav b/addons/medical/sounds/heart_beats/norm_1.wav
new file mode 100644
index 0000000000..73ebe128d6
Binary files /dev/null and b/addons/medical/sounds/heart_beats/norm_1.wav differ
diff --git a/addons/medical/sounds/heart_beats/norm_2.wav b/addons/medical/sounds/heart_beats/norm_2.wav
new file mode 100644
index 0000000000..c46da91489
Binary files /dev/null and b/addons/medical/sounds/heart_beats/norm_2.wav differ
diff --git a/addons/medical/sounds/heart_beats/slow_1.wav b/addons/medical/sounds/heart_beats/slow_1.wav
new file mode 100644
index 0000000000..3cf199ba51
Binary files /dev/null and b/addons/medical/sounds/heart_beats/slow_1.wav differ
diff --git a/addons/medical/sounds/heart_beats/slow_2.wav b/addons/medical/sounds/heart_beats/slow_2.wav
new file mode 100644
index 0000000000..ba50746326
Binary files /dev/null and b/addons/medical/sounds/heart_beats/slow_2.wav differ
diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml
new file mode 100644
index 0000000000..f23f45c1fc
--- /dev/null
+++ b/addons/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 %2
+ Тащить раненого %2
+ Arrastrar a %2r
+
+
+ Carry
+ Нести
+ Cargar
+
+
+ Carry %2
+ Нести раненого %2
+ Cargar a %2
+
+
+ Bodybag
+ Мешок для трупов
+ Bolsa para cadáveres
+
+
+ Put body in bodybag
+ Поместить труп в мешок
+ Meter cuerpo en la bolsa para cadáveres
+
+
+ Drop
+ Положить
+ Soltar
+
+
+ Drop %2
+ Положить %2
+ Soltar a %2
+
+
+ Load in Vehicle
+ Погрузить в транспорт
+ Meter en vehículo
+
+
+ Load %2
+ Погрузить раненого %2
+ Cargar a %2
+
+
+ Unload
+ Выгрузить
+ Descargar
+
+
+ Unload %2
+ Выгрузить раненого %2
+ Descargar a %2
+
+
+
+
+ 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 bandage %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 airway
+ %1 проводит вам интубацию
+ %1 te está intubando
+
+
+
+
diff --git a/addons/medical/ui/define.hpp b/addons/medical/ui/define.hpp
new file mode 100644
index 0000000000..3af837e4f1
--- /dev/null
+++ b/addons/medical/ui/define.hpp
@@ -0,0 +1 @@
+#include "\z\ace\addons\gui\UI\define.hpp"
\ No newline at end of file
diff --git a/addons/medical/ui/menu.hpp b/addons/medical/ui/menu.hpp
new file mode 100644
index 0000000000..f65b5ab807
--- /dev/null
+++ b/addons/medical/ui/menu.hpp
@@ -0,0 +1,568 @@
+class GVAR(medicalMenu) {
+ idd = 314412;
+ movingEnable = true;
+ onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(medicalMenu)), _this select 0)]; [ARR_2(QUOTE(QGVAR(id)), true)] call EFUNC(gui,blurScreen); [_this select 0] call FUNC(onMenuOpen););
+ onUnload = QUOTE([ARR_2(QUOTE(QGVAR(id)), false)] call EFUNC(gui,blurScreen); [ARR_2(QUOTE(QGVAR(onMenuOpen)), 'onEachFrame')] call BIS_fnc_removeStackedEventHandler;);
+ class controlsBackground {
+ class HeaderBackground: ACE_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)";
+ };
+ class CenterBackground: HeaderBackground {
+ 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.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: ACE_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 = QUOTE(PATHTOF(data\background_img.paa));
+ colorText[] = {1, 1, 1, 0.0};
+ };
+ 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[] = {1, 1, 1.0, 0.9};
+ colorBackground[] = {0,0,0,0};
+ SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)";
+ text = $STR_ACE_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_ACE_UI_STATUS;
+ };
+ class CatagoryRight: CatagoryCenter{
+ x = "25.66 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = $STR_ACE_UI_OVERVIEW;
+ };
+ class Line: ACE_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: ACE_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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(data\icons\icon_carry.paa));
+ };
+ class iconImg8: iconImg1 {
+ idc = 118;
+ x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ text = QUOTE(PATHTOF(data\icons\toggle_self_small.paa));
+ };
+
+
+ class BtnIconLeft1: ACE_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.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 = QUOTE(['triage'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft2: BtnIconLeft1 {
+ idc = 12;
+ x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['examine'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft3: BtnIconLeft1 {
+ idc = 13;
+ x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['bandage'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft4: BtnIconLeft1 {
+ idc = 14;
+ x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['medication'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft5: BtnIconLeft1 {
+ idc = 15;
+ x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['airway'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft6: BtnIconLeft1 {
+ idc = 16;
+ x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['advanced'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft7: BtnIconLeft1 {
+ idc = 17;
+ x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['drag'] call FUNC(handleUI_DisplayOptions););
+ };
+ class BtnIconLeft8: BtnIconLeft1 {
+ idc = 18;
+ x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(['toggle'] call FUNC(handleUI_DisplayOptions););
+ };
+
+ class TriageCardList: ACE_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;
+ 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: ACE_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 = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(data\body_head.paa));
+ };
+
+ class bodyImgTorso: bodyImgHead {
+ idc = 51;
+ text = QUOTE(PATHTOF(data\body_torso.paa));
+ };
+ class bodyImgArms_l: bodyImgHead {
+ idc = 52;
+ text = QUOTE(PATHTOF(data\body_arm_left.paa));
+ };
+ class bodyImgArms_r: bodyImgHead {
+ idc = 53;
+ text = QUOTE(PATHTOF(data\body_arm_right.paa));
+ };
+ class bodyImgLegs_l: bodyImgHead {
+ idc = 54;
+ text = QUOTE(PATHTOF(data\body_leg_left.paa));
+ };
+ class bodyImgLegs_r: bodyImgHead {
+ idc = 55;
+ text = QUOTE(PATHTOF(data\body_leg_right.paa));
+ };
+
+
+ class selectHead: ACE_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.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 = QUOTE(GVAR(selectedBodyPart) = 'head'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
+ };
+ 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 = QUOTE(GVAR(selectedBodyPart) = 'body'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
+ };
+ 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 = QUOTE(GVAR(selectedBodyPart) = 'hand_r'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
+ };
+ class selectRightArm: selectLeftArm{
+ idc = 304;
+ x = "20.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(GVAR(selectedBodyPart) = 'hand_l'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
+ };
+ 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 = QUOTE(GVAR(selectedBodyPart) = 'leg_r'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
+ };
+ class selectRightLeg :selectLeftLeg {
+ idc = 306;
+ x = "19.6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
+ action = QUOTE(GVAR(selectedBodyPart) = 'leg_l'; [GVAR(INTERACTION_TARGET)] call FUNC(updateUIInfo););
+ };
+
+
+ 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: ACE_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
+
+ 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_ACE_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_ACE_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: ACE_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 = QUOTE([] call FUNC(handleUI_dropDownTriageCard););
+ };
+ class selectTriageStatusNone: selectTriageStatus {
+ idc = 2002;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_ACE_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 = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),0)] call FUNC(setTriageStatus););
+ };
+
+ class selectTriageStatusMinor: selectTriageStatus {
+ idc = 2003;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_ACE_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 = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),1)] call FUNC(setTriageStatus););
+ };
+ class selectTriageStatusDelayed: selectTriageStatus {
+ idc = 2004;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_ACE_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 = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),2)] call FUNC(setTriageStatus););
+ };
+ class selectTriageStatusImmediate: selectTriageStatus {
+ idc = 2005;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_ACE_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 = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),3)] call FUNC(setTriageStatus););
+ };
+ class selectTriageStatusDeceased: selectTriageStatus {
+ idc = 2006;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0;
+ text = $STR_ACE_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 = QUOTE([] call FUNC(handleUI_dropDownTriageCard); [ARR_2(GVAR(INTERACTION_TARGET),4)] call FUNC(setTriageStatus););
+ };
+ };
+};
\ No newline at end of file
diff --git a/addons/medical/variable_defines.sqf b/addons/medical/variable_defines.sqf
new file mode 100644
index 0000000000..aa631a068d
--- /dev/null
+++ b/addons/medical/variable_defines.sqf
@@ -0,0 +1,57 @@
+// public variables
+[QGVAR(openWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(bandagedWounds),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(fractures),[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(airway), 0, true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(tourniquets),[0,0,0,0,0,0],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(splints),[0,0,0,0,0,0],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(isBleeding),false,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(hasPain),false,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(hasLostBlood),false,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(airwayTreated),false,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+// Airway
+[QGVAR(airwayOccluded), false, true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(airwayRespiratoryArrest), false, true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(airwayCollapsed), false, true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(airwayStatus), 100, false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+// logs
+[QGVAR(quickViewLog),[],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(activityLog),[],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(triageLevel),0,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(triageCard),[],true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+[QGVAR(medicClass),0,true, QUOTE(ADDON),0,true] call EFUNC(common,defineVariable); // should be a persistent variable; must not be removed by a reset all defaults call
+[QGVAR(isMedicalFacility),0,true, QUOTE(ADDON),0,true] call EFUNC(common,defineVariable); // should be a persistent variable; must not be removed by a reset all defaults call
+
+[QGVAR(noInstantDeath),false,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(inCardiacArrest),false,true, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+// private variables
+[QGVAR(bloodVolume),100,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(bloodIVVolume),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(plasmaIVVolume),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(salineIVVolume),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+[QGVAR(amountOfPain),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(heartRate),80,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(andrenaline),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(heartRateAdjustments),[],false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+[QGVAR(bloodPressure), [80,120],false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(peripheralResistance), 100,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(cardiacOutput), 5.25,false, QUOTE(ADDON)] call EFUNC(common,defineVariable); // Source for default: http://en.wikipedia.org/wiki/Cardiac_output#Example_values
+
+[QGVAR(givenMorphine),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(givenAtropine),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(givenEpinephrine),0,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+[QGVAR(bodyPartStatus),[0,0,0,0,0,0],false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+[QGVAR(bodyPartStatusPrevious),[0,0,0,0,0,0],false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+[QGVAR(addedToUnitLoop),false,false, QUOTE(ADDON)] call EFUNC(common,defineVariable);
+
+GVAR(VarDefinesCompleted) = true;
+
+diag_log "finished variable defines";
\ No newline at end of file