mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical GUI - Display qualitative bleed rate in injury list (#9469)
* Display qualitative bleed rate in injury list * Remove debug print * Reference existing vitals metrics in bleed rates * Use `default` case for highest bleed rate Co-authored-by: PabstMirror <pabstmirror@gmail.com> --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
60143be55f
commit
c407aebe6a
@ -76,6 +76,13 @@
|
||||
#define DAMAGE_BLUE_THRESHOLD 0.8
|
||||
#define DAMAGE_TOTAL_COLORS 10
|
||||
|
||||
// Qualitative bleed rate thresholds as a fraction of knock out blood loss
|
||||
// Note that half of knock out blood loss is considered unstable, and knock out blood loss is considered critical
|
||||
#define BLEED_RATE_SLOW 0.1 // Slow - One fifth of unstable blood loss
|
||||
#define BLEED_RATE_MODERATE 0.5 // Moderate - Vitals considered stable
|
||||
#define BLEED_RATE_SEVERE 1.0 // Severe - Vitals considered unstable
|
||||
// Massive - Vitals considered critical
|
||||
|
||||
// Pain above which a unit can go unconscious upon receiving damage
|
||||
#define PAIN_UNCONSCIOUS EGVAR(medical,painUnconsciousThreshold)
|
||||
|
||||
|
@ -24,7 +24,26 @@ private _nonissueColor = [1, 1, 1, 0.33];
|
||||
|
||||
// Indicate if unit is bleeding at all
|
||||
if (IS_BLEEDING(_target)) then {
|
||||
_entries pushBack [localize LSTRING(Status_Bleeding), [1, 0, 0, 1]];
|
||||
// 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 {
|
||||
_entries pushBack [localize LSTRING(Status_Nobleeding), _nonissueColor];
|
||||
};
|
||||
|
@ -969,6 +969,18 @@
|
||||
<Key ID="STR_ACE_Medical_GUI_STATUS_NOBLEEDING">
|
||||
<English>No bleeding</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Bleed_Rate1">
|
||||
<English>Slow bleeding</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Bleed_Rate2">
|
||||
<English>Moderate bleeding</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Bleed_Rate3">
|
||||
<English>Severe bleeding</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_Bleed_Rate4">
|
||||
<English>Massive bleeding</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Medical_GUI_STATUS_PAIN">
|
||||
<English>in Pain</English>
|
||||
<German>hat Schmerzen</German>
|
||||
|
Loading…
Reference in New Issue
Block a user