Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@KoffeinFlummi
Created March 8, 2015 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KoffeinFlummi/b32c1a7eae1360876174 to your computer and use it in GitHub Desktop.
Save KoffeinFlummi/b32c1a7eae1360876174 to your computer and use it in GitHub Desktop.
diff --git a/AGM_Medical/config.cpp b/AGM_Medical/config.cpp
index c2acf93..6f91d70 100644
--- a/AGM_Medical/config.cpp
+++ b/AGM_Medical/config.cpp
@@ -580,6 +580,431 @@ class CfgVehicles {
};
};
+ class B_Soldier_VR_F: B_Soldier_base_F {
+ class HitPoints {
+ class body {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitBody: body {
+ name = "body";
+ visual = "Camo_body";
+ armor = 2;
+ explosionShielding = 10;
+ passThrough = 1;
+ radius = 0.15;
+ };
+
+ class hand_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftArm: hand_l {
+ name = "hand_l";
+ visual = "Camo_arm_left";
+ armor = ARM_LEG_ARMOR_DEFAULT; //2;
+ explosionShielding = 1;
+ passThrough = 1;
+ radius = 0.06; //0.08;
+ };
+
+ class hand_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightArm: hand_r {
+ name = "hand_r";
+ visual = "Camo_arm_right";
+ armor = ARM_LEG_ARMOR_DEFAULT; //2;
+ explosionShielding = 1;
+ passThrough = 1;
+ radius = 0.06; //0.08;
+ };
+
+ class head {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitHead: head {
+ name = "head";
+ visual = "Camo_head";
+ armor = 1;
+ explosionShielding = 0.5;
+ passThrough = 1;
+ radius = 0.1;
+ };
+
+ class leg_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftLeg: leg_l {
+ name = "leg_l";
+ visual = "Camo_leg_left";
+ armor = ARM_LEG_ARMOR_DEFAULT; //1;
+ explosionShielding = 1; //0.5;
+ passThrough = 1;
+ radius = 0.08; //0.1;
+ };
+
+ class leg_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightLeg: leg_r {
+ name = "leg_r";
+ visual = "Camo_leg_right";
+ armor = ARM_LEG_ARMOR_DEFAULT; //1;
+ explosionShielding = 1; //0.5;
+ passThrough = 1;
+ radius = 0.08; //0.1;
+ };
+ };
+ };
+
+ class O_Soldier_VR_F: O_Soldier_base_F {
+ class HitPoints {
+ class body {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitBody: body {
+ name = "body";
+ visual = "Camo_body";
+ armor = 2; //6;
+ explosionShielding = 10; //1.5;
+ passThrough = 1; //0.5;
+ radius = 0.15;
+ };
+
+ class hand_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftArm: hand_l {
+ name = "hand_l";
+ visual = "Camo_arm_left";
+ armor = ARM_LEG_ARMOR_CSAT; //8;
+ explosionShielding = 1; //0.8;
+ passThrough = 0.85; //0.5;
+ radius = 0.06; //0.08;
+ };
+
+ class hand_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightArm: hand_r {
+ name = "hand_r";
+ visual = "Camo_arm_right";
+ armor = ARM_LEG_ARMOR_CSAT; //8;
+ explosionShielding = 1; //0.8;
+ passThrough = 0.85; //0.5;
+ radius = 0.06; //0.08;
+ };
+
+ class head {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitHead: head {
+ name = "head";
+ visual = "Camo_head";
+ armor = 1;
+ explosionShielding = 0.5;
+ passThrough = 1;
+ radius = 0.1;
+ };
+
+ class leg_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftLeg: leg_l {
+ name = "leg_l";
+ visual = "Camo_leg_left";
+ armor = ARM_LEG_ARMOR_CSAT; //8;
+ explosionShielding = 1; //0.8;
+ passThrough = 0.85; //0.5;
+ radius = 0.08; //0.1;
+ };
+
+ class leg_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightLeg: leg_r {
+ name = "leg_r";
+ visual = "Camo_leg_right";
+ armor = ARM_LEG_ARMOR_CSAT; //8;
+ explosionShielding = 1; //0.8;
+ passThrough = 0.85; //0.5;
+ radius = 0.08; //0.1;
+ };
+ };
+ };
+
+ class I_Soldier_VR_F: I_Soldier_base_F {
+ class HitPoints {
+ class body {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitBody: body {
+ name = "body";
+ visual = "Camo_body";
+ armor = 2;
+ explosionShielding = 10;
+ passThrough = 1;
+ radius = 0.15;
+ };
+
+ class hand_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftArm: hand_l {
+ name = "hand_l";
+ visual = "Camo_arm_left";
+ armor = ARM_LEG_ARMOR_DEFAULT; //2;
+ explosionShielding = 1;
+ passThrough = 1;
+ radius = 0.06; //0.08;
+ };
+
+ class hand_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightArm: hand_r {
+ name = "hand_r";
+ visual = "Camo_arm_right";
+ armor = ARM_LEG_ARMOR_DEFAULT; //2;
+ explosionShielding = 1;
+ passThrough = 1;
+ radius = 0.06; //0.08;
+ };
+
+ class head {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitHead: head {
+ name = "head";
+ visual = "Camo_head";
+ armor = 1;
+ explosionShielding = 0.5;
+ passThrough = 1;
+ radius = 0.1;
+ };
+
+ class leg_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftLeg: leg_l {
+ name = "leg_l";
+ visual = "Camo_leg_left";
+ armor = ARM_LEG_ARMOR_DEFAULT; //1;
+ explosionShielding = 1; //0.5;
+ passThrough = 1;
+ radius = 0.08; //0.1;
+ };
+
+ class leg_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightLeg: leg_r {
+ name = "leg_r";
+ visual = "Camo_leg_right";
+ armor = ARM_LEG_ARMOR_DEFAULT; //1;
+ explosionShielding = 1; //0.5;
+ passThrough = 1;
+ radius = 0.08; //0.1;
+ };
+ };
+ };
+
+ class C_man_1;
+ class C_Soldier_VR_F: C_man_1 {
+ class HitPoints {
+ class body {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitBody: body {
+ name = "body";
+ visual = "Camo_body";
+ armor = 2;
+ explosionShielding = 10;
+ passThrough = 1;
+ radius = 0.15;
+ };
+
+ class hand_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftArm: hand_l {
+ name = "hand_l";
+ visual = "Camo_arm_left";
+ armor = ARM_LEG_ARMOR_DEFAULT; //2;
+ explosionShielding = 1;
+ passThrough = 1;
+ radius = 0.06; //0.08;
+ };
+
+ class hand_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightArm: hand_r {
+ name = "hand_r";
+ visual = "Camo_arm_right";
+ armor = ARM_LEG_ARMOR_DEFAULT; //2;
+ explosionShielding = 1;
+ passThrough = 1;
+ radius = 0.06; //0.08;
+ };
+
+ class head {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitHead: head {
+ name = "head";
+ visual = "Camo_head";
+ armor = 1;
+ explosionShielding = 0.5;
+ passThrough = 1;
+ radius = 0.1;
+ };
+
+ class leg_l {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitLeftLeg: leg_l {
+ name = "leg_l";
+ visual = "Camo_leg_left";
+ armor = ARM_LEG_ARMOR_DEFAULT; //1;
+ explosionShielding = 1; //0.5;
+ passThrough = 1;
+ radius = 0.08; //0.1;
+ };
+
+ class leg_r {
+ name = "";
+ visual = "";
+ armor = 999;
+ explosionShielding = 0;
+ radius = 0;
+ };
+
+ class HitRightLeg: leg_r {
+ name = "leg_r";
+ visual = "Camo_leg_right";
+ armor = ARM_LEG_ARMOR_DEFAULT; //1;
+ explosionShielding = 1; //0.5;
+ passThrough = 1;
+ radius = 0.08; //0.1;
+ };
+ };
+ };
+
class LandVehicle;
class Car: LandVehicle {
class AGM_Actions {
@@ -840,7 +1265,7 @@ class CfgVehicles {
};
class RequireMEDEVAC {
displayName = "Require MEDEVAC?";
- description = "Only allow Epipens within synchronized triggers? Default: No";
+ description = "Only allow Bloodbags/Epipens within synchronized triggers? Default: No";
typeName = "BOOL";
class values {
class Yes {
@@ -854,6 +1279,22 @@ class CfgVehicles {
};
};
};
+ class TypeMEDEVAC {
+ displayName = "Type for MEDEVAC";
+ description = "The type of medical item to restrict to a trigger? Default: Epipen";
+ typeName = "NUMBER";
+ class values {
+ class Epi {
+ default = 1;
+ name = "Epipen";
+ value = 0;
+ };
+ class Blood {
+ name = "Bloodbag";
+ value = 1;
+ };
+ };
+ };
class AutomaticWakeup {
displayName = "Automatic Wakeup?";
description = "Allow units to wake up by themselves? Default: Yes";
@@ -1053,6 +1494,7 @@ class AGM_Parameters_Numeric {
AGM_Medical_CoefPain = 1.0;
AGM_Medical_CoefNonMedic = 2.0;
AGM_Medical_MaxUnconsciousnessTime = -1;
+ AGM_Medical_TypeMEDEVAC = 0;
};
class AGM_Parameters_Boolean {
// Boolean Parameters (0/1)
diff --git a/AGM_Medical/functions/fn_diagnose.sqf b/AGM_Medical/functions/fn_diagnose.sqf
index 7113c1a..9adf0e6 100644
--- a/AGM_Medical/functions/fn_diagnose.sqf
+++ b/AGM_Medical/functions/fn_diagnose.sqf
@@ -54,9 +54,15 @@ _lightinjuries = "";
_heavyinjuries = "";
if (AGM_Medical_SingleBandage) then {
_string = _string + (switch True do {
- case (damage _unit >= 0.5): {"<br/><br/><t color='#FF0000'>" + localize "STR_AGM_Medical_PatientHeavilyInjured" + "</t>"};
- case (damage _unit < 0.5): {"<br/><br/><t color='#FFFF00'>" + localize "STR_AGM_Medical_PatientLightlyInjured" + "</t>"};
- default {"<br/><br/>" + localize "STR_AGM_Medical_PatientNotInjured"};
+ case (damage _unit >= 0.5): {
+ "<br/><br/><t color='#FF0000'>" + localize "STR_AGM_Medical_PatientHeavilyInjured" + "</t>"
+ };
+ case (damage _unit > 0 && damage _unit < 0.5): {
+ "<br/><br/><t color='#FFFF00'>" + localize "STR_AGM_Medical_PatientLightlyInjured" + "</t>"
+ };
+ default {
+ "<br/><br/>" + localize "STR_AGM_Medical_PatientNotInjured"
+ };
});
} else {
_heavyinjuries = "";
diff --git a/AGM_Medical/functions/fn_handleDamage.sqf b/AGM_Medical/functions/fn_handleDamage.sqf
index 52f96f8..face349 100644
--- a/AGM_Medical/functions/fn_handleDamage.sqf
+++ b/AGM_Medical/functions/fn_handleDamage.sqf
@@ -42,7 +42,10 @@ if (typeName _projectile == "OBJECT") then {
// Prevent unnecessary processing
if (damage _unit >= 1) exitWith {};
-_unit setVariable ["AGM_isDiagnosed", False, True];
+// Only broadcast the isDiagnosed status if it changed
+if (_unit getVariable ["AGM_isDiagnosed", False]) then {
+ _unit setVariable ["AGM_isDiagnosed", False, True];
+};
// @todo: figure out if this still applies.
diff --git a/AGM_Medical/functions/fn_module.sqf b/AGM_Medical/functions/fn_module.sqf
index 740e78c..c1cda2a 100644
--- a/AGM_Medical/functions/fn_module.sqf
+++ b/AGM_Medical/functions/fn_module.sqf
@@ -41,6 +41,7 @@ publicVariable "AGM_Medical_MEDEVACVehicles";
[_logic, "AGM_Medical_AllowChatWhileUnconscious", "AllowChatWhileUnconscious" ] call AGM_Core_fnc_readBooleanParameterFromModule;
[_logic, "AGM_Medical_EnableOverdosing", "EnableOverdosing" ] call AGM_Core_fnc_readBooleanParameterFromModule;
[_logic, "AGM_Medical_RequireMEDEVAC", "RequireMEDEVAC" ] call AGM_Core_fnc_readBooleanParameterFromModule;
+[_logic, "AGM_Medical_TypeMEDEVAC", "TypeMEDEVAC" ] call AGM_Core_fnc_readNumericParameterFromModule;
[_logic, "AGM_Medical_AutomaticWakeup", "AutomaticWakeup" ] call AGM_Core_fnc_readBooleanParameterFromModule;
[_logic, "AGM_Medical_DisableScreams", "DisableScreams" ] call AGM_Core_fnc_readBooleanParameterFromModule;
diff --git a/AGM_Medical/functions/fn_treat.sqf b/AGM_Medical/functions/fn_treat.sqf
index 3e0bacb..0f77f73 100644
--- a/AGM_Medical/functions/fn_treat.sqf
+++ b/AGM_Medical/functions/fn_treat.sqf
@@ -24,6 +24,7 @@ _unit = _this select 0;
_target = _this select 1;
_type = _this select 2;
+_typeMedevac = "epipen";
// check if unit is medic and if that's even necessary
if (_type in ["epipen", "bloodbag"] and
!(([_unit] call AGM_Core_fnc_isMedic) or
@@ -33,6 +34,8 @@ if (_type in ["epipen", "bloodbag"] and
};
};
+_typeMedevac = ["epipen", "bloodbag"] select AGM_Medical_TypeMEDEVAC;
+
// check MEDEVAC conditions
_inTrigger = False;
{
@@ -44,7 +47,7 @@ _inTrigger = False;
_inTrigger = _target distance _x < 10;
} forEach (missionNamespace getVariable ["AGM_Medical_MEDEVACVehicles", []]);
-if (_type == "epipen" and (_unit getVariable ["AGM_Medical_RequireMEDEVAC", AGM_Medical_RequireMEDEVAC]) and !_inTrigger) exitWith {
+if (_type == _typeMedevac and (_unit getVariable ["AGM_Medical_RequireMEDEVAC", AGM_Medical_RequireMEDEVAC]) and !_inTrigger) exitWith {
if ([_unit] call AGM_Core_fnc_isPlayer) then {
[localize "STR_AGM_Medical_NotInMEDEVAC"] call AGM_Core_fnc_displayTextStructured;
};
diff --git a/AGM_Medical/stringtable.xml b/AGM_Medical/stringtable.xml
index 55ca199..fff5897 100644
--- a/AGM_Medical/stringtable.xml
+++ b/AGM_Medical/stringtable.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-12-22 -->
<Project name="AGM">
<Package name="Medical">
@@ -82,7 +82,7 @@
<Czech>Obvázat</Czech>
<French>Pansement</French>
<Italian>Benda</Italian>
- <Hungarian>Kötözése</Hungarian>
+ <Hungarian>Kötözés</Hungarian>
<Portuguese>Atadura</Portuguese>
<Russian>Перевязать</Russian>
</Key>
@@ -430,7 +430,7 @@
<Czech>Používaný k probuzení člověka z bezvědomí</Czech>
<Russian>Используется для возвращения в сознание.</Russian>
<French>Utilisé pour réveiller un patient inconscient.</French>
- <Hungarian>Ájultak felkeltéséhez.</Hungarian>
+ <Hungarian>Eszméletlenek felkeltéséhez.</Hungarian>
<Portuguese>Usado para despertar indivíduos inconscientes.</Portuguese>
<Italian>Usato per risvegliare le unità svenute.</Italian>
</Key>
@@ -563,7 +563,7 @@
<Czech>Pacient je v bezvědomí.</Czech>
<Russian>Пациент без сознания.</Russian>
<French>Le patient est inconscient.</French>
- <Hungarian>Elájult.</Hungarian>
+ <Hungarian>Eszméletlen.</Hungarian>
<Portuguese>O paciente está inconsciente.</Portuguese>
<Italian>Il paziente è svenuto.</Italian>
</Key>
@@ -707,7 +707,7 @@
<Czech>Pacient je na těžkých sedativech </Czech>
<Russian>У пациента высокая доза морфина в крови.</Russian>
<French>Le patient est lourdement sédaté,</French>
- <Hungarian>Erős fájdalomcsillapítót kapott.</Hungarian>
+ <Hungarian>Erős fájdalomcsillapítót kapott</Hungarian>
<Portuguese>O paciente está sob efeito de fortes analgésicos</Portuguese>
<Italian>Il paziente è sotto effetto di forti antidolorifici</Italian>
</Key>
@@ -719,7 +719,7 @@
<Czech>Pacient má v sobě morfium </Czech>
<Russian>Пациенту введен морфин.</Russian>
<French>Le patient est sédaté,</French>
- <Hungarian>Kapot morfiumot.</Hungarian>
+ <Hungarian>Kapot morfiumot</Hungarian>
<Portuguese>O paciente está sob efeito de morfina</Portuguese>
<Italian>Il paziente è un po' fatto di morfina</Italian>
</Key>
@@ -731,7 +731,7 @@
<Czech>Pacient není na sedativech </Czech>
<Russian>Обезболивающие не вводились.</Russian>
<French>Le patient n'est pas sédaté,</French>
- <Hungarian>Nem kapott fájdalomcsillapítót.</Hungarian>
+ <Hungarian>Nem kapott fájdalomcsillapítót</Hungarian>
<Portuguese>O paciente não está sob efeito de analgésicos</Portuguese>
<Italian>Il paziente non è sotto effetto di antidolorifici</Italian>
</Key>
@@ -789,7 +789,7 @@
<Spanish>está inyectandote morfina.</Spanish>
<French>t'injecte de la morphine.</French>
<Polish>podaje Tobie morfinę.</Polish>
- <Hungarian>morfiumot ad neked.</Hungarian>
+ <Hungarian>morfiumot ad be neked.</Hungarian>
<Czech>ti dává morfin.</Czech>
<Portuguese>está lhe dando morfina.</Portuguese>
<Italian>ti sta iniettando la morfina.</Italian>
@@ -799,7 +799,7 @@
<English>Reopen medical menu after treatment</English>
<German>Sanitätsmenü nach Behandlung öffnen</German>
<Spanish>Reabrir el menú médico después de tratar</Spanish>
- <Hungarian>Orvosi menü újranyitása ellátás után</Hungarian>
+ <Hungarian>Orvosi menü újranyitása az ellátás után</Hungarian>
<Czech>Po ošetření znovu otevřít zdravotnické menu</Czech>
<Polish>Otwórz ponownie menu medyczne po zakończeniu akcji leczenia</Polish>
<French>Réouvrir le menu médical après les soins</French>
@@ -828,7 +828,7 @@
<Czech>Beru pacientův %1 ...</Czech>
<Italian>Sto prendendo un %1 dal paziente ...</Italian>
<Portuguese>Pegando %1 do paciente ...</Portuguese>
- <Hungarian>Elveszed a páciens ...</Hungarian>
+ <Hungarian>Elveszed a pácienstől ezt: %1 ...</Hungarian>
<Russian>Используем %1 пациента ...</Russian>
</Key>
<Key ID="STR_AGM_Medical_TakingYourItem">
@@ -840,7 +840,7 @@
<Czech>%1 používá tvůj %2 ...</Czech>
<Italian>%1 sta usando il tuo %1 ...</Italian>
<Portuguese>%1 está usando seu %2 ...</Portuguese>
- <Hungarian>%1 használja a %2 ...</Hungarian>
+ <Hungarian>%1 használja ezt: %2 ...</Hungarian>
<Russian>%1 использует ваш %2 ...</Russian>
</Key>
<Key ID="STR_AGM_Medical_TakingItemSelf">
@@ -863,15 +863,17 @@
<Polish>Alternatywny efekt bólu</Polish>
<Czech>Alternativní efekt bolesti</Czech>
<Russian>Альтернативный эффект боли</Russian>
+ <Portuguese>Efeito de Dor Alternativo</Portuguese>
</Key>
<Key ID="STR_AGM_Medical_NotInMEDEVAC">
<English>This is not possible here.</English>
<German>Das ist hier nicht möglich.</German>
<Spanish>Esto no es posible aquí.</Spanish>
- <Hungarian>Ezt nem lehet itten.</Hungarian>
+ <Hungarian>Ez nem lehetséges itt.</Hungarian>
<Polish>Nie możesz tego zrobić tutaj.</Polish>
<Czech>Zde to není možné.</Czech>
<Russian>Вы не можете сделать это здесь.</Russian>
+ <Portuguese>Isso não é possível aqui.</Portuguese>
</Key>
</Package>
-</Project>
\ No newline at end of file
+</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment