Interact menu event consistant

"interactMenuOpened",  to match event from #191
This commit is contained in:
PabstMirror 2015-03-11 12:45:01 -05:00
parent 794a1f9922
commit 858e5def5a
4 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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);

View File

@ -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);