mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Improvements to vitals and display (#6444)
- Improvements to vitals and display - Fixes some undeclared variables - Adds advanced diagnose: hemorrhage classes. - Original idea for displaying hemorrhage classes belongs to @Arcanum417
This commit is contained in:
parent
e8f00fbe7c
commit
3054803e44
@ -17,6 +17,15 @@
|
||||
<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>
|
||||
|
@ -55,8 +55,24 @@ if (_show == 1) then {
|
||||
if IS_BLEEDING(_target) then {
|
||||
_genericMessages pushback [localize ELSTRING(medical,Status_Bleeding), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
if (GET_HEMORRHAGE(_target) > 1) then {
|
||||
_genericMessages pushback [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
|
||||
// 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 2: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood3), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 3: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_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 (((_target getVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
|
||||
|
@ -31,8 +31,23 @@ if IS_BLEEDING(_target) then {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Bleeding), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
|
||||
if (GET_HEMORRHAGE(_target) > 1) then {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]];
|
||||
// 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 2: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood3), [1, 0.1, 0.1, 1]];
|
||||
};
|
||||
case 3: {
|
||||
_genericMessages pushBack [localize ELSTRING(medical,Status_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 (((_target getVariable [QEGVAR(medical,tourniquets), [0, 0, 0, 0, 0, 0]]) select _selectionN) > 0) then {
|
||||
|
@ -39,13 +39,16 @@ _bloodVolume = 0 max _bloodVolume min DEFAULT_BLOOD_VOLUME;
|
||||
_unit setVariable [VAR_BLOOD_VOL, _bloodVolume, _syncValues];
|
||||
|
||||
// Set variables for synchronizing information across the net
|
||||
private _hemorrhage = [
|
||||
0,
|
||||
[1, 3] select (_bloodVolume < BLOOD_VOLUME_CLASS_3_HEMORRHAGE)
|
||||
] select (_bloodVolume < BLOOD_VOLUME_CLASS_1_HEMORRHAGE);
|
||||
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_1_HEMORRHAGE): { 1 };
|
||||
default {0};
|
||||
};
|
||||
|
||||
if (_hemorrhage != GET_HEMORRHAGE(_unit)) then {
|
||||
_unit setVariable [VAR_HEMORRHAGE, _hemorrhageClass, true];
|
||||
_unit setVariable [VAR_HEMORRHAGE, _hemorrhage, true];
|
||||
};
|
||||
|
||||
private _bloodLoss = GET_BLOOD_LOSS(_unit);
|
||||
@ -122,6 +125,7 @@ switch (true) do {
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
if (!isPlayer _unit) then {
|
||||
private _painLevel = _unit getVariable [VAR_PAIN, 0];
|
||||
hintSilent format["blood volume: %1, blood loss: [%2, %3]\nhr: %4, bp: %5, pain: %6", round(_bloodVolume * 100) / 100, round(_bloodLoss * 1000) / 1000, round((_bloodLoss / (0.001 max _cardiacOutput)) * 100) / 100, round(_heartRate), _bloodPressure, round(_painLevel * 100) / 100];
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user