Add first step in medical rewrite

Split up medical core and medical damage. Move out all other functionality
This commit is contained in:
Glowbal 2016-06-30 17:33:29 +02:00
parent 8b1b31fc8d
commit 3aa88c80bf
338 changed files with 662 additions and 16948 deletions

View File

@ -1 +1 @@
z\ace\addons\medical z\ace\addons\medical

View File

@ -1,280 +0,0 @@
class ACE_Medical_Advanced {
// Defines all the possible injury types for advanced medical
class Injuries {
// All the possible wounds
class wounds {
// Source: Scarle
// Also called scrapes, they occur when the skin is rubbed away by friction against another rough surface (e.g. rope burns and skinned knees).
class Abrasion {
name = CSTRING(Wounds_Abrasion);
selections[] = {"All"};
bleedingRate = 0.0001;
pain = 0.01;
causes[] = {"falling", "ropeburn", "vehiclecrash", "unknown"};
minDamage = 0.01;
class Minor {
name = CSTRING(Wounds_Abrasion_Minor);
minDamage = 0.01;
maxDamage = 0.2;
bleedingRate = 0.0001;
};
class Medium {
name = CSTRING(Wounds_Abrasion_Medium);
minDamage = 0.2;
maxDamage = 0.3;
bleedingRate = 0.00015;
};
class Large {
name = CSTRING(Wounds_Abrasion_Large);
minDamage = 0.3;
maxDamage = 0.5;
bleedingRate = 0.0002;
};
};
// Occur when an entire structure or part of it is forcibly pulled away, such as the loss of a permanent tooth or an ear lobe. Explosions, gunshots, and animal bites may cause avulsions.
class Avulsions {
name = CSTRING(Wounds_Avulsion);
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.3;
causes[] = {"explosive", "vehiclecrash", "grenade", "shell", "bullet", "backblast", "bite"};
minDamage = 0.2;
class Minor {
name = CSTRING(Wounds_Avulsion_Minor);
minDamage = 0.2;
maxDamage = 0.3;
bleedingRate = 0.01;
};
class Medium {
name = CSTRING(Wounds_Avulsion_Medium);
minDamage = 0.3;
maxDamage = 0.6;
bleedingRate = 0.02;
};
class Large {
name = CSTRING(Wounds_Avulsion_Large);
minDamage = 0.5;
bleedingRate = 0.05;
};
};
// Also called bruises, these are the result of a forceful trauma that injures an internal structure without breaking the skin. Blows to the chest, abdomen, or head with a blunt instrument (e.g. a football or a fist) can cause contusions.
class Contusion {
name = CSTRING(Wounds_Contusion);
selections[] = {"All"};
bleedingRate = 0.0;
pain = 0.05;
causes[] = {"bullet", "backblast", "punch", "vehiclecrash", "falling"};
minDamage = 0.01;
maxDamage = 0.1;
class Minor {
name = CSTRING(Wounds_Contusion_Minor);
minDamage = 0.01;
maxDamage = 0.1;
};
class Medium {
name = CSTRING(Wounds_Contusion_Medium);
minDamage = 0.1;
maxDamage = 0.15;
};
class Large {
name = CSTRING(Wounds_Contusion_Large);
minDamage = 0.15;
maxDamage = 0.2;
};
};
// Occur when a heavy object falls onto a person, splitting the skin and shattering or tearing underlying structures.
class CrushWound {
name = CSTRING(Wounds_Crush);
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.1;
causes[] = {"falling", "vehiclecrash", "punch", "unknown"};
minDamage = 0.1;
class Minor {
name = CSTRING(Wounds_Crush_Minor);
minDamage = 0.1;
maxDamage = 0.45;
bleedingRate = 0.005;
};
class Medium {
name = CSTRING(Wounds_Crush_Medium);
minDamage = 0.4;
maxDamage = 0.7;
bleedingRate = 0.007;
};
class Large {
name = CSTRING(Wounds_Crush_Large);
minDamage = 0.6;
bleedingRate = 0.0095;
};
};
// Slicing wounds made with a sharp instrument, leaving even edges. They may be as minimal as a paper cut or as significant as a surgical incision.
class Cut {
name = CSTRING(Wounds_Cut);
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.075;
causes[] = {"vehiclecrash", "grenade", "explosive", "shell", "backblast", "stab", "unknown"};
minDamage = 0.1;
class Minor {
name = CSTRING(Wounds_Cut_Minor);
minDamage = 0.1;
maxDamage = 0.3;
bleedingRate = 0.005;
};
class Medium {
name = CSTRING(Wounds_Cut_Medium);
minDamage = 0.3;
maxDamage = 0.65;
bleedingRate = 0.02;
};
class Large {
name = CSTRING(Wounds_Cut_Large);
minDamage = 0.65;
bleedingRate = 0.05;
};
};
// Also called tears, these are separating wounds that produce ragged edges. They are produced by a tremendous force against the body, either from an internal source as in childbirth, or from an external source like a punch.
class Laceration {
name = CSTRING(Wounds_Laceration);
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.075;
causes[] = {"vehiclecrash", "punch"};
minDamage = 0.01;
class Minor {
name = CSTRING(Wounds_Laceration_Minor);
minDamage = 0.1;
maxDamage = 0.5;
bleedingRate = 0.005;
};
class Medium {
name = CSTRING(Wounds_Laceration_Medium);
minDamage = 0.5;
maxDamage = 0.7;
bleedingRate = 0.01;
};
class Large {
name = CSTRING(Wounds_Laceration_Large);
minDamage = 0.7;
bleedingRate = 0.03;
};
};
// Also called velocity wounds, they are caused by an object entering the body at a high speed, typically a bullet or small peices of shrapnel.
class velocityWound {
name = CSTRING(Wounds_VelocityWound);
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.2;
causes[] = {"bullet", "grenade","explosive", "shell", "unknown"};
minDamage = 0.15;
class Minor {
name = CSTRING(Wounds_VelocityWound_Minor);
minDamage = 0.15;
maxDamage = 0.3;
bleedingRate = 0.025;
};
class Medium {
name = CSTRING(Wounds_VelocityWound_Medium);
minDamage = 0.3;
maxDamage = 0.75;
bleedingRate = 0.05;
};
class Large {
name = CSTRING(Wounds_VelocityWound_Large);
minDamage = 0.75;
bleedingRate = 0.1;
};
};
// Deep, narrow wounds produced by sharp objects such as nails, knives, and broken glass.
class punctureWound {
name = CSTRING(Wounds_PunctureWound);
selections[] = {"All"};
bleedingRate = 0.01;
pain = 0.075;
causes[] = {"stab", "grenade"};
minDamage = 0.01;
class Minor {
name = CSTRING(Wounds_PunctureWound_Minor);
minDamage = 0.01;
maxDamage = 0.5;
bleedingRate = 0.01;
};
class Medium {
name = CSTRING(Wounds_PunctureWound_Medium);
minDamage = 0.5;
maxDamage = 0.75;
bleedingRate = 0.03;
};
class Large {
name = CSTRING(Wounds_PunctureWound_Large);
minDamage = 0.65;
bleedingRate = 0.08;
};
};
};
class fractures {
class Femur {
name = CSTRING(Wounds_Femur);
selections[] = {"Head", "Torso"};
pain = 0.2;
causes[] = {"Bullet", "VehicleCrash", "Backblast", "Explosive", "Shell", "Grenade"};
minDamage = 0.5;
};
};
class damageTypes {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
lethalDamage = 0.01;
class bullet {
// above damage, amount. Put the highest threshold to the left and lower the threshold with the elements to the right of it.
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class grenade {
thresholds[] = {{0.1, 3}, {0, 1}};
selectionSpecific = 0;
};
class explosive {
thresholds[] = {{1, 6}, {0.1, 4}, {0, 1}};
selectionSpecific = 0;
};
class shell {
thresholds[] = {{1, 7}, {0.1, 5}, {0, 1}};
selectionSpecific = 0;
};
class vehiclecrash {
thresholds[] = {{0.25, 5}, {0.05, 1}};
selectionSpecific = 0;
lethalDamage = 0.2;
};
class backblast {
thresholds[] = {{1, 6}, {0.55, 5}, {0, 2}};
selectionSpecific = 0;
lethalDamage = 1;
};
class stab {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class punch {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class falling {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
lethalDamage = 0.4;
};
class ropeburn {
thresholds[] = {{0.1, 1}};
selectionSpecific = 1;
};
class unknown {
thresholds[] = {{0.1, 1}};
};
};
};
};

View File

@ -1,307 +0,0 @@
class ACE_Settings {
class GVAR(level) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_level_DisplayName);
description = CSTRING(MedicalSettings_level_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "Basic", "Advanced"};
};
class GVAR(medicSetting) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_medicSetting_DisplayName);
description = CSTRING(MedicalSettings_medicSetting_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "Normal", "Advanced"};
};
class GVAR(increaseTrainingInLocations) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_increaseTrainingInLocations_DisplayName);
description = CSTRING(MedicalSettings_increaseTrainingInLocations_Description);
value = 0;
typeName = "BOOL";
};
class GVAR(enableFor) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableFor_Description);
value = 0;
typeName = "SCALAR";
values[] = {"Players only", "Players and AI"};
};
class GVAR(enableOverdosing) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = 1;
};
class GVAR(bleedingCoefficient) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_bleedingCoefficient_DisplayName);
description = CSTRING(MedicalSettings_bleedingCoefficient_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(painCoefficient) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_painCoefficient_DisplayName);
description = CSTRING(MedicalSettings_painCoefficient_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(enableAirway) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = false;
};
class GVAR(enableFractures) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = false;
};
class GVAR(enableAdvancedWounds) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_Description);
typeName = "BOOL";
value = false;
};
class GVAR(enableVehicleCrashes) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(enableScreams) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_enableScreams_DisplayName);
description = CSTRING(MedicalSettings_enableScreams_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(playerDamageThreshold) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_playerDamageThreshold_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(AIDamageThreshold) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_AIDamageThreshold_Description);
typeName = "SCALAR";
value = 1;
};
class GVAR(enableUnconsciousnessAI) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_enableUnconsciousnessAI_DisplayName);
description = CSTRING(MedicalSettings_enableUnconsciousnessAI_Description);
value = 1;
typeName = "SCALAR";
values[] = {"Disabled", "50/50", "Enabled"};
};
class GVAR(remoteControlledAI) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName);
description = CSTRING(MedicalSettings_remoteControlledAI_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(preventInstaDeath) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName);
description = CSTRING(MedicalSettings_preventInstaDeath_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(enableRevive) {
category = CSTRING(Category_Medical);
displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
description = CSTRING(ReviveSettings_enableRevive_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Disabled", "Players only", "Players and AI"};
};
class GVAR(maxReviveTime) {
category = CSTRING(Category_Medical);
displayName = CSTRING(ReviveSettings_maxReviveTime_DisplayName);
description = CSTRING(ReviveSettings_maxReviveTime_Description);
typeName = "SCALAR";
value = 120;
};
class GVAR(amountOfReviveLives) {
category = CSTRING(Category_Medical);
displayName = CSTRING(ReviveSettings_amountOfReviveLives_DisplayName);
description = CSTRING(ReviveSettings_amountOfReviveLives_Description);
typeName = "SCALAR";
value = -1;
};
class GVAR(allowDeadBodyMovement) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = 0;
};
class GVAR(allowLitterCreation) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName);
description = CSTRING(MedicalSettings_allowLitterCreation_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(litterSimulationDetail) {
category = CSTRING(Category_Medical);
displayName = CSTRING(litterSimulationDetail);
description = CSTRING(litterSimulationDetail_Desc);
typeName = "SCALAR";
value = 3;
values[] = {"Off", "Low", "Medium", "High", "Ultra"};
_values[] = { 0, 50, 100, 1000, 5000 };
isClientSettable = 1;
};
class GVAR(litterCleanUpDelay) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName);
description = CSTRING(MedicalSettings_litterCleanUpDelay_Description);
typeName = "SCALAR";
value = 0;
};
class GVAR(medicSetting_basicEpi) {
category = CSTRING(Category_Medical);
displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(medicSetting_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_Description);
typeName = "SCALAR";
value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"};
};
class GVAR(consumeItem_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(consumeItem_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_Description);
typeName = "SCALAR";
value = 0;
values[] = {"No", "Yes"};
};
class GVAR(useLocation_basicEpi) {
category = CSTRING(Category_Medical);
displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useLocation_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useLocation_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_PAK_Description);
typeName = "SCALAR";
value = 3;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useLocation_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description);
typeName = "SCALAR";
value = 2;
values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)};
};
class GVAR(useCondition_PAK) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Anytime", "Stable"};
};
class GVAR(useCondition_SurgicalKit) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Anytime", "Stable"};
};
class GVAR(keepLocalSettingsSynced) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_keepLocalSettingsSynced_DisplayName);
description = CSTRING(MedicalSettings_keepLocalSettingsSynced_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(healHitPointAfterAdvBandage) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName);
description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(painIsOnlySuppressed) {
category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName);
description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(painEffectType) {
category = CSTRING(Category_Medical);
displayName = CSTRING(painEffectType);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(painEffect_Flash), CSTRING(painEffect_Chroma)};
isClientSettable = 1;
};
class GVAR(allowUnconsciousAnimationOnTreatment) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = 0;
};
class GVAR(moveUnitsFromGroupOnUnconscious) {
category = CSTRING(Category_Medical);
typeName = "BOOL";
value = 0;
};
class GVAR(menuTypeStyle) {
category = CSTRING(Category_Medical);
displayName = CSTRING(menuTypeDisplay);
description = CSTRING(menuTypeDescription);
typeName = "SCALAR";
value = 0;
values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"};
isClientSettable = 1;
};
class GVAR(delayUnconCaptive) {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName);
description = CSTRING(MedicalSettings_delayUnconCaptive_Description);
typeName = "SCALAR";
value = 3;
};
};

View File

@ -1,6 +0,0 @@
class CfgActions {
class None;
class Heal: None {
show = 0;
};
};

View File

@ -1,70 +0,0 @@
class ctrlToolbox;
class Cfg3DEN {
class Attributes {
class Default;
class Title: Default {
class Controls {
class Title;
};
};
class GVAR(isMedicControl): Title {
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
attributeSave = "(missionnamespace getvariable ['ace_isMeidc_temp',0]) - 1;";
class Controls: Controls {
class Title: Title{};
class Value: ctrlToolbox {
idc = 100;
style = "0x02";
x = "48 * (pixelW * pixelGrid * 0.25)";
w = "82 * (pixelW * pixelGrid * 0.25)";
h = "5 * (pixelH * pixelGrid * 0.25)";
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
onToolboxSelChanged = "missionnamespace setvariable ['ace_isMeidc_temp',_this select 1];";
};
};
};
};
class Object {
class AttributeCategories {
class ace_attributes {
class Attributes {
class ace_isMedic {
property = QUOTE(ace_isMedic);
control = QGVAR(isMedicControl);
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
tooltip = CSTRING(Attributes_isMedic_Description);
expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
typeName = "NUMBER";
condition = "objectBrain";
defaultValue = "-1";
};
class ace_isMedicalVehicle {
property = QUOTE(ace_isMedicalVehicle);
value = 0;
control = "CheckboxNumber";
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];);
typeName = "NUMBER";
condition = "objectVehicle";
defaultValue = 0;
};
class ace_isMedicalFacility {
property = QUOTE(ace_isMedicalFacility);
value = 0;
control = "Checkbox";
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(isMedicalFacility)),_value, true)];);
typeName = "BOOL";
condition = "(1 - objectBrain) * (1 - objectVehicle)";
defaultValue = "false";
};
};
};
};
};
};

View File

@ -1,4 +1,3 @@
class Extended_PreStart_EventHandlers { class Extended_PreStart_EventHandlers {
class ADDON { class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart)); init = QUOTE(call COMPILE_FILE(XEH_preStart));
@ -11,45 +10,10 @@ class Extended_PreInit_EventHandlers {
}; };
}; };
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_Init_EventHandlers { class Extended_Init_EventHandlers {
class CAManBase { class CAManBase {
class ADDON { class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_init)); init = QUOTE(call FUNC(install));
};
};
class ACE_bodyBagObject {
class ADDON {
init = QUOTE(_this call DEFUNC(dragging,initObject));
};
};
};
class Extended_Respawn_EventHandlers {
class CAManBase {
class ADDON {
respawn = QUOTE(call COMPILE_FILE(XEH_respawn));
};
};
};
class Extended_Killed_EventHandlers {
class CAManBase {
class ADDON {
killed = QUOTE(call FUNC(handleKilled));
};
};
};
class Extended_Local_EventHandlers {
class CAManBase {
class ADDON {
local = QUOTE(call FUNC(handleLocal));
}; };
}; };
}; };

View File

@ -1,6 +0,0 @@
class CfgFactionClasses {
class NO_CATEGORY;
class ADDON: NO_CATEGORY {
displayName = CSTRING(Category_DisplayName);
};
};

View File

