mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
803d497d8a
* Add uniqueItems function * Optimize dogtag children actions function * Optimize getDetonators item search * Store CfgWeapons lookup in getDetonators * Update items to use new function * Update items to use new function 2 * More optimization of uniqueItems function * Update items to use new function 3
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
//XEH_clientInit.sqf
|
|
#include "script_component.hpp"
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
//Add deviceKey entry:
|
|
private _conditonCode = {
|
|
"ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))
|
|
};
|
|
private _toggleCode = {
|
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
|
[] call FUNC(openDisplay); //toggle display mode
|
|
};
|
|
private _closeCode = {
|
|
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {};
|
|
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
|
};
|
|
[(localize LSTRING(itemName)), QPATHTOF(images\microDAGR_item.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
|
|
|
|
|
//Add Eventhandler:
|
|
[QEGVAR(vector,rangefinderData), {_this call FUNC(recieveRangefinderData)}] call CBA_fnc_addEventHandler;
|
|
|
|
//Global Variables to default:
|
|
GVAR(gpsPositionASL) = [0,0,0];
|
|
GVAR(mapAutoTrackPosition) = true;
|
|
GVAR(mapShowTexture) = false;
|
|
GVAR(mapPosition) = [-999, -999];
|
|
GVAR(mapZoom) = 0.075;
|
|
GVAR(currentApplicationPage) = APP_MODE_NULL;
|
|
GVAR(currentShowMode) = DISPLAY_MODE_CLOSED;
|
|
|
|
//User Settings
|
|
GVAR(settingUseMils) = false;
|
|
GVAR(settingShowAllWaypointsOnMap) = true;
|
|
|
|
GVAR(newWaypointPosition) = [];
|
|
GVAR(currentWaypoint) = -1;
|
|
GVAR(rangeFinderPositionASL) = [];
|
|
|
|
GVAR(mgrsGridZoneDesignator) = format ["%1 %2",EGVAR(common,MGRS_data) select 0, EGVAR(common,MGRS_data) select 1];
|