mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ddf72d5878
Conflicts: addons/medical/ACE_Medical_SelfActions.hpp addons/medical/CfgVehicles.hpp addons/medical/CfgWeapons.hpp addons/medical/data/model.cfg addons/medical/functions/fnc_treatment.sqf addons/medical/functions/fnc_treatment_failure.sqf addons/medical/functions/fnc_treatment_success.sqf addons/medical/stringtable.xml
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
GVAR(MenuPFHID) = -1;
|
|
GVAR(lastOpenedOn) = -1;
|
|
GVAR(pendingReopen) = false;
|
|
|
|
[] call FUNC(collectActions3D);
|
|
|
|
["ace_treatmentSucceded", {
|
|
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
|
|
GVAR(pendingReopen) = false;
|
|
[{
|
|
[GVAR(INTERACTION_TARGET)] call FUNC(openMenu);
|
|
}, []] call CBA_fnc_execNextFrame;
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey), {
|
|
private _target = cursorTarget;
|
|
if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player};
|
|
|
|
// Conditions: canInteract
|
|
if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
|
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false};
|
|
|
|
// Statement
|
|
[_target] call FUNC(openMenu);
|
|
false
|
|
}, {
|
|
if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith {
|
|
[objNull] call FUNC(openMenu);
|
|
};
|
|
false
|
|
}, [35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;
|