mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical GUI - Add keybind to show player's patient information display (#9464)
* Add keybind to show patient information display * Return false * Add fadeout delay and associated setting * Switch to CBA setting rounding * Change setting type to time Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Fix incorrect behavior on repeated key presses * Tweak setting name and description * Tweak to prevent overlapping WUAE Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
parent
78bb0514d1
commit
0e2c7167a5
@ -12,6 +12,8 @@ GVAR(pendingReopen) = false;
|
|||||||
|
|
||||||
GVAR(menuPFH) = -1;
|
GVAR(menuPFH) = -1;
|
||||||
|
|
||||||
|
GVAR(peekLastOpenedOn) = -1;
|
||||||
|
|
||||||
GVAR(selfInteractionActions) = [];
|
GVAR(selfInteractionActions) = [];
|
||||||
[] call FUNC(addTreatmentActions);
|
[] call FUNC(addTreatmentActions);
|
||||||
[] call FUNC(collectActions);
|
[] call FUNC(collectActions);
|
||||||
@ -71,6 +73,24 @@ GVAR(selfInteractionActions) = [];
|
|||||||
false
|
false
|
||||||
}, [DIK_H, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
}, [DIK_H, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
||||||
|
|
||||||
|
["ACE3 Common", QGVAR(peekMedicalInfoKey), localize LSTRING(PeekMedicalInfo),
|
||||||
|
{
|
||||||
|
// Conditions: canInteract
|
||||||
|
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
|
|
||||||
|
// Statement
|
||||||
|
[ACE_player, 0] call FUNC(displayPatientInformation);
|
||||||
|
false
|
||||||
|
}, {
|
||||||
|
if (CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)) then {
|
||||||
|
[{
|
||||||
|
CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)
|
||||||
|
}, {QGVAR(RscPatientInfo) cutFadeOut 0.3}] call CBA_fnc_waitUntilAndExecute;
|
||||||
|
};
|
||||||
|
GVAR(peekLastOpenedOn) = CBA_missionTime;
|
||||||
|
false
|
||||||
|
}, [DIK_H, [false, true, false]], false, 0] call CBA_fnc_addKeybind;
|
||||||
|
|
||||||
|
|
||||||
// Close patient information display when interaction menu is closed
|
// Close patient information display when interaction menu is closed
|
||||||
["ace_interactMenuClosed", {
|
["ace_interactMenuClosed", {
|
||||||
|
@ -126,3 +126,12 @@ private _categoryColors = [ELSTRING(medical,Category), format ["| %1 |", LELSTRI
|
|||||||
true,
|
true,
|
||||||
true // isGlobal
|
true // isGlobal
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(peekMedicalInfoReleaseDelay),
|
||||||
|
"TIME",
|
||||||
|
[LSTRING(PeekMedicalInfoReleaseDelay_DisplayName), LSTRING(PeekMedicalInfoReleaseDelay_Description)],
|
||||||
|
[ELSTRING(medical,Category), LSTRING(SubCategory)],
|
||||||
|
[0, 5, 1],
|
||||||
|
false
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
@ -282,6 +282,15 @@
|
|||||||
<Chinese>開起醫療選單</Chinese>
|
<Chinese>開起醫療選單</Chinese>
|
||||||
<Turkish>Medikal Menüyü Aç</Turkish>
|
<Turkish>Medikal Menüyü Aç</Turkish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_GUI_PeekMedicalInfo">
|
||||||
|
<English>Peek Medical Info</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_GUI_PeekMedicalInfoReleaseDelay_DisplayName">
|
||||||
|
<English>Medical Peek Duration</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Medical_GUI_PeekMedicalInfoReleaseDelay_Description">
|
||||||
|
<English>How long the medical info peek remains open after releasing the key.</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Medical_GUI_LoadPatient">
|
<Key ID="STR_ACE_Medical_GUI_LoadPatient">
|
||||||
<English>Load Patient</English>
|
<English>Load Patient</English>
|
||||||
<Spanish>Cargar al paciente en</Spanish>
|
<Spanish>Cargar al paciente en</Spanish>
|
||||||
|
Loading…
Reference in New Issue
Block a user