@ -1,37 +0,0 @@
class CfgSounds {
class ACE_heartbeat_fast_1 {
name = "ACE_heartbeat_fast_1";
sound[] = {QPATHTOF(sounds\heart_beats\fast_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_fast_2 {
name = "ACE_heartbeat_fast_2";
sound[] = {QPATHTOF(sounds\heart_beats\fast_2.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_fast_3 {
name = "ACE_heartbeat_fast_3";
sound[] = {QPATHTOF(sounds\heart_beats\fast_3.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_norm_1 {
name = "ACE_heartbeat_norm_1";
sound[] = {QPATHTOF(sounds\heart_beats\norm_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_norm_2 {
name = "ACE_heartbeat_norm_2";
sound[] = {QPATHTOF(sounds\heart_beats\norm_2.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_slow_1 {
name = "ACE_heartbeat_slow_1";
sound[] = {QPATHTOF(sounds\heart_beats\slow_1.wav), "db+1", 1};
titles[] = {};
};
class ACE_heartbeat_slow_2 {
name = "ACE_heartbeat_slow_2";
sound[] = {QPATHTOF(sounds\heart_beats\slow_2.wav), "db+1", 1};
titles[] = {};
};
};

View File

@ -1,872 +0,0 @@
#define MEDICAL_ACTION_DISTANCE 1.75
class CBA_Extended_EventHandlers;
class CfgVehicles {
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {
};
};
class ACE_Module;
class ACE_moduleMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(MedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleMedicalSettings));
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class level {
displayName = CSTRING(MedicalSettings_level_DisplayName);
description = CSTRING(MedicalSettings_level_Description);
typeName = "NUMBER";
class values {
class normal {
name = CSTRING(MedicalSettings_basic);
value = 1;
default = 1;
};
class full {
name = CSTRING(MedicalSettings_advanced);
value = 2;
};
};
};
class medicSetting {
displayName = CSTRING(MedicalSettings_medicSetting_DisplayName);
description = CSTRING(MedicalSettings_medicSetting_Description);
typeName = "NUMBER";
class values {
class disable {
name = CSTRING(MedicalSettings_medicSetting_disable);
value = 0;
};
class normal {
name = CSTRING(MedicalSettings_basic);
value = 1;
default = 1;
};
class full {
name = CSTRING(MedicalSettings_advanced);
value = 2;
};
};
};
class increaseTrainingInLocations {
displayName = CSTRING(MedicalSettings_increaseTrainingInLocations_DisplayName);
description = CSTRING(MedicalSettings_increaseTrainingInLocations_Description);
typeName = "BOOL";
defaultValue = 0;
};
class allowLitterCreation {
displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName);
description = CSTRING(MedicalSettings_allowLitterCreation_Description);
typeName = "BOOL";
defaultValue = 1;
};
class litterCleanUpDelay {
displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName);
description = CSTRING(MedicalSettings_litterCleanUpDelay_Description);
typeName = "NUMBER";
defaultValue = 1800;
};
class enableScreams {
displayName = CSTRING(MedicalSettings_enableScreams_DisplayName);
description = CSTRING(MedicalSettings_enableScreams_Description);
typeName = "BOOL";
defaultValue = 1;
};
class playerDamageThreshold {
displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_playerDamageThreshold_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class AIDamageThreshold {
displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName);
description = CSTRING(MedicalSettings_AIDamageThreshold_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class enableUnconsciousnessAI {
displayName = CSTRING(MedicalSettings_enableUnconsciousnessAI_DisplayName);
description = CSTRING(MedicalSettings_enableUnconsciousnessAI_Description);
typeName = "NUMBER";
class values {
class disable {
name = ECSTRING(common,Disabled);
value = 0;
};
class normal {
name = "50/50";
value = 1;
default = 1;
};
class full {
name = ECSTRING(common,Enabled);
value = 2;
};
};
};
class remoteControlledAI {
displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName);
description = CSTRING(MedicalSettings_remoteControlledAI_Description);
typeName = "BOOL";
defaultValue = 1;
};
class preventInstaDeath {
displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName);
description = CSTRING(MedicalSettings_preventInstaDeath_Description);
typeName = "BOOL";
defaultValue = 0;
};
class bleedingCoefficient {
displayName = CSTRING(MedicalSettings_bleedingCoefficient_DisplayName);
description = CSTRING(MedicalSettings_bleedingCoefficient_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class painCoefficient {
displayName = CSTRING(MedicalSettings_painCoefficient_DisplayName);
description = CSTRING(MedicalSettings_painCoefficient_Description);
typeName = "NUMBER";
defaultValue = 1;
};
class keepLocalSettingsSynced {
displayName = CSTRING(MedicalSettings_keepLocalSettingsSynced_DisplayName);
description = CSTRING(MedicalSettings_keepLocalSettingsSynced_Description);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(MedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleBasicMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(BasicMedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleBasicMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class medicSetting_basicEpi {
displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description);
typeName = "NUMBER";
class values {
class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; };
class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; };
class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; };
};
};
class useLocation_basicEpi {
displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName);
description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description);
typeName = "NUMBER";
class values {
class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; default = 1; };
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; };
class disabled { name = ECSTRING(common,Disabled); value = 4;};
};
};
};
class ModuleDescription {
description = CSTRING(BasicMedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleAdvancedMedicalSettings: ACE_Module {
scope = 2;
displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAdvancedMedicalSettings);
functionPriority = 10;
isGlobal = 2;
isSingular = 1;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enableFor {
displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableFor_Description);
typeName = "NUMBER";
class values {
class playableUnits {
name = CSTRING(playeronly);
value = 0;
default = 1;
};
class playableUnitsAndAI {
name = CSTRING(playersandai);
value = 1;
};
};
};
class enableAdvancedWounds {
displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_Description);
typeName = "BOOL";
defaultValue = 0;
};
class enableVehicleCrashes {
displayName = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_DisplayName);
description = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_Description);
typeName = "BOOL";
defaultValue = 1;
};
class medicSetting_PAK {
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_Description);
typeName = "NUMBER";
class values {
class anyone { name = CSTRING(AdvancedMedicalSettings_anyone); value = 0; };
class Medic { name = CSTRING(AdvancedMedicalSettings_Medic); value = 1; default = 1; };
class Special { name = CSTRING(AdvancedMedicalSettings_Special); value = 2; };
};
};
class consumeItem_PAK {
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description);
typeName = "NUMBER";
class values {
class keep { name = ECSTRING(common,No); value = 0; };
class remove { name = ECSTRING(common,Yes); value = 1; default = 1; };
};
};
class useCondition_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
typeName = "NUMBER";
class values {
class AnyTime { name = CSTRING(AnyTime); value = 0; };
class Stable { name = CSTRING(Stable); value = 1; default = 1; };
};
};
class useLocation_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useLocation_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_PAK_Description);
typeName = "NUMBER";
class values {
class anywhere { name = CSTRING(AdvancedMedicalSettings_anywhere); value = 0; };
class vehicle { name = CSTRING(AdvancedMedicalSettings_vehicle); value = 1; };
class facility { name = CSTRING(AdvancedMedicalSettings_facility); value = 2; };
class vehicleAndFacility { name = CSTRING(AdvancedMedicalSettings_vehicleAndFacility); value = 3; default = 1; };
class disabled { name = ECSTRING(common,Disabled); value = 4;};
};
};
class medicSetting_SurgicalKit: medicSetting_PAK {
displayName = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_Description);
};
class consumeItem_SurgicalKit: consumeItem_PAK {
displayName = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_Description);
};
class useLocation_SurgicalKit: useLocation_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description);
};
class useCondition_SurgicalKit: useCondition_PAK {
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
class values {
class AnyTime { name = CSTRING(AnyTime); value = 0; default = 1; };
class Stable { name = CSTRING(Stable); value = 1; };
};
};
class healHitPointAfterAdvBandage {
displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName);
description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description);
typeName = "BOOL";
defaultValue = 0;
};
class painIsOnlySuppressed {
displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName);
description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description);
typeName = "BOOL";
defaultValue = 1;
};
};
class ModuleDescription {
description = CSTRING(AdvancedMedicalSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleReviveSettings: ACE_Module {
scope = 2;
displayName = CSTRING(ReviveSettings_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QUOTE(DFUNC(moduleReviveSettings));
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enableRevive {
displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
description = CSTRING(ReviveSettings_enableRevive_Description);
typeName = "NUMBER";
defaultValue = 0;
class values {
class disable { name = ECSTRING(common,Disabled); value = 0; default = 1;};
class playerOnly { name = CSTRING(playeronly); value = 1; };
class playerAndAI { name = CSTRING(playersandai); value = 2; };
};
};
class maxReviveTime {
displayName = CSTRING(ReviveSettings_maxReviveTime_DisplayName);
description = CSTRING(ReviveSettings_maxReviveTime_Description);
typeName = "NUMBER";
defaultValue = 120;
};
class amountOfReviveLives {
displayName = CSTRING(ReviveSettings_amountOfReviveLives_DisplayName);
description = CSTRING(ReviveSettings_amountOfReviveLives_Description);
typeName = "NUMBER";
defaultValue = -1;
};
};
class ModuleDescription {
description = CSTRING(ReviveSettings_Module_Description);
sync[] = {};
};
};
class ACE_moduleAssignMedicRoles: Module_F {
scope = 2;
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAssignMedicRoles);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class EnableList {
displayName = CSTRING(AssignMedicRoles_EnableList_DisplayName);
description = CSTRING(AssignMedicRoles_EnableList_Description);
defaultValue = "";
typeName = "STRING";
};
class role {
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
description = CSTRING(AssignMedicRoles_role_Description);
typeName = "NUMBER";
class values {
class none {
name = CSTRING(AssignMedicRoles_role_none);
value = 0;
};
class medic {
name = CSTRING(AssignMedicRoles_role_medic);
value = 1;
default = 1;
};
class doctor {
name = CSTRING(AssignMedicRoles_role_doctor);
value = 2;
};
};
};
};
class ModuleDescription {
description = CSTRING(AssignMedicRoles_Module_Description);
sync[] = {};
};
};
class ACE_moduleAssignMedicVehicle: Module_F {
scope = 2;
displayName = CSTRING(AssignMedicVehicle_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAssignMedicalVehicle);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class EnableList {
displayName = CSTRING(AssignMedicVehicle_EnableList_DisplayName);
description = CSTRING(AssignMedicVehicle_EnableList_Description);
defaultValue = "";
typeName = "STRING";
};
class enabled {
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
description = CSTRING(AssignMedicVehicle_enabled_Description);
typeName = "NUMBER";
class values {
class none {
name = ECSTRING(common,No);
value = 0;
};
class medic {
name = ECSTRING(common,Yes);
value = 1;
default = 1;
};
};
};
};
class ModuleDescription {
description = CSTRING(AssignMedicVehicle_Module_Description);
sync[] = {};
};
};
class ACE_moduleAssignMedicalFacility: Module_F {
scope = 2;
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa);
category = "ACE_medical";
function = QFUNC(moduleAssignMedicalFacility);
functionPriority = 10;
isGlobal = 2;
isTriggerActivated = 0;
isDisposable = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class enabled {
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
description = CSTRING(AssignMedicalFacility_enabled_Description);
typeName = "BOOL";
};
};
class ModuleDescription {
description = CSTRING(AssignMedicalFacility_Module_Description);
sync[] = {};
};
};
#define ARM_LEG_ARMOR_DEFAULT 1
#define ARM_LEG_ARMOR_BETTER 1
#define ARM_LEG_ARMOR_CSAT 1
#define ADD_ACE_HITPOINTS(ARM_ARMOR,LEG_ARMOR) \
class HitLeftArm { \
armor = ARM_ARMOR; \
material = -1; \
name = "hand_l"; \
passThrough = 1; \
radius = 0.08; \
explosionShielding = 1; \
visual = "injury_hands"; \
minimalHit = 0.01; \
}; \
class HitRightArm: HitLeftArm { \
name = "hand_r"; \
}; \
class HitLeftLeg { \
armor = LEG_ARMOR; \
material = -1; \
name = "leg_l"; \
passThrough = 1; \
radius = 0.1; \
explosionShielding = 1; \
visual = "injury_legs"; \
minimalHit = 0.01; \
}; \
class HitRightLeg: HitLeftLeg { \
name = "leg_r"; \
};
class Man;
class CAManBase: Man {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_DEFAULT,ARM_LEG_ARMOR_DEFAULT)
};
};
class SoldierWB: CAManBase {};
class SoldierEB: CAManBase {};
class SoldierGB: CAManBase {};
class B_Soldier_base_F: SoldierWB {};
class B_Soldier_04_f: B_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class B_Soldier_05_f: B_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class I_Soldier_base_F: SoldierGB {};
class I_Soldier_03_F: I_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class I_Soldier_04_F: I_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_BETTER,ARM_LEG_ARMOR_BETTER)
};
};
class O_Soldier_base_F: SoldierEB {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
class O_Soldier_diver_base_F: O_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
class O_Soldier_02_F: O_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
class O_officer_F: O_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(ARM_LEG_ARMOR_CSAT,ARM_LEG_ARMOR_BETTER)
};
};
//These VR guys already have limb hitpoints that we should be able to use
//Note: the selections are a little weird, eg: class leg_l {name = "leg_l";};
// class B_Soldier_VR_F: B_Soldier_base_F { {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class O_Soldier_VR_F: O_Soldier_base_F { {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class I_Soldier_VR_F: I_Soldier_base_F { {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class C_Soldier_VR_F: C_man_1 {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
// class O_Protagonist_VR_F: O_Soldier_base_F {
// class HitPoints {
//Has class hand_l, hand_r, leg_l, leg_r Hitpoints already
// };
// };
class MapBoard_altis_F;
class ACE_bodyBagObject: MapBoard_altis_F {
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
scope = 1;
scopeCurator = 2;
side = -1;
model = QPATHTOEF(apl,bodybag.p3d);
icon = "";
displayName = CSTRING(Bodybag_Display);
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition)[] = {0,1.2,0};
EGVAR(dragging,dragDirection) = 0;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;
class ACE_Actions {
class ACE_MainActions {
displayName = ECSTRING(interaction,MainAction);
distance = 5;
condition = QUOTE(true);
statement = "";
icon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
selection = "";
};
};
};
// Medical litter classes
class Thing;
class ACE_MedicalLitterBase: Thing {
scope = 1;
scopeCurator = 0;
displayName = " ";
destrType = "DestructNo";
model = QPATHTOF(data\littergeneric.p3d);
};
class ACE_MedicalLitter_clean: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_clean.p3d);
};
class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages1.p3d);
};
class ACE_MedicalLitter_bandage2: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages2.p3d);
};
class ACE_MedicalLitter_bandage3: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_bandages3.p3d);
};
class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_packingBandage.p3d);
};
class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_gloves.p3d);
};
class ACE_MedicalLitter_adenosine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_adenosine.p3d);
};
class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_atropine.p3d);
};
class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_epinephrine.p3d);
};
class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_morphine.p3d);
};
class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase {
model = QPATHTOF(data\littergeneric_Quikclot.p3d);
};
class Item_Base_F;
class ACE_fieldDressingItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bandage_Basic_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,1);
};
};
class ACE_packingBandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Packing_Bandage_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_packingBandage,1);
};
};
class ACE_elasticBandageItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bandage_Elastic_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_elasticBandage,1);
};
};
class ACE_tourniquetItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Tourniquet_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_tourniquet,1);
};
};
class ACE_morphineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Morphine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_morphine,1);
};
};
class ACE_adenosineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Adenosine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_adenosine,1);
};
};
class ACE_atropineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Atropine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_atropine,1);
};
};
class ACE_epinephrineItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Epinephrine_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_epinephrine,1);
};
};
class ACE_plasmaIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Plasma_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_plasmaIV,1);
};
};
class ACE_bloodIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Blood_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_bloodIV,1);
};
};
class ACE_salineIVItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Saline_IV);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_salineIV,1);
};
};
class ACE_quikClotItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(QuikClot_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_quikclot,1);
};
};
class ACE_personalAidKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Aid_Kit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_personalAidKit,1);
};
};
class ACE_surgicalKitItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(SurgicalKit_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_surgicalKit,1);
};
};
class ACE_bodyBagItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
displayName = CSTRING(Bodybag_Display);
author = ECSTRING(common,ACETeam);
vehicleClass = "Items";
class TransportItems {
MACRO_ADDITEM(ACE_bodyBag,1);
};
};
class NATO_Box_Base;
class ACE_medicalSupplyCrate: NATO_Box_Base {
scope = 2;
scopeCurator = 2;
accuracy = 1000;
displayName = CSTRING(medicalSupplyCrate);
model = QPATHTOF(data\ace_medcrate.p3d);
author = ECSTRING(common,ACETeam);
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,50);
MACRO_ADDITEM(ACE_morphine,25);
MACRO_ADDITEM(ACE_epinephrine,25);
MACRO_ADDITEM(ACE_bloodIV,15);
MACRO_ADDITEM(ACE_bloodIV_500,15);
MACRO_ADDITEM(ACE_bloodIV_250,15);
MACRO_ADDITEM(ACE_bodyBag,10);
};
};
class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate {
displayName = CSTRING(medicalSupplyCrate_advanced);
class TransportItems {
MACRO_ADDITEM(ACE_fieldDressing,25);
MACRO_ADDITEM(ACE_packingBandage,25);
MACRO_ADDITEM(ACE_elasticBandage,25);
MACRO_ADDITEM(ACE_tourniquet,15);
MACRO_ADDITEM(ACE_morphine,15);
MACRO_ADDITEM(ACE_adenosine,15);
MACRO_ADDITEM(ACE_atropine,15);
MACRO_ADDITEM(ACE_epinephrine,15);
MACRO_ADDITEM(ACE_plasmaIV,7);
MACRO_ADDITEM(ACE_plasmaIV_500,7);
MACRO_ADDITEM(ACE_plasmaIV_250,7);
MACRO_ADDITEM(ACE_salineIV,7);
MACRO_ADDITEM(ACE_salineIV_500,7);
MACRO_ADDITEM(ACE_salineIV_250,7);
MACRO_ADDITEM(ACE_bloodIV,7);
MACRO_ADDITEM(ACE_bloodIV_500,7);
MACRO_ADDITEM(ACE_bloodIV_250,7);
MACRO_ADDITEM(ACE_quikClot,20);
MACRO_ADDITEM(ACE_personalAidKit,3);
MACRO_ADDITEM(ACE_surgicalKit,2);
MACRO_ADDITEM(ACE_bodyBag,5);
};
};
};

View File

@ -1,242 +0,0 @@
class CfgWeapons {
class ItemCore;
class InventoryItem_Base_F;
class InventoryFirstAidKitItem_Base_F;
class MedikitItem;
// ITEMS
class FirstAidKit: ItemCore {
type = 0;
class ItemInfo: InventoryFirstAidKitItem_Base_F {
mass = 4;
};
};
class Medikit: ItemCore {
type = 0;
class ItemInfo: MedikitItem {
mass = 60;
};
};
class ACE_ItemCore;
class ACE_fieldDressing: ACE_ItemCore {
scope = 2;
model = QPATHTOF(data\bandage.p3d);
picture = QPATHTOF(ui\items\fieldDressing_x_ca.paa);
displayName = CSTRING(Bandage_Basic_Display);
descriptionShort = CSTRING(Bandage_Basic_Desc_Short);
descriptionUse = CSTRING(Bandage_Basic_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_packingBandage: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Packing_Bandage_Display);
picture = QPATHTOF(ui\items\packingBandage_x_ca.paa);
model = QPATHTOF(data\packingbandage.p3d);
descriptionShort = CSTRING(Packing_Bandage_Desc_Short);
descriptionUse = CSTRING(Packing_Bandage_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_elasticBandage: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Bandage_Elastic_Display);
picture = QPATHTOF(ui\items\elasticBandage_x_ca.paa);
model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d";
descriptionShort = CSTRING(Bandage_Elastic_Desc_Short);
descriptionUse = CSTRING(Bandage_Elastic_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_tourniquet: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Tourniquet_Display);
picture = QPATHTOF(ui\items\tourniquet_x_ca.paa);
model = QPATHTOF(data\tourniquet.p3d);
descriptionShort = CSTRING(Tourniquet_Desc_Short);
descriptionUse = CSTRING(Tourniquet_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_morphine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Morphine_Display);
picture = QPATHTOF(ui\items\morphine_x_ca.paa);
model = QPATHTOF(data\morphine.p3d);
descriptionShort = CSTRING(Morphine_Desc_Short);
descriptionUse = CSTRING(Morphine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_adenosine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Adenosine_Display);
picture = QPATHTOF(ui\items\adenosine_x_ca.paa);
model = QPATHTOF(data\adenosine.p3d);
descriptionShort = CSTRING(adenosine_Desc_Short);
descriptionUse = CSTRING(adenosine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_atropine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Atropine_Display);
picture = QPATHTOF(ui\items\atropine_x_ca.paa);
model = QPATHTOF(data\atropine.p3d);
descriptionShort = CSTRING(Atropine_Desc_Short);
descriptionUse = CSTRING(Atropine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_epinephrine: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Epinephrine_Display);
picture = QPATHTOF(ui\items\epinephrine_x_ca.paa);
model = QPATHTOF(data\epinephrine.p3d);
descriptionShort = CSTRING(Epinephrine_Desc_Short);
descriptionUse = CSTRING(Epinephrine_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_plasmaIV: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Plasma_IV);
model = QPATHTOF(data\IVBag_1000ml.p3d);
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_1000ml_ca.paa) };
picture = QPATHTOF(ui\items\plasmaIV_x_ca.paa);
descriptionShort = CSTRING(Plasma_IV_Desc_Short);
descriptionUse = CSTRING(Plasma_IV_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 10;
};
};
class ACE_plasmaIV_500: ACE_plasmaIV {
displayName = CSTRING(Plasma_IV_500);
model = QPATHTOF(data\IVBag_500ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_500ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 5;
};
};
class ACE_plasmaIV_250: ACE_plasmaIV {
displayName = CSTRING(Plasma_IV_250);
model = QPATHTOF(data\IVBag_250ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_250ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
};
};
class ACE_bloodIV: ACE_ItemCore {
scope = 2;
model = QPATHTOF(data\IVBag_1000ml.p3d);
displayName = CSTRING(Blood_IV);
picture = QPATHTOF(ui\items\bloodIV_x_ca.paa);
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_1000ml_ca.paa) };
descriptionShort = CSTRING(Blood_IV_Desc_Short);
descriptionUse = CSTRING(Blood_IV_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 10;
};
};
class ACE_bloodIV_500: ACE_bloodIV {
displayName = CSTRING(Blood_IV_500);
model = QPATHTOF(data\IVBag_500ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_500ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 5;
};
};
class ACE_bloodIV_250: ACE_bloodIV {
displayName = CSTRING(Blood_IV_250);
model = QPATHTOF(data\IVBag_250ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_250ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
};
};
class ACE_salineIV: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Saline_IV);
model = QPATHTOF(data\IVBag_1000ml.p3d);
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_1000ml_ca.paa) };
picture = QPATHTOF(ui\items\salineIV_x_ca.paa);
descriptionShort = CSTRING(Saline_IV_Desc_Short);
descriptionUse = CSTRING(Saline_IV_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 10;
};
};
class ACE_salineIV_500: ACE_salineIV {
displayName = CSTRING(Saline_IV_500);
model = QPATHTOF(data\IVBag_500ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_500ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 5;
};
};
class ACE_salineIV_250: ACE_salineIV {
displayName = CSTRING(Saline_IV_250);
model = QPATHTOF(data\IVBag_250ml.p3d);
hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_250ml_ca.paa) };
class ItemInfo: InventoryItem_Base_F {
mass = 2.5;
};
};
class ACE_quikclot: ACE_ItemCore {
scope = 2;
displayName = CSTRING(QuikClot_Display);
model = QPATHTOF(data\QuikClot.p3d);
picture = QPATHTOF(ui\items\quickclot_x_ca.paa);
descriptionShort = CSTRING(QuikClot_Desc_Short);
descriptionUse = CSTRING(QuikClot_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
class ACE_personalAidKit: ACE_ItemCore {
scope = 2;
displayName = CSTRING(Aid_Kit_Display);
picture = QPATHTOF(ui\items\personal_aid_kit_x_ca.paa);
descriptionShort = CSTRING(Aid_Kit_Desc_Short);
descriptionUse = CSTRING(Aid_Kit_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 10;
};
};
class ACE_surgicalKit: ACE_ItemCore {
scope=2;
displayName= CSTRING(SurgicalKit_Display);
model = QPATHTOF(data\surgical_kit.p3d);
picture = QPATHTOF(ui\items\surgicalKit_x_ca.paa);
descriptionShort = CSTRING(SurgicalKit_Desc_Short);
descriptionUse = CSTRING(SurgicalKit_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 15;
};
};
class ACE_bodyBag: ACE_ItemCore {
scope=2;
displayName= CSTRING(Bodybag_Display);
model = QPATHTOF(data\bodybagItem.p3d);
picture = QPATHTOF(ui\items\bodybag_x_ca.paa);
descriptionShort = CSTRING(Bodybag_Desc_Short);
descriptionUse = CSTRING(Bodybag_Desc_Use);
class ItemInfo: InventoryItem_Base_F {
mass = 7;
};
};
};

View File

@ -1,12 +0,0 @@
ace_medical
===============
Provides a basic and advanced medical system.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [Glowbal](https://github.com/Glowbal)
- [KoffeinFlummi](https://github.com/KoffeinFlummi)

View File

@ -1,79 +1,20 @@
PREP(addDamageToUnit);
PREP(addHeartRateAdjustment); PREP(addStateHandler);
PREP(addToInjuredCollection);
PREP(addUnconsciousCondition);
PREP(addUnloadPatientActions);
PREP(addVitalLoop);
PREP(adjustPainLevel); PREP(adjustPainLevel);
PREP(bodyCleanupLoop);
PREP(canAccessMedicalEquipment);
PREP(canTreat);
PREP(canTreatCached);
PREP(determineIfFatal);
PREP(getBloodLoss); PREP(getBloodLoss);
PREP(getBloodPressure); PREP(getBloodPressure);
PREP(getBloodVolumeChange); PREP(getBloodVolumeChange);
PREP(getCardiacOutput); PREP(getCardiacOutput);
PREP(getTypeOfDamage);
PREP(getHeartRateChange); PREP(getHeartRateChange);
PREP(getTriageStatus);
PREP(getUnconsciousCondition);
PREP(handleDamage);
PREP(handleDamage_advanced);
PREP(handleDamage_advancedSetDamage);
PREP(handleDamage_airway);
PREP(handleDamage_caching);
PREP(handleDamage_fractures);
PREP(handleDamage_internalInjuries);
PREP(handleDamage_wounds);
PREP(handleDamage_woundsOld);
PREP(handleUnitVitals);
PREP(handleKilled);
PREP(handleLocal);
PREP(handleBandageOpening);
PREP(hasMedicalEnabled);
PREP(hasTourniquetAppliedTo); PREP(hasTourniquetAppliedTo);
PREP(init); PREP(init);
PREP(isBeingCarried); PREP(install);
PREP(isBeingDragged);
PREP(isInMedicalFacility); PREP(isInMedicalFacility);
PREP(isInMedicalVehicle); PREP(isInMedicalVehicle);
PREP(isInStableCondition);
PREP(isMedic); PREP(isMedic);
PREP(isMedicalVehicle); PREP(isMedicalVehicle);
PREP(isInStableCondition);
PREP(itemCheck);
PREP(medicationEffectLoop);
PREP(modifyMedicalAction);
PREP(parseConfigForInjuries); PREP(parseConfigForInjuries);
PREP(playInjuredSound);
PREP(reviveStateLoop);
PREP(selectionNameToNumber); PREP(selectionNameToNumber);
PREP(serverRemoveBody);
PREP(setCardiacArrest);
PREP(setDead);
PREP(setHitPointDamage); PREP(setHitPointDamage);
PREP(setStructuralDamage); PREP(setStructuralDamage);
PREP(setUnconscious);
PREP(showBloodEffect);
PREP(translateSelections);
PREP(treatment);
PREP(treatment_failure);
PREP(treatment_success);
PREP(vitalLoop);
PREP(displayPatientInformation);
PREP(displayTriageCard);
PREP(dropDownTriageCard);
PREP(moduleMedicalSettings);
PREP(moduleBasicMedicalSettings);
PREP(moduleAdvancedMedicalSettings);
PREP(moduleReviveSettings);
PREP(moduleAssignMedicRoles);
PREP(moduleAssignMedicalVehicle);
PREP(moduleAssignMedicalFacility);
PREP(copyDeadBody);
PREP(unconsciousPFH);
// Networked litter
PREP(createLitter);
PREP(handleCreateLitter);
PREP(litterCleanupLoop);

View File

@ -1,280 +0,0 @@
// ACE Medical System Visual Loop
#include "script_component.hpp"
GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"];
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
["ace_interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call CBA_fnc_addEventHandler;
//Treatment EventHandlers:
[QGVAR(addVitalLoop), DFUNC(addVitalLoop)] call CBA_fnc_addEventHandler;
[QGVAR(setDead), DFUNC(setDead)] call CBA_fnc_addEventHandler;
[QGVAR(setHitPointDamage), DFUNC(setHitPointDamage)] call CBA_fnc_addEventHandler;
[QGVAR(setUnconscious), DFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
["ace_unconscious", {
params ["_unit", "_status"];
if (local _unit) then {
if (_status) then {
_unit setVariable ["tf_voiceVolume", 0, true];
_unit setVariable ["tf_unable_to_use_radio", true, true];
_unit setVariable ["acre_sys_core_isDisabled", true, true];
} else {
_unit setVariable ["tf_voiceVolume", 1, true];
_unit setVariable ["tf_unable_to_use_radio", false, true];
_unit setVariable ["acre_sys_core_isDisabled", false, true];
};
};
}] call CBA_fnc_addEventHandler;
// Initialize all effects
if (hasInterface) then {
_fnc_createEffect = {
private "_effect";
params ["_type", "_layer", "_default"];
_effect = ppEffectCreate [_type, _layer];
_effect ppEffectForceInNVG true;
_effect ppEffectAdjust _default;
_effect ppEffectCommit 0;
_effect
};
GVAR(effectUnconsciousCC) = [
"ColorCorrections",
4201,
[1,1,0, [0,0,0,1], [0,0,0,0], [1,1,1,1], [0.4,0.4,0,0,0,0.1,0.3]]
] call _fnc_createEffect;
GVAR(effectUnconsciousRB) = [
"RadialBlur",
4202,
[0.01,0.01,0,0]
] call _fnc_createEffect;
GVAR(effectBlindingCC) = [
"ColorCorrections",
4203,
[1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]]
] call _fnc_createEffect;
GVAR(effectBloodVolumeCC) = [
"ColorCorrections",
4204,
[1,1,0, [0,0,0,0], [1,1,1,1], [0.2,0.2,0.2,0]]
] call _fnc_createEffect;
GVAR(effectPainCA) = [
"chromAberration",
4205,
[0, 0, false]
] call _fnc_createEffect;
GVAR(effectPainCC) = [
"ColorCorrections",
4206,
[1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1.3,1.3,0,0,0,0.2,2]]
] call _fnc_createEffect;
// Initialize Other Variables
GVAR(effectBlind) = false;
GVAR(effectTimeBlood) = CBA_missionTime;
// MAIN EFFECTS LOOP
[{
private["_bleeding", "_blood"];
// Zeus interface is open or player is dead; disable everything
if (!(isNull curatorCamera) or !(alive ACE_player)) exitWith {
GVAR(effectUnconsciousCC) ppEffectEnable false;
GVAR(effectUnconsciousRB) ppEffectEnable false;
GVAR(effectBlindingCC) ppEffectEnable false;
GVAR(effectBloodVolumeCC) ppEffectEnable false;
GVAR(effectPainCA) ppEffectEnable false;
GVAR(effectPainCC) ppEffectEnable false;
["unconscious", false] call EFUNC(common,setDisableUserInputStatus);
};
// Unconsciousness effect
if (ACE_player getVariable ["ACE_isUnconscious", false]) then {
GVAR(effectUnconsciousCC) ppEffectEnable true;
GVAR(effectUnconsciousRB) ppEffectEnable true;
GVAR(effectBlind) = true;
["unconscious", true] call EFUNC(common,setDisableUserInputStatus);
} else {
GVAR(effectUnconsciousCC) ppEffectEnable false;
GVAR(effectUnconsciousRB) ppEffectEnable false;
["unconscious", false] call EFUNC(common,setDisableUserInputStatus);
if (GVAR(effectBlind)) then {
_strength = 0.78 * (call EFUNC(common,ambientBrightness));
GVAR(effectBlindingCC) ppEffectEnable true;
GVAR(effectBlindingCC) ppEffectAdjust [1,1,_strength, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
GVAR(effectBlindingCC) ppEffectCommit 0;
[{
GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]];
GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2);
}, [_strength], 0.01, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectBlindingCC) ppEffectEnable false;
}, [], (_strength * 2) + 0.5, 0] call CBA_fnc_waitAndExecute;
GVAR(effectBlind) = false;
};
};
_bleeding = [ACE_player] call FUNC(getBloodLoss);
// Bleeding Indicator
if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < CBA_missionTime) then {
GVAR(effectTimeBlood) = CBA_missionTime;
[600 * _bleeding] call FUNC(showBloodEffect);
};
// Blood Volume Effect
_blood = if (GVAR(level) < 2) then {
(ACE_player getVariable [QGVAR(bloodVolume), 100]) / 100;
} else {
(((ACE_player getVariable [QGVAR(bloodVolume), 100]) - 60) max 0) / 40;
};
if (_blood > 0.99) then {
GVAR(effectBloodVolumeCC) ppEffectEnable false;
} else {
GVAR(effectBloodVolumeCC) ppEffectEnable true;
GVAR(effectBloodVolumeCC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,_blood], [0.2,0.2,0.2,0]];
GVAR(effectBloodVolumeCC) ppEffectCommit 0;
};
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
GVAR(lastHeartBeat) = CBA_missionTime;
GVAR(lastHeartBeatSound) = CBA_missionTime;
// HEARTRATE BASED EFFECTS
[{
private["_heartRate", "_interval", "_minTime", "_sound", "_strength", "_pain"];
_heartRate = ACE_player getVariable [QGVAR(heartRate), 70];
_pain = ACE_player getVariable [QGVAR(pain), 0];
if (GVAR(level) == 1) then {
_heartRate = 60 + 40 * _pain;
};
if (_heartRate <= 0) exitWith {};
_interval = 60 / (_heartRate min 40);
if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCA) ppEffectEnable false;
} else {
GVAR(effectPainCC) ppEffectEnable false;
};
} else {
if ((CBA_missionTime > GVAR(lastHeartBeat) + _interval)) then {
GVAR(lastHeartBeat) = CBA_missionTime;
// Pain effect, no pain effect in zeus camera
if (isNull curatorCamera) then {
_strength = ((_pain - (ACE_player getVariable [QGVAR(painSuppress), 0])) max 0) min 1;
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCC) ppEffectEnable false;
if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
_strength = _strength * 0.15;
GVAR(effectPainCA) ppEffectEnable true;
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
GVAR(effectPainCA) ppEffectCommit 0.01;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit 0.01;
}, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
GVAR(effectPainCA) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
} else {
GVAR(effectPainCA) ppEffectEnable false;
};
} else {
GVAR(effectPainCA) ppEffectEnable false;
if (_pain > (ACE_player getVariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
_strength = _strength * 0.9;
GVAR(effectPainCC) ppEffectEnable true;
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit 0.01;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit 0.01;
}, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute;
[{
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
GVAR(effectPainCC) ppEffectCommit (_this select 1);
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute;
} else {
GVAR(effectPainCC) ppEffectEnable false;
};
};
};
};
};
if (GVAR(level) >= 2 && {_heartRate > 0}) then {
_minTime = 60 / _heartRate;
if (CBA_missionTime - GVAR(lastHeartBeatSound) > _minTime) then {
GVAR(lastHeartBeatSound) = CBA_missionTime;
// Heart rate sound effect
if (_heartRate < 60) then {
_sound = GVAR(heartBeatSounds_Normal) select (random((count GVAR(heartBeatSounds_Normal)) -1));
playSound _sound;
} else {
if (_heartRate > 150) then {
playSound "ACE_heartbeat_fast_2";
};
};
};
};
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
["ace_settingsInitialized", {
// Networked litter (need to wait for GVAR(litterCleanUpDelay) to be set)
[QGVAR(createLitter), FUNC(handleCreateLitter), GVAR(litterCleanUpDelay)] call EFUNC(common,addSyncedEventHandler);
[
{(((_this select 0) getVariable [QGVAR(bloodVolume), 100]) < 65)},
{(((_this select 0) getVariable [QGVAR(pain), 0]) - ((_this select 0) getVariable [QGVAR(painSuppress), 0])) > 0.9},
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
{((_this select 0) getVariable [QGVAR(inReviveState), false])},
{((_this select 0) getVariable [QGVAR(inCardiacArrest), false])},
{((_this select 0) getVariable ["ACE_isDead", false])}
] call FUNC(addUnconsciousCondition);
}] call CBA_fnc_addEventHandler;
// Prevent all types of interaction while unconscious
// @todo: probably remove this when CBA keybind hold key works properly
["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition);
// Item Event Handler
["loadout", FUNC(itemCheck)] call CBA_fnc_addPlayerEventHandler;
if (hasInterface) then {
["ace_playerJIP", {
ACE_LOGINFO("JIP Medical init for player.");
[player] call FUNC(init);
}] call CBA_fnc_addEventHandler;
};

View File

@ -4,23 +4,11 @@ ADDON = false;
#include "XEH_PREP.hpp" #include "XEH_PREP.hpp"
GVAR(injuredUnitCollection) = [];
GVAR(IVBags) = [];
private _versionEx = "ace_medical" callExtension "version";
DFUNC(handleDamage_assignWounds) = if (_versionEx == "") then {
ACE_LOGINFO_1("Extension %1.dll not installed.","ace_medical");
DFUNC(handleDamage_woundsOld)
} else {
ACE_LOGINFO_2("Extension version: %1: %2","ace_medical",_versionEx);
DFUNC(handleDamage_wounds)
};
call FUNC(parseConfigForInjuries);
GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"]; GVAR(HITPOINTS) = ["HitHead", "HitBody", "HitLeftArm", "HitRightArm", "HitLeftLeg", "HitRightLeg"];
GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; GVAR(SELECTIONS) = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"];
call FUNC(parseConfigForInjuries);
//Hack for #3168 (units in static weapons do not take any damage): //Hack for #3168 (units in static weapons do not take any damage):
//doing a manual pre-load with a small distance seems to fix the LOD problems with handle damage not returning full results //doing a manual pre-load with a small distance seems to fix the LOD problems with handle damage not returning full results
GVAR(fixedStatics) = []; GVAR(fixedStatics) = [];
@ -51,5 +39,4 @@ addMissionEventHandler ["Loaded",{
} forEach GVAR(fixedStatics); } forEach GVAR(fixedStatics);
}]; }];
ADDON = true; ADDON = true;

