mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
if (!hasInterface) exitwith {};
|
|
|
|
["medical_treatmentSuccess", {
|
|
|
|
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
|
|
GVAR(pendingReopen) = false;
|
|
[{
|
|
[GVAR(INTERACTION_TARGET)] call FUNC(openMenu);
|
|
}, []] call EFUNC(common,execNextFrame);
|
|
};
|
|
}] call EFUNC(common,addEventhandler);
|
|
|
|
|
|
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey),
|
|
{
|
|
_target = cursorTarget;
|
|
if (!(_target isKindOf "CAManBase") || ACE_player distance _target > 10) then {_target = ACE_player};
|
|
// Conditions: canInteract
|
|
if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false};
|
|
|
|
// Statement
|
|
[_target] call FUNC(openMenu);
|
|
false
|
|
},
|
|
{
|
|
if (ACE_time - GVAR(lastOpenedOn) > 0.5) then {
|
|
[ObjNull] call FUNC(openMenu);
|
|
};
|
|
},
|
|
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
|
|