Implemented 'showPainInMenu' logic

This commit is contained in:
ulteq 2016-12-14 20:55:03 +01:00
parent 196a3999a4
commit 964711a38b
4 changed files with 26 additions and 22 deletions

View File

@ -79,9 +79,8 @@ class ACE_Settings {
category = CSTRING(Category_Medical);
displayName = CSTRING(MedicalSettings_showPainInMenu_DisplayName);
description = CSTRING(MedicalSettings_showPainInMenu_Description);
typeName = "SCALAR";
value = 0;
values[] = {"Anyone", "Medics only", "Doctors only"};
typeName = "BOOL";
value = 1;
};
class GVAR(playerDamageThreshold) {
category = CSTRING(Category_Medical);

View File

@ -60,17 +60,19 @@ if (_show == 1) then {
if (((_target getVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0]]) select _selectionN) > 0) then {
_genericMessages pushback [localize ELSTRING(medical,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
};
private _painLevel = _target call EFUNC(medical,getPainLevel);
if (_painLevel > 0) then {
private _painText = localize ELSTRING(medical,Status_Pain);
if (_painLevel < 0.1) then {
_painText = localize ELSTRING(medical,Status_MildPain);
} else {
if (_painLevel > 0.5) then {
_painText = localize ELSTRING(medical,Status_SeverePain);
if (GVAR(showPainInMenu)) then {
private _painLevel = _target call EFUNC(medical,getPainLevel);
if (_painLevel > 0) then {
private _painText = localize ELSTRING(medical,Status_Pain);
if (_painLevel < 0.1) then {
_painText = localize ELSTRING(medical,Status_MildPain);
} else {
if (_painLevel > 0.5) then {
_painText = localize ELSTRING(medical,Status_SeverePain);
};
};
_genericMessages pushback [_painText, [1, 1, 1, 1]];
};
_genericMessages pushback [_painText, [1, 1, 1, 1]];
};
private _totalIvVolume = 0;

View File

@ -2774,7 +2774,7 @@
<English>Show pain</English>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_showPainInMenu_Description">
<English>Who can see the pain status in the medical menu</English>
<English>Show pain status in the medical menu</English>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_playerDamageThreshold_DisplayName">
<English>Player Damage</English>

View File

@ -39,17 +39,20 @@ if (((_target getVariable [QEGVAR(medical,tourniquets), [0, 0, 0, 0, 0, 0]]) sel
_genericMessages pushBack [localize ELSTRING(medical,Status_Tourniquet_Applied), [0.77, 0.51, 0.08, 1]];
};
private _painLevel = _target call EFUNC(medical,getPainLevel);
if (_painLevel > 0) then {
private _painText = localize ELSTRING(medical,Status_Pain);
if (_painLevel < 0.1) then {
_painText = localize ELSTRING(medical,Status_MildPain);
} else {
if (_painLevel > 0.5) then {
_painText = localize ELSTRING(medical,Status_SeverePain);
if (EGVAR(medical,showPainInMenu)) then {
private _painLevel = _target call EFUNC(medical,getPainLevel);
if (_painLevel > 0) then {
private _painText = localize ELSTRING(medical,Status_Pain);
if (_painLevel < 0.1) then {
_painText = localize ELSTRING(medical,Status_MildPain);
} else {
if (_painLevel > 0.5) then {
_painText = localize ELSTRING(medical,Status_SeverePain);
};
};
_genericMessages pushback [_painText, [1, 1, 1, 1]];
};
_genericMessages pushback [_painText, [1, 1, 1, 1]];
};
private _totalIvVolume = 0;