mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Implemented 'showPainInMenu' logic
This commit is contained in:
parent
196a3999a4
commit
964711a38b
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user