Merge pull request #2088 from acemod/fixes-medical-menu

Fixes for the medical menu
This commit is contained in:
Glowbal 2015-08-09 20:14:20 +02:00
commit 2d7e057acd
3 changed files with 10 additions and 12 deletions

View File

@ -29,10 +29,10 @@ _items = _this select 4;
{
if (_x != "") then {
[_target, _x] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _x >> "displayName")]] call FUNC(addToLog);
};
}foreach _items;
[_target, "activity", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_usedItem), [[_caller] call EFUNC(common,getName), _className]] call FUNC(addToLog); // TODO expand message
true;

View File

@ -44,7 +44,7 @@ _removeItem = _items select 0;
[_target, _removeItem] call FUNC(addToTriageCard);
[_target, "activity", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target, "activity_view", LSTRING(Activity_gaveIV), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
[_target, "activity_view", LSTRING(Activity_appliedTourniquet), [[_caller] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message
true;

View File

@ -24,24 +24,22 @@ _selectionN = GVAR(selectedBodyPart);
if (_selectionN < 0 || _selectionN > 5) exitwith {};
_genericMessages = [];
if (EGVAR(medical,level) >= 2) then {
_partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN;
_genericMessages pushBack [localize _partText, [1, 1, 1, 1]];
};
_partText = [ELSTRING(medical,Head), ELSTRING(medical,Torso), ELSTRING(medical,LeftArm) ,ELSTRING(medical,RightArm) ,ELSTRING(medical,LeftLeg), ELSTRING(medical,RightLeg)] select _selectionN;
_genericMessages pushBack [localize _partText, [1, 1, 1, 1]];
if (_target getVariable [QGVAR(isBleeding), false]) then {
if (_target getVariable [QEGVAR(medical,isBleeding), false]) then {
_genericMessages pushBack [localize ELSTRING(medical,Status_Bleeding), [1, 0.1, 0.1, 1]];
};
if (_target getVariable [QGVAR(hasLostBlood), 0] > 1) then {
if (_target getVariable [QEGVAR(medical,hasLostBlood), 0] > 1) then {
_genericMessages pushBack [localize ELSTRING(medical,Status_Lost_Blood), [1, 0.1, 0.1, 1]];
};
if (((_target getVariable [QGVAR(tourniquets), [0, 0, 0, 0, 0, 0]]) select _selectionN) > 0) 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]];
};
if (_target getVariable [QGVAR(hasPain), false]) then {
if (_target getVariable [QEGVAR(medical,hasPain), false]) then {
_genericMessages pushBack [localize ELSTRING(medical,Status_Pain), [1, 1, 1, 1]];
};
@ -52,7 +50,7 @@ _totalIvVolume = 0;
if (!isNil "_value") then {
_totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]);
};
} count GVAR(IVBags);
} count EGVAR(medical,IVBags);
if (_totalIvVolume >= 1) then {
_genericMessages pushBack [format [localize ELSTRING(medical,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];