View File

@ -1,17 +0,0 @@
#include "script_component.hpp"
params ["_unit"];
// reset all variables. @todo GROUP respawn?
[_unit] call FUNC(init);
// Reset captive status for respawning unit
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
[_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
};
// Remove maximum unconsciousness time handler
_maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1];
if (_maxUnconHandle > 0) then {
[_maxUnconHandle] call CBA_fnc_removePerFrameHandler;
};

View File

@ -3,37 +3,16 @@
class CfgPatches { class CfgPatches {
class ADDON { class ADDON {
name = COMPONENT_NAME; name = COMPONENT_NAME;
units[] = {"ACE_medicalSupplyCrate", "ACE_medicalSupplyCrate_advanced", "ACE_fieldDressingItem", "ACE_packingBandageItem", "ACE_elasticBandageItem", "ACE_tourniquetItem", "ACE_morphineItem", "ACE_atropineItem", "ACE_epinephrineItem", "ACE_plasmaIVItem", "ACE_bloodIVItem", "ACE_salineIVItem", "ACE_quikclotItem", "ACE_personalAidKitItem", "ACE_surgicalKitItem", "ACE_bodyBagItem", "ACE_bodyBagObject"}; units[] = {};
weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"}; weapons[] = {};
requiredVersion = REQUIRED_VERSION; requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction", "ace_apl"}; requiredAddons[] = {"ace_common"};
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
authors[] = {"Glowbal", "KoffeinFlummi"}; authors[] = {""};
url = ECSTRING(main,URL); url = ECSTRING(main,URL);
VERSION_CONFIG; VERSION_CONFIG;
}; };
}; };
#include "CfgActions.hpp"
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
#include "CfgFactionClasses.hpp" #include "injuries.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgSounds.hpp"
#include "CfgEden.hpp"
#include "ACE_Medical_Treatments.hpp"
#include "ACE_Settings.hpp"
#include "UI\CfgInGameUI.hpp"
#include "UI\RscTitles.hpp"
#include "UI\triagecard.hpp"
class ACE_newEvents {
medical_onUnconscious = "ace_unconscious";
medical_onSetDead = "ace_killed";
Medical_onEnteredCardiacArrest = "ace_cardiacArrestEntered";
Medical_onHeartRateAdjustmentAdded = "ace_heartRateAdjustmentAdded";
setUnconscious = QGVAR(setUnconscious);
setHitPointDamage = QGVAR(setHitPointDamage);
setDead = QGVAR(setDead);
addVitalLoop = QGVAR(addVitalLoop);
};

