mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Introduce bleedout condition and fix IV hemorrhage (#6470)
* Introduce bleedout condition and fix IV hemorrhage * Update patient info display hemorrhage values * Update UI info hemorrhage values
This commit is contained in:
parent
39b1d144e1
commit
873ed90cc1
@ -17,15 +17,6 @@
|
||||
<Chinesesimp>受伤</Chinesesimp>
|
||||
<Chinese>受傷</Chinese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Status_Lost_Blood2">
|
||||
<English>Lost some blood</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Status_Lost_Blood3">
|
||||
<English>Lost a lot of blood</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Status_Lost_Blood4">
|
||||
<English>Lost a large amount of blood</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_Category_DisplayName">
|
||||
<English>ACE Medical</English>
|
||||
<Russian>ACE: медицина</Russian>
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define BLOOD_VOLUME_CLASS_2_HEMORRHAGE 5.100 // lost more than 15% blood, Class II Hemorrhage
|
||||
#define BLOOD_VOLUME_CLASS_3_HEMORRHAGE 4.200 // lost more than 30% blood, Class III Hemorrhage
|
||||
#define BLOOD_VOLUME_CLASS_4_HEMORRHAGE 3.600 // lost more than 40% blood, Class IV Hemorrhage
|
||||
#define BLOOD_VOLUME_FATAL 3.0 // Lost more than 50% blood, Fatal
|
||||
#define BLOOD_VOLUME_FATAL 3.0 // Lost more than 50% blood, Unrecoverable
|
||||
|
||||
// IV Change per second calculation:
|
||||
// 250 ml should take 60 seconds to fill. 250 ml / 60 s ~ 4.1667 ml/s.
|
||||
|
@ -59,19 +59,20 @@ if (_show == 1) then {
|
||||
// Show more information if advancedDiagnose is enabled
|
||||
if (EGVAR(medical,advancedDiagnose)) then {
|
||||
switch (GET_HEMORRHAGE(_target)) do {
|
||||
case 1: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood2), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 1;
|
||||
case 2: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood3), [1, 0.1, 0.1, 1]];
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood2), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 3: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood4), [1, 0.1, 0.1, 1]];
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood3), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 4: {
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood4), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (GET_HEMORRHAGE(_target) > 1) then {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
if (GET_HEMORRHAGE(_target) > 0) then {
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood1), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -34,19 +34,20 @@ if IS_BLEEDING(_target) then {
|
||||
// Show more information if advancedDiagnose is enabled
|
||||
if (EGVAR(medical,advancedDiagnose)) then {
|
||||
switch (GET_HEMORRHAGE(_target)) do {
|
||||
case 1: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood2), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 1;
|
||||
case 2: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood3), [1, 0.1, 0.1, 1]];
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood2), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 3: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood4), [1, 0.1, 0.1, 1]];
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood3), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 4: {
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood4), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (GET_HEMORRHAGE(_target) > 1) then {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
if (GET_HEMORRHAGE(_target) > 0) then {
|
||||
_genericMessages pushBack [LLSTRING(Lost_Blood1), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -844,6 +844,34 @@
|
||||
<Chinesesimp>大量失血</Chinesesimp>
|
||||
<Chinese>大量失血</Chinese>
|
||||
</Key>
|
||||
<!--
|
||||
Strings above and below this seem to differ in some languages, determine which is best to use
|
||||
-->
|
||||
<Key ID="STR_ACE_Medical_GUI_Lost_Blood1">
|
||||
<English>Lost a lot of Blood</English>
|
||||
<German>Hat eine große Menge Blut verloren</German>
|
||||
<Russian>Большая кровопотеря</Russian>
|
||||
<Spanish>Mucha sangre perdida</Spanish>
|
||||
<French>A perdu beaucoup de sang</French>
|
||||
<Polish>Stracił dużo krwi</Polish>
|
||||
<Czech>Ztratil hodně krve</Czech>
|
||||
<Hungarian>Sok vért vesztett</Hungarian>
|
||||
<Italian>Ha perso parecchio sangue</Italian>
|
||||
<Portuguese>Perdeu muito sangue</Portuguese>
|
||||
<Japanese>大量失血している</Japanese>
|
||||
<Korean>많은 양의 혈액을 잃음</Korean>
|
||||
<Chinesesimp>大量失血中</Chinesesimp>
|
||||
<Chinese>大量失血中</Chinese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Lost_Blood2">
|
||||
<English>Lost some blood</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Lost_Blood3">
|
||||
<English>Lost a lot of blood</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Lost_Blood4">
|
||||
<English>Lost a large amount of blood</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_STATUS_TOURNIQUET_APPLIED">
|
||||
<English>Tourniquet [CAT]</English>
|
||||
<German>Tourniquet [CAT]</German>
|
||||
|
@ -16,7 +16,7 @@ class ACE_Medical_StateMachine {
|
||||
};
|
||||
class FatalVitals {
|
||||
targetState = "CardiacArrest";
|
||||
events[] = {QEGVAR(medical,FatalVitals)};
|
||||
events[] = {QEGVAR(medical,FatalVitals), QEGVAR(medical,Bleedout)};
|
||||
};
|
||||
class FatalInjury {
|
||||
targetState = "FatalInjury";
|
||||
@ -35,7 +35,7 @@ class ACE_Medical_StateMachine {
|
||||
};
|
||||
class FatalVitals {
|
||||
targetState = "CardiacArrest";
|
||||
events[] = {QEGVAR(medical,FatalVitals)};
|
||||
events[] = {QEGVAR(medical,FatalVitals), QEGVAR(medical,Bleedout)};
|
||||
};
|
||||
class FatalInjury {
|
||||
targetState = "FatalInjury";
|
||||
@ -57,7 +57,7 @@ class ACE_Medical_StateMachine {
|
||||
};
|
||||
class FatalTransitions {
|
||||
targetState = "CardiacArrest";
|
||||
events[] = {QEGVAR(medical,FatalVitals)};
|
||||
events[] = {QEGVAR(medical,FatalVitals), QEGVAR(medical,Bleedout)};
|
||||
};
|
||||
class FatalInjury {
|
||||
targetState = "FatalInjury";
|
||||
@ -105,6 +105,10 @@ class ACE_Medical_StateMachine {
|
||||
condition = QFUNC(conditionExecutionDeath);
|
||||
events[] = {QEGVAR(medical,FatalInjury)};
|
||||
};
|
||||
class Bleedout {
|
||||
targetState = "Dead";
|
||||
events[] = {QEGVAR(medical,Bleedout)};
|
||||
};
|
||||
};
|
||||
class Dead {
|
||||
// When the unit is killed it's no longer handled by the statemachine
|
||||
|
@ -2113,22 +2113,6 @@
|
||||
<English>In severe pain</English>
|
||||
<German>Hat starke Schmerzen</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_treatment_Status_Lost_Blood">
|
||||
<English>Lost a lot of Blood</English>
|
||||
<German>Hat eine große Menge Blut verloren</German>
|
||||
<Russian>Большая кровопотеря</Russian>
|
||||
<Spanish>Mucha sangre perdida</Spanish>
|
||||
<French>A perdu beaucoup de sang</French>
|
||||
<Polish>Stracił dużo krwi</Polish>
|
||||
<Czech>Ztratil hodně krve</Czech>
|
||||
<Hungarian>Sok vért vesztett</Hungarian>
|
||||
<Italian>Ha perso parecchio sangue</Italian>
|
||||
<Portuguese>Perdeu muito sangue</Portuguese>
|
||||
<Japanese>大量失血している</Japanese>
|
||||
<Korean>많은 양의 혈액을 잃음</Korean>
|
||||
<Chinesesimp>大量失血中</Chinesesimp>
|
||||
<Chinese>大量失血中</Chinese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_treatment_Status_Tourniquet_Applied">
|
||||
<English>Tourniquet [CAT]</English>
|
||||
<German>Tourniquet [CAT]</German>
|
||||
|
@ -40,9 +40,9 @@ _unit setVariable [VAR_BLOOD_VOL, _bloodVolume, _syncValues];
|
||||
|
||||
// Set variables for synchronizing information across the net
|
||||
private _hemorrhage = switch (true) do {
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_4_HEMORRHAGE): { 3 };
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_3_HEMORRHAGE): { 2 };
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_2_HEMORRHAGE): { 1 };
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_4_HEMORRHAGE): { 4 };
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_3_HEMORRHAGE): { 3 };
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_2_HEMORRHAGE): { 2 };
|
||||
case (_bloodVolume < BLOOD_VOLUME_CLASS_1_HEMORRHAGE): { 1 };
|
||||
default {0};
|
||||
};
|
||||
@ -89,9 +89,14 @@ _bloodPressure params ["_bloodPressureL", "_bloodPressureH"];
|
||||
|
||||
private _cardiacOutput = [_unit] call EFUNC(medical_status,getCardiacOutput);
|
||||
|
||||
// Most lethal events need to be checked first here
|
||||
switch (true) do {
|
||||
case (_bloodVolume < BLOOD_VOLUME_FATAL): {
|
||||
TRACE_3("BloodVolume Fatal",_unit,BLOOD_VOLUME_FATAL,_bloodVolume);
|
||||
[QEGVAR(medical,Bleedout), _unit] call CBA_fnc_localEvent;
|
||||
};
|
||||
case (_hemorrhage == 4): {
|
||||
TRACE_3("Class IV Hemorrhage",_unit,_hemorrhage,_bloodVolume);
|
||||
[QEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent;
|
||||
};
|
||||
case (_heartRate < 20 || {_heartRate > 220}): {
|
||||
|
Loading…
Reference in New Issue
Block a user