Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical GUI - Add setting to show blood loss #8450

Merged
merged 6 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions addons/medical_gui/functions/fnc_updateInjuryList.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,21 @@ if (IS_BLEEDING(_target)) then {
_entries pushBack [localize LSTRING(Status_Bleeding), [1, 0, 0, 1]];
};

// Give a qualitative description of the blood volume lost
switch (GET_HEMORRHAGE(_target)) do {
case 1: {
_entries pushBack [localize LSTRING(Lost_Blood1), [1, 1, 0, 1]];
};
case 2: {
_entries pushBack [localize LSTRING(Lost_Blood2), [1, 0.67, 0, 1]];
};
case 3: {
_entries pushBack [localize LSTRING(Lost_Blood3), [1, 0.33, 0, 1]];
};
case 4: {
_entries pushBack [localize LSTRING(Lost_Blood4), [1, 0, 0, 1]];
if (GVAR(showBloodlossEntry)) then {
// Give a qualitative description of the blood volume lost
switch (GET_HEMORRHAGE(_target)) do {
case 1: {
_entries pushBack [localize LSTRING(Lost_Blood1), [1, 1, 0, 1]];
};
case 2: {
_entries pushBack [localize LSTRING(Lost_Blood2), [1, 0.67, 0, 1]];
};
case 3: {
_entries pushBack [localize LSTRING(Lost_Blood3), [1, 0.33, 0, 1]];
};
case 4: {
_entries pushBack [localize LSTRING(Lost_Blood4), [1, 0, 0, 1]];
};
};
};

Expand Down
9 changes: 9 additions & 0 deletions addons/medical_gui/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,12 @@ private _categoryColors = [ELSTRING(medical,Category), format ["| %1 |", LELSTRI
false // isGlobal
] call CBA_fnc_addSetting;
} forEach _damageColors;

[
QGVAR(showBloodlossEntry),
"CHECKBOX",
[LSTRING(ShowBloodlossEntry_DisplayName), LSTRING(ShowBloodlossEntry_Description)],
[ELSTRING(medical,Category), LSTRING(SubCategory)],
true,
true // isGlobal
] call CBA_fnc_addSetting;
8 changes: 8 additions & 0 deletions addons/medical_gui/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1179,5 +1179,13 @@
<German>Schadensfarbe %1</German>
<Polish>Obrażenia - kolor %1</Polish>
</Key>
<Key ID="STR_ACE_Medical_GUI_ShowBloodlossEntry_DisplayName">
<English>Show Blood Loss</English>
<German>Blutverlust anzeigen</German>
</Key>
<Key ID="STR_ACE_Medical_GUI_ShowBloodlossEntry_Description">
<English>Show qualitative blood loss in the injury list.</English>
<German>Qualitativen Blutverlust in der Verletzungsliste anzeigen.</German>
</Key>
</Package>
</Project>