mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical GUI - Skip body part-specific info for medical peek (#9570)
* add no body part support to patient info * move up one row * header, comment
This commit is contained in:
parent
58e4476b7d
commit
0372447650
@ -6,7 +6,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Medical);
|
||||
condition = QGVAR(enableSelfActions);
|
||||
exceptions[] = {"isNotInside", "isNotSitting", "isNotSwimming"};
|
||||
statement = QUOTE([ARR_2(_target,0)] call FUNC(displayPatientInformation));
|
||||
statement = QUOTE([ARR_2(_target,-1)] call FUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
icon = QPATHTOF(ui\cross.paa);
|
||||
#define ACTION_CONDITION condition = "true";
|
||||
@ -40,7 +40,7 @@ class CfgVehicles {
|
||||
displayName = CSTRING(Medical);
|
||||
condition = QUOTE((GVAR(enableActions) == 1 || {GVAR(enableActions) != 2 && {!isNull objectParent _target && {objectParent _target isEqualTo objectParent _player}}}));
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE([ARR_2(_target,0)] call FUNC(displayPatientInformation));
|
||||
statement = QUOTE([ARR_2(_target,-1)] call FUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
icon = QPATHTOF(ui\cross.paa);
|
||||
#define ACTION_CONDITION condition = "true";
|
||||
|
@ -80,7 +80,7 @@ GVAR(selfInteractionActions) = [];
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[ACE_player, 0] call FUNC(displayPatientInformation);
|
||||
[ACE_player, -1] call FUNC(displayPatientInformation);
|
||||
false
|
||||
}, {
|
||||
if (CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)) then {
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#define MAX_DISTANCE 4
|
||||
|
||||
params ["_target", "_selectionN"];
|
||||
params ["_target", ["_selectionN", -1]];
|
||||
|
||||
private _display = uiNamespace getVariable [QGVAR(RscPatientInfo), displayNull];
|
||||
|
||||
@ -34,7 +34,7 @@ if (isNull _display) then {
|
||||
};
|
||||
|
||||
private _target = _display getVariable [QGVAR(target), objNull];
|
||||
private _selectionN = _display getVariable [QGVAR(selectionN), 0];
|
||||
private _selectionN = _display getVariable [QGVAR(selectionN), -1];
|
||||
|
||||
// Close display if target moved too far away (ignore if in same vehicle)
|
||||
if (ACE_player distance _target > MAX_DISTANCE && {vehicle _target != vehicle ACE_player}) exitWith {
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Arguments:
|
||||
* 0: Injury list <CONTROL>
|
||||
* 1: Target <OBJECT>
|
||||
* 2: Body part <NUMBER>
|
||||
* 2: Body part, -1 to only show overall health info <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -102,6 +102,20 @@ if (_target call EFUNC(common,isAwake)) then {
|
||||
};
|
||||
};
|
||||
|
||||
// Skip the rest as they're body part specific
|
||||
if (_selectionN == -1) exitWith {
|
||||
// Add all entries to injury list
|
||||
lbClear _ctrl;
|
||||
|
||||
{
|
||||
_x params ["_text", "_color"];
|
||||
|
||||
_ctrl lbSetColor [_ctrl lbAdd _text, _color];
|
||||
} forEach _entries;
|
||||
|
||||
_ctrl lbSetCurSel -1;
|
||||
};
|
||||
|
||||
_entries pushBack ["", [1, 1, 1, 1]];
|
||||
|
||||
// Add selected body part name
|
||||
|
Loading…
Reference in New Issue
Block a user