View File

@ -1,99 +0,0 @@
#define _ARMA_
class StageTI
{
texture = "a3\data_f\default_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,0};
specular[] = {0.3,0.3,0.3,0.3};
specularPower = 150;
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1
{
texture = "z\ace\addons\medical\data\IVBag_nohq.paa";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage2
{
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage3
{
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage4
{
texture = "#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage5
{
texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage6
{
texture = "#(ai,64,64,1)fresnelGlass(2)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage7
{
useWorldEnvMap = "true";
texture = "a3\data_f\env_land_ca.paa";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,82 +0,0 @@
class StageTI
{
texture="a3\data_f\default_ti_ca.paa";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.050000008,0.050000008,0.050000008,1};
specularPower=50;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="z\ace\addons\medical\data\quikclot_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[]={0,9,0};
up[]={4.5,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0)";
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(1,1,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,64,64,1)fresnel(1.5,1.22)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_land_co.paa";
uvSource="none";
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,32 +0,0 @@
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\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\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};
};
};

Binary file not shown.

View File

@ -1,32 +0,0 @@
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.20000001,0.20000001,0.20000001,0};
specularPower=350.799999;
PixelShaderID="NormalMapSpecularDIMap";
VertexShaderID="NormalMap";
class Stage1
{
texture="z\ace\addons\medical\data\littergeneric_gloves_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};
class Stage2
{
texture= "#(argb,8,8,3)color(0.1,0.1,0.1,0,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,0};
};
};

View File

@ -1,31 +0,0 @@
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,0,0,0};
PixelShaderID="NormalMapSpecularDIMap";
VertexShaderID="NormalMap";
class Stage1
{
texture="z\ace\addons\medical\data\littergeneric_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= "#(argb,8,8,3)color(0,0,0,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={0,0,0};
up[]={0,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

Binary file not shown.

View File

@ -1,24 +0,0 @@
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
};
class CfgModels {
class Default {
sectionsInherit="";
sections[] = {""};
skeletonName = "";
};
class IVBagBase: Default {
sectionsInherit = "";
sections[] = {"camo"};
skeletonName = "";
};
class IVBag_250ml: IVBagBase {};
class IVBag_500ml: IVBagBase {};
class IVBag_1000ml: IVBagBase {};
};

Binary file not shown.

View File

@ -1,32 +0,0 @@
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,0};
specular[]={0,0,0,0};
specularPower=0;
PixelShaderID="NormalMapSpecularDIMap";
VertexShaderID="NormalMap";
class Stage1
{
texture="z\ace\addons\medical\data\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= "#(argb,8,8,3)color(0,0,0,1,SMDI)";
uvSource="tex";
class uvTransform
{
aside[]={0,0,0};
up[]={0,0,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

Binary file not shown.

View File

@ -1,92 +0,0 @@
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\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\apl\data\env_co.tga";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};

View File

@ -1,22 +0,0 @@
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";
};

Binary file not shown.

View File

@ -1,63 +0,0 @@
/*
* Author: PabstMirror
* Manually Apply Damage to a unit (can cause lethal damage)
* NOTE: because of caching, this will not have instant effects (~3 frame delay)
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Damage to Add <NUMBER>
* 2: Selection ("head", "body", "hand_l", "hand_r", "leg_l", "leg_r") <STRING>
* 3: Projectile Type <STRING>
*
* Return Value:
* HandleDamage's return <NUMBER>
*
* Example:
* [player, 0.8, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit
* [cursorTarget, 1, "body", "stab"] call ace_medical_fnc_addDamageToUnit
*
* Public: Yes
*/
// #define DEBUG_MODE_FULL
// #define DEBUG_TESTRESULTS
#include "script_component.hpp"
params [["_unit", objNull, [objNull]], ["_damageToAdd", -1, [0]], ["_selection", "", [""]], ["_typeOfDamage", "", [""]]];
TRACE_4("params",_unit,_damageToAdd,_selection,_typeOfDamage);
_selection = toLower _selection;
if ((isNull _unit) || {!local _unit} || {!alive _unit}) exitWith {ACE_LOGERROR_1("addDamageToUnit - badUnit %1", _this); -1};
if (_damageToAdd < 0) exitWith {ACE_LOGERROR_1("addDamageToUnit - bad damage %1", _this); -1};
if (!(_selection in GVAR(SELECTIONS))) exitWith {ACE_LOGERROR_1("addDamageToUnit - bad selection %1", _this); -1};
//Get the hitpoint and the index
private _hitpoint = [_unit, _selection, true] call ace_medical_fnc_translateSelections;
(getAllHitPointsDamage _unit) params [["_allHitPoints", []]];
private _hitpointIndex = -1;
{ //case insensitive find
if (_x == _hitpoint) exitWith {_hitpointIndex = _forEachIndex;};
} forEach _allHitPoints;
if (_hitpointIndex < 0) exitWith {ACE_LOGERROR_1("addDamageToUnit - bad hitpointIndex %1", _this); -1};
private _currentDamage = _unit getHitIndex _hitpointIndex;
#ifdef DEBUG_TESTRESULTS
private _checkAtFrame = diag_frameno + 5;
private _partNumber = [_selection] call FUNC(selectionNameToNumber);
private _startDmg = (_unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _partNumber;
private _debugCode = {
params ["", "_unit", "_startDmg", "_damageToAdd", "_partNumber"];
private _endDmg = (_unit getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _partNumber;
if ((!alive _unit) || {_endDmg > _startDmg}) then {
ACE_LOGINFO_6("addDamageToUnit - PASSED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg);
} else {
ACE_LOGERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg);
};
};
[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call CBA_fnc_waitUntilAndExecute;
#endif
private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage);
TRACE_1("handleDamage called",_return);
_return

View File

@ -1,25 +0,0 @@
/*
* Author: Glowbal, KoffeinFlummi
* Increase the Heart Rate of a local unit by given number within given amount of seconds.
*
* Arguments:
* 0: The unit <OBJECT>
* 1: value <NUMBER>
* 2: time in seconds <NUMBER>
* 3: callback <CODE>
*
* Return Value:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
private _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
_adjustment pushBack [_value, _time, _callBack];
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment];
["ace_heartRateAdjustmentAdded", [_unit, _value, _time]] call CBA_fnc_localEvent;

View File

@ -0,0 +1,4 @@
params ["_unit"];
// TODO check if this unit is being monitored by the state machine

View File

@ -1,17 +0,0 @@
/*
* Author: Glowbal
* Enabled the vitals loop for a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* ReturnValue:
* None
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_medical_fnc_addToInjuredCollection","3.7.0","ace_medical_fnc_addVitalLoop");
_this call FUNC(addVitalLoop);

View File

@ -1,24 +0,0 @@
/*
* Author: Glowbal
* Adds new condition for the unconscious state. Conditions are not actively checked for units unless unit is in unconscious state.
*
* Arguments:
* 0-N: Code, should return a boolean <CODE>
*
* ReturnValue:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
if (isnil QGVAR(unconsciousConditions)) then {
GVAR(unconsciousConditions) = [];
};
if (_this isEqualType []) then {
{
if (_x isEqualType {}) then {
GVAR(unconsciousConditions) pushback _x;
};
} foreach _this;
};

View File

@ -1,40 +0,0 @@
/*
* Author: esteldunedain
* Create one unload action per unconscious passenger
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return Value:
* Children actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle", "_player", "_parameters"];
private _actions = [];
{
private _unit = _x;
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
_actions pushBack
[
[
str(_unit),
[_unit, true] call EFUNC(common,getName),
"",
{[_player, (_this select 2) select 0] call FUNC(actionUnloadUnit);},
{true},
{},
[_unit]
] call EFUNC(interact_menu,createAction),
[],
_unit
];
};
} forEach crew _vehicle;
_actions

View File

@ -1,30 +0,0 @@
/*
* Author: Glowbal
* Enabled the vitals loop for a unit.
*
* Arguments:
* 0: The Unit <OBJECT>
*
* ReturnValue:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_unit", ["_force", false]];
if !([_unit] call FUNC(hasMedicalEnabled) || _force) exitWith {};
if !(local _unit) exitWith {
[QGVAR(addVitalLoop), [_unit, _force], _unit] call CBA_fnc_targetEvent;
};
// Quit if the unit already has a vital loop, or is dead, unless it's forced
if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{};
// Schedule the loop to be executed again 1 sec later
// @todo: should the loop be started righ away instead?
_unit setVariable [QGVAR(addedToUnitLoop), true, true];
[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute;

View File

@ -31,6 +31,6 @@ private _pain = ((_unit getVariable [QGVAR(pain), 0]) + _addedPain) max 0;
_unit setVariable [QGVAR(pain), _pain]; _unit setVariable [QGVAR(pain), _pain];
//Start up the vital watching (if not already running) //Start up the vital watching (if not already running)
[_unit] call FUNC(addVitalLoop); // [_unit] call FUNC(addVitalLoop);
_pain; _pain;

View File

@ -1,30 +0,0 @@
/*
* Author: Glowbal, esteldunedain
* Loop that cleans up litter
*
* Arguments:
* None
*
* ReturnValue:
* None
*
* Public: No
*/
#include "script_component.hpp"
{
TRACE_2("body",_x,isPlayer _x);
if ((!isNull _x) && {!isPlayer _x}) then {deleteVehicle _x};
} forEach GVAR(bodiesToDelete);
// deleteVehicle doesn't have instant results so it won't usualy be filtered until next run
GVAR(bodiesToDelete) = GVAR(bodiesToDelete) - [objNull];
// If no more bodies remain, exit the loop
if (GVAR(bodiesToDelete) isEqualTo []) exitWith {
TRACE_1("array emptied - rem PFEH",GVAR(bodiesToDelete));
};
// Schedule the loop to be executed again 20 sec later
[DFUNC(bodyCleanupLoop), [], 20] call CBA_fnc_waitAndExecute;

View File

@ -1,29 +0,0 @@
/*
* Author: Glowbal
* Check if caller can access targets medical equipment, based upon accessLevel.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
*
* ReturnValue:
* Can Treat <BOOL>
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_caller", "_target"];
private _accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1];
private _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;

View File

@ -1,97 +0,0 @@
/*
* Author: Glowbal
* Check if the treatment action can be performed.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
* 2: Selection name <STRING>
* 3: ACE_Medical_Treatments Classname <STRING>
*
* ReturnValue:
* Can Treat <BOOL>
*
* Example:
* [player, cursorTarget, "Head", "SurgicalKit"] call ace_medical_fnc_canTreat
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_caller", "_target", "_selectionName", "_className"];
if !(_target isKindOf "CAManBase") exitWith { false };
private _config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className);
if !(isClass _config) exitwith {false};
// Allow self treatment check
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
private _medicRequired = if (isNumber (_config >> "requiredMedic")) then {
getNumber (_config >> "requiredMedic");
} else {
// Check for required class
if (isText (_config >> "requiredMedic")) exitwith {
missionNamespace getVariable [(getText (_config >> "requiredMedic")), 0]
};
0;
};
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false };
private _items = getArray (_config >> "items");
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false };
private _allowedSelections = getArray (_config >> "allowedSelections");
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false };
private _return = true;
if (getText (_config >> "condition") != "") then {
private _condition = getText (_config >> "condition");
if (isnil _condition) then {
_condition = compile _condition;
} else {
_condition = missionNamespace getVariable _condition;
};
if (_condition isEqualType false) then {
_return = _condition;
} else {
_return = [_caller, _target, _selectionName, _className] call _condition;
};
};
if (!_return) exitwith { false };
private _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
missionNamespace getVariable [getText(_config >> "patientStateCondition"), 0]
} else {
getNumber(_config >> "patientStateCondition")
};
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
private _locations = getArray (_config >> "treatmentLocations");
if ("All" in _locations) exitwith { true };
private _medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
private _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isInMedicalVehicle))};
{
if (_x == "field") exitwith {_return = true;};
if (_x == "MedicalFacility" && _medFacility) exitwith {_return = true;};
if (_x == "MedicalVehicle" && _medVeh) exitwith {_return = true;};
if !(isnil _x) exitwith {
private _val = missionNamespace getVariable _x;
if (_val isEqualType 0) then {
_return = switch (_val) do {
case 0: {true}; //AdvancedMedicalSettings_anywhere
case 1: {call _medVeh}; //AdvancedMedicalSettings_vehicle
case 2: {call _medFacility}; //AdvancedMedicalSettings_facility
case 3: {(call _medFacility) || {call _medVeh}}; //AdvancedMedicalSettings_vehicleAndFacility
default {false}; //Disabled
};
};
};
} foreach _locations;
_return;

View File

@ -1,23 +0,0 @@
/*
* Author: Glowbal
* Cached Check if the treatment action can be performed.
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
* 2: Selection name <STRING>
* 3: ACE_Medical_Treatments Classname <STRING>
*
* ReturnValue:
* Can Treat <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
#define MAX_DURATION_CACHE 2
params ["", "_target", "_selection", "_classname"];
// parameters, function, namespace, uid
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);

View File

@ -1,82 +0,0 @@
/*
* Author: Glowbal
* Makes a copy of a dead body. For handling dead bodies for actions such as load and carry.
*
* Arguments:
* 0: The oldbody <OBJECT>
* 1: The caller <OBJECT>
*
* Return Value:
* Returns the copy of the unit. If no copy could be made, returns the oldBody <OBJECT>
*
* Public: No
*/
#include "script_component.hpp"
private ["_newUnit", "_class", "_group", "_position", "_side", "_name"];
params ["_oldBody", "_caller"];
if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies
_name = _oldBody getVariable ["ACE_name", "unknown"];
_class = typeOf _oldBody;
_side = side _caller;
_group = createGroup _side;
_position = getPos _oldBody;
_newUnit = _group createUnit [typeOf _oldBody, _position, [], 0, "NONE"];
_newUnit setVariable ["ACE_name", _name, true];
_newUnit disableAI "TARGET";
_newUnit disableAI "AUTOTARGET";
_newUnit disableAI "MOVE";
_newUnit disableAI "ANIM";
_newUnit disableAI "FSM";
removeallweapons _newUnit;
removeallassigneditems _newUnit;
removeUniform _newUnit;
removeHeadgear _newUnit;
removeBackpack _newUnit;
removeVest _newUnit;
_newUnit addHeadgear (headgear _oldBody);
_newUnit addBackpack (backpack _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
_newUnit addVest (vest _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
_newUnit addUniform (uniform _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
{_newUnit addMagazine _x} count (magazines _oldBody);
{_newUnit addWeapon _x} count (weapons _oldBody);
{_newUnit addItem _x} count (items _oldBody);
_newUnit selectWeapon (primaryWeapon _newUnit);
// We are attaching the old unit and hiding it, so we can keep the original unit until later.
_oldBody attachTo [_newUnit, [0,0,0]];
if (isMultiplayer) then {
hideObjectGlobal _oldBody;
} else {
hideObject _oldBody;
};
_newUnit setVariable [QGVAR(copyOfUnit), _oldBody, true];
_oldBody setVariable [QGVAR(hasCopy), _newUnit, true];
_newUnit setVariable ["ACE_isDead", true, true];
_newUnit setVariable ["ACE_isUnconscious", true, true];
_newUnit setVariable [QGVAR(disableInteraction), true, true];
_oldBody setVariable [QGVAR(disableInteraction), true, true];
[_newUnit, 0.89] call FUNC(setStructuralDamage);
_newUnit;

View File

@ -1,91 +0,0 @@
/*
* Author: Glowbal
* Spawns litter for the treatment action on the ground around the target
*
* Arguments:
* 0: The Caller <OBJECT>
* 1: The target <OBJECT>
* 2: The treatment Selection Name <STRING>
* 3: The treatment classname <STRING>
* 4: ?
* 5: Users of Items <?>
* 6: Blood Loss on selection (previously called _previousDamage) <NUMBER>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
#define MIN_ENTRIES_LITTER_CONFIG 3
params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"];
//Ensures comptibilty with other possible medical treatment configs
private _previousDamage = _bloodLossOnSelection;
if !(GVAR(allowLitterCreation)) exitwith {};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
private _config = if (GVAR(level) >= 2) then {
(configFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
} else {
(configFile >> "ACE_Medical_Actions" >> "Basic" >> _className)
};
if !(isClass _config) exitwith {false};
if !(isArray (_config >> "litter")) exitwith {};
private _litter = getArray (_config >> "litter");
private _createLitter = {
params ["_unit", "_litterClass"];
// @TODO: handle carriers over water
// For now, don't spawn litter if we are over water to avoid floating litter
if (surfaceIsWater (getPos _unit)) exitWith { false };
private _position = getPosATL _unit;
_position params ["_posX", "_posY", "_posZ"];
_position = [_posX + (random 2) - 1, _posY + (random 2) - 1, _posZ];
private _direction = (random 360);
// Create the litter, and timeout the event based on the cleanup delay
// The cleanup delay for events in MP is handled by the server side
[QGVAR(createLitter), [_litterClass, _position, _direction], 0] call EFUNC(common,syncedEvent);
true
};
private _createdLitter = [];
{
if (_x isEqualType []) then {
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {};
_x params ["_selection", "_litterCondition", "_litterOptions"];
if (toLower _selection in [toLower _selectionName, "all"]) then { // in is case sensitve. We can be forgiving here, so lets use toLower.
if (isnil _litterCondition) then {
_litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}};
} else {
_litterCondition = missionNamespace getVariable _litterCondition;
if (!(_litterCondition isEqualType {})) then {_litterCondition = {false}};
};
if !([_caller, _target, _selectionName, _className, _usersOfItems, _bloodLossOnSelection] call _litterCondition) exitwith {};
if (_litterOptions isEqualType []) then {
// Loop through through the litter options and place the litter
{
if (_x isEqualType [] && {(count _x > 0)}) then {
[_target, selectRandom _x] call _createLitter;
};
if (_x isEqualType "") then {
[_target, _x] call _createLitter;
};
} foreach _litterOptions;
};
};
};
} foreach _litter;

View File

@ -1,56 +0,0 @@
/*
* Author: Glowbal
* Determine If Fatal
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Part <NUMBER>
* 2: with Damage <NUMBER> (default: 0)
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
#define INCREASE_CHANCE_HEAD 0.05
#define INCREASE_CHANCE_TORSO 0.03
#define INCREASE_CHANGE_LIMB 0.01
#define CHANGE_FATAL_HEAD 0.7
#define CHANGE_FATAL_TORSO 0.6
#define CHANGE_FATAL_LIMB 0.1
params ["_unit", "_part", ["_withDamage", 0]];
if (!alive _unit) exitWith {true};
if ((vehicle _unit != _unit) && {!alive (vehicle _unit)}) exitWith { true };
if (_part < 0 || _part > 5) exitWith {false};
// Find the correct Damage threshold for unit.
private _damageThreshold = [1,1,1];
if ([_unit] call EFUNC(common,IsPlayer)) then {
_damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(playerDamageThreshold), GVAR(playerDamageThreshold), GVAR(playerDamageThreshold) * 1.7]];
} else {
_damageThreshold =_unit getVariable[QGVAR(unitDamageThreshold), [GVAR(AIDamageThreshold), GVAR(AIDamageThreshold), GVAR(AIDamageThreshold) * 1.7]];
};
_damageThreshold params ["_thresholdHead", "_thresholdTorso", "_thresholdLimbs"];
private _damageBodyPart = ((_unit getVariable [QGVAR(bodyPartStatus),[0, 0, 0, 0, 0, 0]]) select _part) + _withDamage;
// Check if damage to body part is higher as damage head
if (_part == 0) exitWith {
private _chanceFatal = CHANGE_FATAL_HEAD + ((INCREASE_CHANCE_HEAD * (_damageBodyPart - _thresholdHead)) * 10);
(_damageBodyPart >= _thresholdHead && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage torso
if (_part == 1) exitWith {
private _chanceFatal = CHANGE_FATAL_TORSO + ((INCREASE_CHANCE_TORSO * (_damageBodyPart - _thresholdTorso)) * 10);
(_damageBodyPart >= _thresholdTorso && {(_chanceFatal >= random(1))});
};
// Check if damage to body part is higher as damage limbs
// We use a slightly lower decrease for limbs, as we want any injuries done to those to be less likely to be fatal compared to head shots or torso.
private _chanceFatal = CHANGE_FATAL_LIMB + ((INCREASE_CHANGE_LIMB * (_damageBodyPart - _thresholdLimbs)) * 10);
(_damageBodyPart >= _thresholdLimbs && {(_chanceFatal >= random(1))});

View File

@ -1,193 +0,0 @@
/*
* Author: Glowbal
* Displays the patient information for given unit.
*
* Arguments:
* 0: The Unit <OBJECT>
* 1: Show <BOOL> (default: true)
* 2: Selection <NUMBER> (default: 0)
*
* ReturnValue:
* None
*
* Public: No
*/
#include "script_component.hpp"
#define MAX_DISTANCE 10
// Exit for basic medical
if (GVAR(level) < 2) exitWith {};
params ["_target", ["_show", true], ["_selectionN", 0]];
GVAR(currentSelectedSelectionN) = [0, _selectionN] select (IS_SCALAR(_selectionN));
GVAR(displayPatientInformationTarget) = [ObjNull, _target] select _show;
if (_show) then {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];
[{
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"];
params ["_args", "_idPFH"];
_args params ["_target", "_selectionN"];
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
[_idPFH] call CBA_fnc_removePerFrameHandler;
[QEGVAR(common,displayTextStructured), [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player], [ACE_player]] call CBA_fnc_targetEvent;
};
disableSerialization;
private _display = uiNamespace getVariable QGVAR(DisplayInformation);
if (isnil "_display") exitwith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
private _allInjuryTexts = [];
private _genericMessages = [];
private _partText = [LSTRING(Head), LSTRING(Torso), LSTRING(LeftArm) ,LSTRING(RightArm) ,LSTRING(LeftLeg), LSTRING(RightLeg)] select _selectionN;
_genericMessages pushback [localize _partText, [1, 1, 1, 1]];
if (_target getVariable[QGVAR(isBleeding), false]) then {
_genericMessages pushback [localize LSTRING(Status_Bleeding), [1, 0.1, 0.1, 1]];
};
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
_genericMessages pushback [localize LSTRING(Status_Lost_Blood), [1, 0.1, 0.1, 1]];
};
if (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
_genericMessages pushback [localize LSTRING(Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
};
if (_target getVariable[QGVAR(hasPain), false]) then {
_genericMessages pushback [localize LSTRING(Status_Pain), [1, 1, 1, 1]];
};
private _totalIvVolume = 0;
{
private _value = _target getVariable _x;
if !(isnil "_value") then {
_totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]);
};
} foreach GVAR(IVBags);
if (_totalIvVolume >= 1) then {
_genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
};
private _damaged = [false, false, false, false, false, false];
private _selectionBloodLoss = [0,0,0,0,0,0];
private _openWounds = _target getVariable [QGVAR(openWounds), []];
{
_x params ["", "_x1", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding
if (_amountOf > 0) then {
_damaged set [_selectionX, true];
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
if (_selectionN == _selectionX) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf >= 1) then {
// TODO localization
_allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, ceil _amountOf], [1,1,1,1]];
} else {
// TODO localization
_allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]];
};
};
};
} foreach _openWounds;
private _bandagedwounds = _target getVariable [QGVAR(bandagedWounds), []];
{
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
// Find how much this bodypart is bleeding
if !(_damaged select _selectionX) then {
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
};
if (_selectionN == _selectionX) then {
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
if (_amountOf > 0) then {
if (_amountOf >= 1) then {
// TODO localization
_allInjuryTexts pushback [format["[B] %2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, ceil _amountOf], [0.88,0.7,0.65,1]];
} else {
// TODO localization
_allInjuryTexts pushback [format["[B] Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [0.88,0.7,0.65,1]];
};
};
};
} foreach _bandagedwounds;
// Handle the body image coloring
private _availableSelections = [50,51,52,53,54,55];
{
private _total = _x;
private _red = 1;
private _green = 1;
private _blue = 1;
if (_total > 0) then {
if (_damaged select _forEachIndex) then {
_green = (0.9 - _total) max 0;
_blue = _green;
} else {
_green = (0.9 - _total) max 0;
_red = _green;
//_blue = _green;
};
};
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
} foreach _selectionBloodLoss;
private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
{
_x params ["_add", "_color"];
_lbCtrl lbAdd _add;
_lbCtrl lbSetColor [_foreachIndex, _color];
} foreach _genericMessages;
private _amountOfGeneric = count _genericMessages;
{
_x params ["_add", "_color"];
_lbCtrl lbAdd _add;
_lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _color];
} foreach _allInjuryTexts;
if (count _allInjuryTexts == 0) then {
_lbCtrl lbAdd (localize LSTRING(NoInjuriesBodypart));
};
private _logCtrl = (_display displayCtrl 302);
lbClear _logCtrl;
private _logs = _target getVariable [QGVAR(logFile_Activity), []];
{
_x params ["_message", "_moment", "_type", "_arguments"];
if (isLocalized _message) then {
_message = localize _message;
};
{
if (_x isEqualType "" && {isLocalized _x}) then {
_arguments set [_foreachIndex, localize _x];
};
} foreach _arguments;
_message = format([_message] + _arguments);
_logCtrl lbAdd format["%1 %2", _moment, _message];
} foreach _logs;
private _triageStatus = [_target] call FUNC(getTriageStatus);
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
(_display displayCtrl 303) ctrlSetBackgroundColor (_triageStatus select 2);
}, 0, [_target, GVAR(currentSelectedSelectionN)]] call CBA_fnc_addPerFrameHandler;
} else {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
};

View File

@ -1,76 +0,0 @@
/*
* Author: Glowbal
* Display triage card for a unit
*
* Arguments:
* 0: The unit <OBJECT>
* 1: Show <BOOL> (default: true)
*
* Return Value:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_target", ["_show", true]];
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
if (_show) then {
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutRsc [QGVAR(triageCard),"PLAIN"];
createDialog QGVAR(triageCard);
[{
params ["_args", "_idPFH"];
_args params ["_target"];
if (GVAR(TriageCardTarget) != _target) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
disableSerialization;
private _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
private _triageCardTexts = [];
// TODO fill the lb with the appropiate information for the patient
private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
private _log = _target getVariable [QGVAR(triageCard), []];
{
_x params ["_item", "_amount"];
private _message = _item;
if (isClass(configFile >> "CfgWeapons" >> _item)) then {
_message = getText(configFile >> "CfgWeapons" >> _item >> "DisplayName");
} else {
if (isLocalized _message) then {
_message = localize _message;
};
};
_triageCardTexts pushBack format["%1x - %2", _amount, _message];
} forEach _log;
if (count _triageCardTexts == 0) then {
_lbCtrl lbAdd (localize LSTRING(TriageCard_NoEntry));
};
{
_lbCtrl lbAdd _x;
} forEach _triageCardTexts;
private _triageStatus = [_target] call FUNC(getTriageStatus);
_triageStatus params ["_text", "", "_color"];
(_display displayCtrl 2000) ctrlSetText _text;
(_display displayCtrl 2000) ctrlSetBackgroundColor _color;
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
} else {
//("ACE_MedicalTriageCard" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
closeDialog 7010;
};

View File

@ -1,31 +0,0 @@
/*
* Author: Glowbal
* Display triage card for a unit
*
* Arguments:
* 0: Show <BOOL>
*
* Return Value:
* None
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_show"];
disableSerialization;
private _display = uiNamespace getVariable QGVAR(triageCard);
if (isNil "_display") exitWith {};
private _pos = [0,0,0,0];
if (_show) then {
_pos = ctrlPosition (_display displayCtrl 2001);
};
for "_idc" from 2002 to 2006 step 1 do {
_pos set [1, (_pos select 1) + (_pos select 3)];
private _ctrl = (_display displayCtrl _idc);
_ctrl ctrlSetPosition _pos;
_ctrl ctrlCommit 0;
};

View File

@ -13,8 +13,6 @@
#include "script_component.hpp" #include "script_component.hpp"
#define BLOODLOSSRATE_BASIC 0.2
// TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical). // TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical).
params ["_unit"]; params ["_unit"];

Some files were not shown because too many files have changed in this diff Show More