mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
18f09b9310
- ace_addedHeartRateAdjustment -> ace_heartRateAdjustmentAdded - ace_cargoAddedByClass -> ace_cargoByClassAdded - ace_enteredCardiacArrest -> ace_cardiacArrestEntered - ace_itemAddedToTriageCard -> ace_triageCardItemAdded - ace_reload_linkedAmmo -> ace_reload_ammoLinked - ace_reload_returnedAmmo -> ace_reload_ammoReturned - ace_treatmentSuccess -> ace_treatmentSucceded - ace_common_engineOn -> ace_common_setEngine - ace_explosives_clientRequestOrientations -> ace_explosives_requestOrientations - ace_explosives_serverSendOrientations -> ace_explosives_sendOrientations - ace_interaction_lampTurnOff -> ace_interaction_setLampOff - ace_interaction_lampTurnOn -> ace_interaction_setLampOn - ace_overheating_spareBarrelsLoadCoolest -> ace_overheating_loadCoolestSpareBarrel - ace_overheating_spareBarrelsSendTemperatureHint -> ace_overheating_sendSpareBarrelTemperatureHint Close #3533
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
#include "script_component.hpp"
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
GVAR(MenuPFHID) = -1;
|
|
GVAR(lastOpenedOn) = -1;
|
|
GVAR(pendingReopen) = false;
|
|
|
|
["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"]] 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;
|