mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Interact menu event consistant
"interactMenuOpened", to match event from #191
This commit is contained in:
parent
794a1f9922
commit
858e5def5a
@ -20,6 +20,6 @@ if(!GVAR(keyDown)) then {
|
||||
GVAR(keyDown) = true;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interact_keyDown", []] call EFUNC(common,localEvent);
|
||||
["interactMenuOpened", [0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
true
|
||||
|
@ -17,6 +17,8 @@ if(!GVAR(keyDownSelfAction)) then {
|
||||
GVAR(keyDown) = false;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [1]] call EFUNC(common,localEvent);
|
||||
|
||||
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || visibleMap;
|
||||
|
||||
if (GVAR(useCursorMenu)) then {
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["interact_keyDown", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
|
||||
["interactMenuOpened", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
|
||||
|
@ -3,24 +3,28 @@
|
||||
* When interact_menu starts rendering (from "interact_keyDown" event)
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
* Interact Menu Type (0 - world, 1 - self) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_logistics_wirecutter_fnc_interactEH
|
||||
* [0] call ace_logistics_wirecutter_fnc_interactEH
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_interactionType);
|
||||
|
||||
if (_interactionType != 0) exitWith {};
|
||||
|
||||
//for performance only do stuff it they have a wirecutter item
|
||||
//(if they somehow get one durring keydown they'll just have to reopen)
|
||||
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||
|
||||
[{
|
||||
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper"];
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user