2015-08-02 14:56:27 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-06 21:51:17 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
|
2015-08-08 16:16:25 +00:00
|
|
|
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey),
|
2015-08-06 21:51:17 +00:00
|
|
|
{
|
|
|
|
_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};
|
2015-08-08 18:22:19 +00:00
|
|
|
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitwith {false};
|
2015-08-06 21:51:17 +00:00
|
|
|
|
|
|
|
// Statement
|
|
|
|
[_target] call FUNC(openMenu);
|
|
|
|
false
|
|
|
|
},
|
|
|
|
{
|
2015-08-19 18:32:46 +00:00
|
|
|
if (ACE_time - GVAR(lastOpenedOn) > 0.5) exitWith {
|
2015-08-06 21:51:17 +00:00
|
|
|
[ObjNull] call FUNC(openMenu);
|
|
|
|
};
|
2015-08-19 18:32:46 +00:00
|
|
|
false
|
2015-08-06 21:51:17 +00:00
|
|
|
},
|
2015-08-08 16:16:25 +00:00
|
|
|
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|
2015-08-08 18:22:19 +00:00
|
|
|
|