Medical GUI - Show Bleeding Rate (#9815)

Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
BrettMayson 2024-03-03 16:47:37 -06:00 committed by GitHub
parent fd22ff04c5
commit a85a65331f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 17 deletions

View File

@ -24,24 +24,31 @@ private _nonissueColor = [1, 1, 1, 0.33];
// Indicate if unit is bleeding at all
if (IS_BLEEDING(_target)) then {
// Give a qualitative description of the rate of bleeding
private _cardiacOutput = [_target] call EFUNC(medical_status,getCardiacOutput);
private _bleedRate = GET_BLOOD_LOSS(_target);
private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05);
// Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest
switch (true) do {
case (_bleedRate < _bleedRateKO * BLEED_RATE_SLOW): {
_entries pushBack [localize LSTRING(Bleed_Rate1), [1, 1, 0, 1]];
switch (GVAR(showBleeding)) do {
case 1: {
// Just show whether the unit is bleeding at all
_entries pushBack [localize LSTRING(Status_Bleeding), [1, 0, 0, 1]];
};
case (_bleedRate < _bleedRateKO * BLEED_RATE_MODERATE): {
_entries pushBack [localize LSTRING(Bleed_Rate2), [1, 0.67, 0, 1]];
};
case (_bleedRate < _bleedRateKO * BLEED_RATE_SEVERE): {
_entries pushBack [localize LSTRING(Bleed_Rate3), [1, 0.33, 0, 1]];
};
default {
_entries pushBack [localize LSTRING(Bleed_Rate4), [1, 0, 0, 1]];
case 2: {
// Give a qualitative description of the rate of bleeding
private _cardiacOutput = [_target] call EFUNC(medical_status,getCardiacOutput);
private _bleedRate = GET_BLOOD_LOSS(_target);
private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05);
// Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest
switch (true) do {
case (_bleedRate < _bleedRateKO * BLEED_RATE_SLOW): {
_entries pushBack [localize LSTRING(Bleed_Rate1), [1, 1, 0, 1]];
};
case (_bleedRate < _bleedRateKO * BLEED_RATE_MODERATE): {
_entries pushBack [localize LSTRING(Bleed_Rate2), [1, 0.67, 0, 1]];
};
case (_bleedRate < _bleedRateKO * BLEED_RATE_SEVERE): {
_entries pushBack [localize LSTRING(Bleed_Rate3), [1, 0.33, 0, 1]];
};
default {
_entries pushBack [localize LSTRING(Bleed_Rate4), [1, 0, 0, 1]];
};
};
};
};
} else {

View File

@ -127,6 +127,15 @@ private _categoryColors = [ELSTRING(medical,Interface_Category), format ["| %1 |
true // isGlobal
] call CBA_fnc_addSetting;
[
QGVAR(showBleeding),
"LIST",
[LSTRING(showBleeding_DisplayName), LSTRING(showBleeding_Description)],
[ELSTRING(medical,Interface_Category), LSTRING(SubCategory)],
[[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(ShowBleeding_Rate)], 2],
true // isGlobal
] call CBA_fnc_addSetting;
[
QGVAR(bodyPartOutlineColor),
"COLOR",

View File

@ -1357,6 +1357,24 @@
<Spanish>Mostrar la pérdida de sangre cualitativa en la lista de heridas.</Spanish>
<French>Afficher la quantité de sang perdue</French>
</Key>
<Key ID="STR_ACE_Medical_GUI_showBleeding_DisplayName">
<English>Show Bleeding State</English>
<Spanish>Mostrar estado de sangrado</Spanish>
<German>Blutungsstatus anzeigen</German>
<Portuguese>Mostrar estado de sangramento</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_GUI_showBleeding_Description">
<English>Display if the patient is bleeding, optionally with rate</English>
<Spanish>Mostrar si el paciente está sangrando, opcionalmente con tasa</Spanish>
<German>Zeigt an, dass der Patient blutet, optional mit Rate</German>
<Portuguese>Mostrar se o paciente está sangrando, opcionalmente com taxa</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_GUI_ShowBleeding_Rate">
<English>Show Bleeding Rate</English>
<Spanish>Mostrar tasa de sangrado</Spanish>
<German>Blutungsrate anzeigen</German>
<Portuguese>Mostrar taxa de sangramento</Portuguese>
</Key>
<Key ID="STR_ACE_Medical_GUI_PeekMedicalOnHit_DisplayName">
<English>Peek Medical Info on Hit</English>
<Polish>Podgląd Informacji Medycznych po Zranieniu</Polish>