From e72a9bbba36efbf6c85dd2f8c78dc3acad9c8f30 Mon Sep 17 00:00:00 2001 From: Bjanski Date: Sun, 3 Jul 2016 20:11:58 +0200 Subject: [PATCH] v0.7.7 Build 53 Introduced a new XM8 Apps Introduced a new version of the VG App, compatible with the new system. --- .../addons/exad_vg/Functions/fn_VGLoad.sqf | 2 +- .../addons/exad_vg/Functions/fn_VGStore.sqf | 2 +- .../Exile.Altis/ExAdClient/CfgFunctions.cpp | 1 + .../ExAdClient/Grinding/customize.sqf | 4 +- .../ExAdClient/VirtualGarage/CfgFunctions.cpp | 1 + .../Functions/fn_loadVGContent.sqf | 44 +++++ .../Functions/fn_onBtnClickVG.sqf | 2 +- .../ExAdClient/XM8/Apps/VG/onClose.sqf | 4 + .../ExAdClient/XM8/Apps/VG/onLoad.sqf | 78 ++++++++ .../XM8/Apps/VG/onOpen.sqf} | 14 +- .../ExAdClient/XM8/CfgFunctions.cpp | 34 ++++ .../CustomCode/ExileClient_gui_xm8_show.sqf | 79 ++++++++ .../CustomCode}/ExileClient_gui_xm8_slide.sqf | 50 ++--- .../ExAdClient/XM8/Functions/fn_addApps.sqf | 54 ++++++ .../XM8/Functions/fn_createBackgroundGUI.sqf | 8 + .../XM8/Functions/fn_createButton.sqf | 10 + .../XM8/Functions/fn_createCheckBox.sqf | 9 + .../XM8/Functions/fn_createExtraApps.sqf | 34 ++++ .../XM8/Functions/fn_createFrame.sqf | 8 + .../XM8/Functions/fn_createList.sqf | 9 + .../XM8/Functions/fn_createPicture.sqf | 11 ++ .../XM8/Functions/fn_createStructuredText.sqf | 9 + .../XM8/Functions/fn_getAppCtrl.sqf | 11 ++ .../XM8/Functions/fn_getNextIDC.sqf | 6 + .../Exile.Altis/ExAdClient/XM8/customize.sqf | 17 ++ .../Exile.Altis/ExAdClient/XM8/postInit.sqf | 32 ++++ .../Exile.Altis/XM8_apps/Icons/apps_icon.paa | Bin 22016 -> 0 bytes .../XM8_apps/Icons/generic_app.paa | Bin 22016 -> 0 bytes .../Exile.Altis/XM8_apps/XM8_apps_config.sqf | 13 -- .../Exile.Altis/XM8_apps/XM8_apps_sliders.hpp | 14 -- .../XM8_apps/apps/XM8_VG/Icons/apps_icon.paa | Bin 5625 -> 0 bytes .../XM8_apps/apps/XM8_VG/XM8_VG_config.sqf | 23 --- .../apps/XM8_VG/scripts/XM8_VG_init.sqf | 27 --- .../XM8_VG/scripts/XM8_VG_loadContent.sqf | 46 ----- .../scripts/XM8_VG_mainVGSlide_onLoad.sqf | 157 ---------------- .../scripts/ExileClient_gui_xm8_show.sqf | 175 ------------------ .../ExileClient_gui_xm8_slide_apps_onOpen.sqf | 47 ----- .../XM8_apps/scripts/XM8_apps_init.sqf | 28 --- mpmissions/Exile.Altis/config.cpp | 22 ++- 39 files changed, 500 insertions(+), 585 deletions(-) create mode 100644 mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf rename mpmissions/Exile.Altis/{XM8_apps/apps/XM8_VG/scripts/XM8_VG_checkNearByFlags.sqf => ExAdClient/XM8/Apps/VG/onOpen.sqf} (61%) create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf rename mpmissions/Exile.Altis/{XM8_apps/scripts => ExAdClient/XM8/CustomCode}/ExileClient_gui_xm8_slide.sqf (52%) create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf create mode 100644 mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/Icons/apps_icon.paa delete mode 100644 mpmissions/Exile.Altis/XM8_apps/Icons/generic_app.paa delete mode 100644 mpmissions/Exile.Altis/XM8_apps/XM8_apps_config.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/XM8_apps_sliders.hpp delete mode 100644 mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/Icons/apps_icon.paa delete mode 100644 mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/XM8_VG_config.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_init.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_loadContent.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_mainVGSlide_onLoad.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_show.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide_apps_onOpen.sqf delete mode 100644 mpmissions/Exile.Altis/XM8_apps/scripts/XM8_apps_init.sqf diff --git a/@ExileServer/addons/exad_vg/Functions/fn_VGLoad.sqf b/@ExileServer/addons/exad_vg/Functions/fn_VGLoad.sqf index 7794999..04fa481 100644 --- a/@ExileServer/addons/exad_vg/Functions/fn_VGLoad.sqf +++ b/@ExileServer/addons/exad_vg/Functions/fn_VGLoad.sqf @@ -35,7 +35,7 @@ _vehList = _flag getVariable ["ExAdVGVeh", []]; } }forEach _vehList; -if(!_proceed)exitWith{[_requestFrom, "notificationRequest", ["Whoops", [STR_ExAd_VG_NOTI_NOT_AVAILABLE]]] call ExileServer_system_network_send_to}; +if(!_proceed)exitWith{[_owner, "toastRequest", ["ErrorTitleAndText", ["ExAd - Virtual Garage", STR_ExAd_VG_NOTI_NOT_AVAILABLE]]] call ExileServer_system_network_send_to}; _flag setVariable ["ExAdVGVeh", _vehList, true]; diff --git a/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf b/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf index 8b73cf8..1397d17 100644 --- a/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf +++ b/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf @@ -24,7 +24,7 @@ _flag = objectFromNetId _flagNetId; _owner = owner _objVeh; _player = {if(owner _x == _owner)exitWith{_x}}forEach playableUnits; -if!(_objVeh getVariable ["ExileIsPersistent", false])exitWith{[_owner, "notificationRequest", ["Whoops", [STR_ExAd_VG_NOTI_NOT_PERSISTENT]]] call ExileServer_system_network_send_to; false}; +if!(_objVeh getVariable ["ExileIsPersistent", false])exitWith{[_owner, "toastRequest", ["ErrorTitleAndText", ["ExAd - Virtual Garage", STR_ExAd_VG_NOTI_NOT_PERSISTENT]]] call ExileServer_system_network_send_to;false}; if!(_objVeh setOwner 2)exitWith{format["Get out of the vehicle before storing it."] remoteExec ["hint", _owner]; false}; diff --git a/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp index ff2310c..4973641 100644 --- a/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp +++ b/mpmissions/Exile.Altis/ExAdClient/CfgFunctions.cpp @@ -26,4 +26,5 @@ class ExAd //#include "Hacking\CfgFunctions.cpp" //#include "Grinding\CfgFunctions.cpp" //#include "HaloParachute\CfgFunctions.cpp" + //#include "XM8\CfgFunctions.cpp" }; diff --git a/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf index 7edbe85..14adcbc 100644 --- a/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/Grinding/customize.sqf @@ -16,11 +16,11 @@ limitations under the License. */ -ExAd_GRINDING_PROGRESS_INTERVALL = 60; //SCALAR - Grinding, interval time measured in seconds. +ExAd_GRINDING_PROGRESS_INTERVALL = 5; //SCALAR - Grinding, interval time measured in seconds. ExAd_GRINDING_PROGRESS = 30; //SCALAR - Damage each finished interval will take from the code lock. -ExAd_GRINDING_OBJECT_MAX = 900; //SCALAR - Code lock sustainability. +ExAd_GRINDING_OBJECT_MAX = 300; //SCALAR - Code lock sustainability. ExAd_GRINDING_PROGRESSBAR_POS = "Mid"; //SCALAR/STRING - You can use values between 0.3-2 or using "LOW"|"MID"|"HIGH" diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp index 1f16de0..e8cb588 100644 --- a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/CfgFunctions.cpp @@ -23,6 +23,7 @@ class VirtualGarage class allowedVGVeh {}; class allowVGStore {}; class fillVGList {}; + class loadVGContent {}; class loadVGDetailView {}; class onBtnClickVG {}; class postInitVG {file = "ExAdClient\VirtualGarage\postInit.sqf"; postInit = 1;}; diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf new file mode 100644 index 0000000..86f117e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_loadVGContent.sqf @@ -0,0 +1,44 @@ +/* + fn_loadVGContent.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private ["_display","_error","_slides","_flag","_allowedVeh","_storedVeh","_strTxtVehCntColor","_strTxtVehCnt"]; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; +if (isNull _display) exitWith {_error = "Error loading XM8 VG app, display is null"; systemChat _error; diag_log _error;}; + +_slides = _display displayCtrl 4007; +if (isNull _slides) exitWith {_error = "Error loading XM8 VG app, slides control is null"; systemChat _error; diag_log _error;}; + +_flag = if(typeName ExAdCurFlagNetId == "STRING")then{objectFromNetId ExAdCurFlagNetId}else{ExAdCurFlagNetId}; + +_allowedVeh = _flag call ExAd_fnc_allowedVGVeh; +_storedVeh = count (_flag getVariable ["ExAdVGVeh", []]); +_strTxtVehCntColor = if(_allowedVeh > _storedVeh)then{"#FFFFFF"}else{"#B22400"}; + +_strTxtVehCnt = [_display,"ExAd_VG","SubTitle1Cnt"] call ExAd_fnc_getAppCtrl; +_strTxtVehCnt ctrlSetStructuredText parseText format ["%2/%3",_strTxtVehCntColor,_storedVeh,_allowedVeh]; + +[(objectFromNetId ExAdCurFlagNetId) getVariable ["ExAdVGVeh", []],ctrlIDC ([_display,"ExAd_VG","StoreVehList"] call ExAd_fnc_getAppCtrl)] call ExAd_fnc_fillVGList; +for "_i" from 0 to 3 do { + _index = lbAdd[ctrlIDC ([_display,"ExAd_VG","StoreVehList"] call ExAd_fnc_getAppCtrl),""]; +}; + +[[_flag, ExAd_VG_ALLOWED_VEH_TYPE,_flag getVariable ["ExileTerritorySize", 50]] call ExAd_fnc_getNearByLocalVeh,ctrlIDC ([_display,"ExAd_VG","NearVehicleList"] call ExAd_fnc_getAppCtrl)] call ExAd_fnc_fillVGList; + +([_display,"ExAd_VG","InfoCB"] call ExAd_fnc_getAppCtrl) cbSetChecked ((profileNamespace getVariable["ExAd_StreamFriendlyUI",0]) == 1); + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf index 4e6ed72..5b80d24 100644 --- a/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/VirtualGarage/Functions/fn_onBtnClickVG.sqf @@ -30,7 +30,7 @@ _data = lbData [_idc, lbCurSel _idc]; diag_log str _data; if(count _data == 0)then{ - ['Whoops', ["You have to choose a vehicle in the proper list!!"]] call ExileClient_gui_notification_event_addNotification; + ["ErrorTitleAndText", ["ExAd - Virtual Garage", "You have to choose a vehicle in the proper list!!"]] call ExileClient_gui_toaster_addTemplateToast; }else{ [_fnc, [_data, ExAdCurFlagNetId, netId player]] call ExAd_fnc_serverDispatch; closeDialog 0; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf new file mode 100644 index 0000000..08e1c45 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onClose.sqf @@ -0,0 +1,4 @@ +if (ExileClientXM8CurrentSlide == "ExAd_VG") then { + ExileClientXM8CurrentSlide = "apps"; +}; +ExAdCurFlagNetId = nil; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf new file mode 100644 index 0000000..20b9a0e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onLoad.sqf @@ -0,0 +1,78 @@ +/* + fn_createExtraApps.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; +_leftCol = 1; +_leftColW = 12.8; +_rightCol = _leftCol + _leftColW + 2; +_rightColW = _leftColW + 3; +_margin = 0.2; + +[_display,_slide,(["ExAd_VG","backButton"] call ExAd_fnc_getNextIDC),[27.6 * _pW, 17.7 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK] call ExAd_fnc_createButton; + +/*Stored Vehicle Details*/ +[_display,_slide,(["ExAd_VG","InfoTitle"] call ExAd_fnc_getNextIDC),[_rightCol * _pW, 2.75 * _pH, _rightColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_DETAILS,"PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","InfoBgBox"] call ExAd_fnc_getNextIDC),[_rightCol * _pW, 4 * _pH, _rightColW * _pW, 13.5 * _pH]] call ExAd_fnc_createBackgroundGUI; + +_idcInfoPic = ["ExAd_VG","InfoPic"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcInfoPic,[(_rightCol + 9) * _pW, 4 * _pH, 6.75 * _pW, 5.5 * _pH],"",[1,1,1,1],false,true,""] call ExAd_fnc_createPicture; + +_idcInfoStr = ["ExAd_VG","InfoVehStr"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcInfoStr,[(_rightCol + _margin) * _pW, (4 + _margin) * _pH, (_rightColW - 2 * _margin) * _pW, (13.5 - 2 * _margin) * _pH],"","PuristaMedium",0.75,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","InfoCBStr"] call ExAd_fnc_getNextIDC),[(_rightCol + _margin + 0.4) * _pW, (16.5 - _margin + 0.25 ) * _pH, (_rightColW - 2 * _margin) * _pW, (13.5 - 2 * _margin) * _pH],STR_ExAd_VG_APP_CB_SECRET,"PuristaMedium",0.65,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","InfoCB"] call ExAd_fnc_getNextIDC),[(_rightCol + _margin) * _pW, (16.5 - _margin + 0.2) * _pH, 0.75 * _pW, 0.75 * _pH],'profileNamespace setVariable["ExAd_StreamFriendlyUI",_this select 1]',"Toogle - Stream friendly UI"] call ExAd_fnc_createCheckBox; + +/*Stored Vehicles*/ +[_display,_slide,(["ExAd_VG","SubTitle1"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 2.75 * _pH, _leftColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_STORED,"PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +[_display,_slide,(["ExAd_VG","SubTitle1Cnt"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 3 * _pH, _leftColW * _pW, 1 * _pH],"","PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; + +_idcStoredVehList = ["ExAd_VG","StoreVehList"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcStoredVehList,[_leftCol * _pW, 4 * _pH, _leftColW * _pW, 5 * _pH],format["[_this select 0,%1,%2] call XM8_VG_elChanged",_idcInfoPic,_idcInfoStr],""] call ExAd_fnc_createList; + +[_display,_slide,(["ExAd_VG","fetchButton"] call ExAd_fnc_getNextIDC),[_leftCol*_pW, 9*_pH, _leftColW*_pW, 1*_pH],format["disableUserInput true;['VGLoad', %1] call ExAd_fnc_onBtnClickVG",_idcStoredVehList],STR_ExAd_VG_APP_BTN_FETCH,""] call ExAd_fnc_createButton; + +/*Nearby vehicles*/ +[_display,_slide,(["ExAd_VG","SubTitle2"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 10.25 * _pH, _leftColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_NEAR,"PuristaMedium",1.2,"#ffffff","left",1] call ExAd_fnc_createStructuredText; + +_idcNearVehList = ["ExAd_VG","NearVehicleList"] call ExAd_fnc_getNextIDC; +[_display,_slide,_idcNearVehList,[_leftCol * _pW, 11.5 * _pH, _leftColW * _pW, 5 * _pH],"",""] call ExAd_fnc_createList; + +[_display,_slide,(["ExAd_VG","storeButton"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 16.5 * _pH, _leftColW * _pW, 1 * _pH],format["if(call ExAd_fnc_allowVGStore)then{disableUserInput true;['VGStore', %1] call ExAd_fnc_onBtnClickVG}else{['ErrorTitleAndText', ['ExAd - Virtual Garage', '%2']] call ExileClient_gui_toaster_addTemplateToast}",_idcNearVehList,STR_ExAd_VG_NOTI_FULL],STR_ExAd_VG_APP_BTN_STORE,""] call ExAd_fnc_createButton; + +XM8_VG_elChanged = { + params ["_listCtrl","_picCtrl","_strCtrl","_ref","_data","_pic"]; + + _ref = _listCtrl lbData (lbCurSel _listCtrl); + _data = {if(str (_x select 0) == _ref)exitWith{_x}}forEach ((objectFromNetId ExAdCurFlagNetId) getVariable["ExAdVGVeh",[]]); + if(!isNil "_data")then{ + _pic = getText(configFile >> "CfgVehicles" >> (_data select 1) >> "picture"); + ctrlSetText [_picCtrl, _pic]; + ["requestVGDetailInfo", [_ref, ExAdCurFlagNetId, (profileNamespace getVariable["ExAd_StreamFriendlyUI",0]), netId player, _strCtrl]] call ExAd_fnc_serverDispatch; + }else{ + ctrlSetText [_picCtrl, ""]; + ["",_strCtrl] call ExAd_fnc_loadVGDetailView; + } +}; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_checkNearByFlags.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onOpen.sqf similarity index 61% rename from mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_checkNearByFlags.sqf rename to mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onOpen.sqf index 53f14aa..97403d1 100644 --- a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_checkNearByFlags.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/VG/onOpen.sqf @@ -1,10 +1,3 @@ -/* -function: XM8_VG_checkNearByFlags -file: XM8_VG\scripts\XM8_VG_checkNearByFlags.sqf - -XM8 VG By Jan Babor -Part of the ExAd Virtual Garage script -*/ private ["_flags","_flag"]; _flags = nearestObjects [player,["Exile_Construction_Flag_Static"],150]; @@ -21,8 +14,7 @@ try if((([_flag, getPlayerUID player] call ExileClient_util_territory_getAccessLevel) select 0) >= ExAd_VG_ACCESS_LEVEL)then{ ExAdCurFlagNetId = netId _flag; - ["mainVGSlide", 0] call ExileClient_gui_xm8_slide; - call XM8_VG_loadContent; + call ExAd_fnc_loadVGContent; } else { @@ -31,6 +23,6 @@ try } catch { - ["Whoops", [_exception]] call ExileClient_gui_notification_event_addNotification; - ["sideApps", 1] call ExileClient_gui_xm8_slide + ["ErrorTitleAndText", ["ExAd - Virtual Garage", _exception]] call ExileClient_gui_toaster_addTemplateToast; + ["extraApps", 1] call ExileClient_gui_xm8_slide } \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp new file mode 100644 index 0000000..be363d6 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp @@ -0,0 +1,34 @@ +/* + CfgFunctions.cpp + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +class XM8_Apps +{ +file = "ExAdClient\XM8\Functions"; + class addApps {}; + class createBackgroundGUI {}; + class createButton {}; + class createCheckBox {}; + class createExtraApps {}; + class createFrame {}; + class createList {}; + class createPicture {}; + class createStructuredText {}; + class getAppCtrl {}; + class getNextIDC {}; + class postInitXM8 {file = "ExAdClient\XM8\postInit.sqf"; postInit = 1;}; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf new file mode 100644 index 0000000..4668a5b --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_show.sqf @@ -0,0 +1,79 @@ +/** + * ExileClient_gui_xm8_show + * + * Exile Mod + * www.exilemod.com + * © 2015 Exile Mod Team + * + * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + */ + +private["_display","_control","_slideControlID","_slideName","_slideTitle","_slideControl","_titleControl","_toSlideOpenFunction"]; +disableSerialization; +createDialog "RscExileXM8"; +ExileClientXM8IsVisible = true; +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; +if (ExileClientXM8IsPowerOn) then +{ + _control = _display displayCtrl 4002; + _control ctrlSetFade 1; + _control ctrlCommit 0; +} +else +{ + { + _control = _display displayCtrl _x; + _control ctrlSetFade 1; + _control ctrlCommit 0; + } + forEach + [ + 4002, + 4003, + 4004, + 4005, + 4007, + 4001, + 4010, + 4030, + 4020 + ]; +}; +true call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur; +if (ExileClientXM8CurrentSlide isEqualTo "party") then +{ + if (ExileClientPartyID isEqualTo -1) then + { + ExileClientXM8CurrentSlide = "apps"; + }; +}; + +call ExAd_fnc_createExtraApps; +{ + _slideControlID = getNumber (_x >> "controlID"); + _slideName = configName _x; + _slideTitle = getText (_x >> "title"); + _slideControl = _display displayCtrl _slideControlID; + if (_slideName isEqualTo ExileClientXM8CurrentSlide) then + { + _titleControl = _display displayCtrl 4004; + _titleControl ctrlSetStructuredText (parseText (format ["%1", _slideTitle])); + _slideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)]; + _slideControl ctrlCommit 0; + _slideControl ctrlShow true; + _toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _slideName], ""]; + if !(_toSlideOpenFunction isEqualTo "") then + { + call _toSlideOpenFunction; + }; + } + else + { + _slideControl ctrlShow false; + }; +} +forEach (("true" configClasses (configFile >> "CfgXM8")) + ("true" configClasses (missionConfigFile >> "CfgXM8"))); + +ExileXM8ThreadHandle = [10, ExileClient_gui_xm8_thread_update, [], true] call ExileClient_system_thread_addtask; +call ExileClient_gui_xm8_thread_update; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf similarity index 52% rename from mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide.sqf rename to mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf index a61765f..e629f3f 100644 --- a/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide.sqf +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CustomCode/ExileClient_gui_xm8_slide.sqf @@ -4,36 +4,31 @@ * Exile Mod * www.exilemod.com * © 2015 Exile Mod Team - * + * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ -// XM8 apps Imporeved by vitaly'mind'chizhikov -// Based on idea XM8 apps by Shix. see http://www.exilemod.com/topic/9040-xm8-apps/?page=1 -// Original function from Exile 0.9.6 - -private["_try","_toSlideName","_direction","_display","_toSlideControlID","_toSlideControl","_toSlideTitle","_titleControl","_toSlideOpenFunction","_fromSlideControlID","_fromSlideControl","_fromSlideCloseFunction"]; +private["_toSlideName","_direction","_display","_toSlideControlID","_toSlideControl","_toSlideTitle","_titleControl","_toSlideOpenFunction","_fromSlideControlID","_fromSlideControl","_fromSlideCloseFunction"]; disableSerialization; _toSlideName = _this select 0; _direction = _this select 1; -_display = displayNull; + if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then { _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; - _toSlideControlID = getNumber (configFile >> "CfgXM8" >> _toSlideName >> "controlID"); - //Lets try read MissionConfig, maybe we have custom slide - _try = (missionConfigFile >> "CfgXM8" >> _toSlideName >> "controlID") call BIS_fnc_getCfgData; - if (!isNil "_try") then {_toSlideControlID = _try}; - + //Manipulate the source of config data + _src = if(isClass(configFile >> "CfgXM8" >> _toSlideName))then{configFile}else{missionConfigFile}; + _toSlideControlID = getNumber (_src >> "CfgXM8" >> _toSlideName >> "controlID"); _toSlideControl = _display displayCtrl _toSlideControlID; - _toSlideTitle = getText (configFile >> "CfgXM8" >> _toSlideName >> "title"); - //Lets try read MissionConfig, maybe we have custom slide - _try = (missionConfigFile >> "CfgXM8" >> _toSlideName >> "title") call BIS_fnc_getCfgData; - if (!isNil "_try") then {_toSlideTitle = _try}; - + //Add extra apps + if(_toSlideName == "extraApps")then{ + call ExAd_fnc_addApps; + }; + _toSlideTitle = getText (_src >> "CfgXM8" >> _toSlideName >> "title"); + _titleControl = _display displayCtrl 4004; _titleControl ctrlSetStructuredText (parseText (format ["%1", _toSlideTitle])); _toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _toSlideName], ""]; @@ -41,12 +36,11 @@ if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then { call _toSlideOpenFunction; }; - _fromSlideControlID = getNumber (configFile >> "CfgXM8" >> ExileClientXM8CurrentSlide >> "controlID"); - //Lets try read MissionConfig, maybe we have custom slide - _try = (missionConfigFile >> "CfgXM8" >> ExileClientXM8CurrentSlide >> "controlID") call BIS_fnc_getCfgData; - if (!isNil "_try") then {_fromSlideControlID = _try}; - + //Manipulating the source of config data + _src2 = if(isClass(configFile >> "CfgXM8" >> ExileClientXM8CurrentSlide))then{configFile}else{missionConfigFile}; + _fromSlideControlID = getNumber(_src2 >> "CfgXM8" >> ExileClientXM8CurrentSlide >> "controlID"); + _fromSlideControl = _display displayCtrl _fromSlideControlID; _fromSlideCloseFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onClose", ExileClientXM8CurrentSlide], ""]; if !(_fromSlideCloseFunction isEqualTo "") then @@ -74,14 +68,4 @@ if !(ExileClientXM8CurrentSlide isEqualTo _toSlideName) then _fromSlideControl ctrlCommit 0.25; }; ExileClientXM8CurrentSlide = _toSlideName; -}; - -//Lets hide old territory button, as we already made new one early on in ExileClient_gui_xm8_show. -//Why we make new? Because if button is re-possition it will render picture (textureNoShortcut) incorrectly. -private ["_sliders","_appSlide","_oldTerritoryBut"]; -_sliders = _display displayCtrl 4007; -_appSlide = _sliders controlsGroupCtrl 4040; -_oldTerritoryBut = _appSlide controlsGroupCtrl 1113; -_oldTerritoryBut ctrlShow false; -_oldTerritoryBut ctrlSetFade 0; -_oldTerritoryBut ctrlCommit 0; \ No newline at end of file +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf new file mode 100644 index 0000000..1971178 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_addApps.sqf @@ -0,0 +1,54 @@ +/* + fn_addApps.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private["_apps","_count","_title","_display"]; + +_apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps"); +if(count _apps == 0)exitWith{false}; + +_count = 10; +_count2 = 5000; +_title = "ExAd"; + +while {_title != ""} do +{ + _count = _count + 1; + _count2 = _count2 + 1; + _count = if(_count > 15)then{ + if(_count > 25)then{ + if(_count < 31)then{31}else{_count} + }else{ + if(_count < 21)then{21}else{_count} + } + }else{ + _count + }; + _title = getText(configFile >> "RscExileXM8" >> "Controls" >> "Slides" >> "Controls" >>"SlideExtraApps" >> "Controls" >> format["App%1", _count] >> "text"); +}; + +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +{ + private["_ctrl"]; + _ctrl = (_display displayCtrl _count2); + _ctrl ctrlSetText getText(missionConfigFile >> "CfgXM8" >> _x >> "title"); + _ctrl ctrlSetEventHandler ["ButtonClick", format["['%1', 0] call ExileClient_gui_xm8_slide",_x]]; + + _count2 = _count2 + 1; +}forEach _apps; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf new file mode 100644 index 0000000..e580be0 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createBackgroundGUI.sqf @@ -0,0 +1,8 @@ +params ["_display","_parent","_idc","_position","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscBackgroundGUI", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlCommit 0; +_ctrl ctrlSetBackgroundColor [0,0,0,0.5]; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf new file mode 100644 index 0000000..7659a5e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createButton.sqf @@ -0,0 +1,10 @@ +params ["_display","_parent","_idc","_position",["_action",""],["_text",""],["_tooltip",""],"_ctrl"]; + +_ctrl = _display ctrlCreate ["RscButtonMenu",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetText _text; +_ctrl ctrlSetEventHandler ["ButtonClick",_action]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf new file mode 100644 index 0000000..cf29ecc --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCheckBox.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscCheckBox",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["CheckedChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf new file mode 100644 index 0000000..096be05 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createExtraApps.sqf @@ -0,0 +1,34 @@ +/* + fn_createExtraApps.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +private["_apps","_display"]; + +_apps = getArray(missionConfigFile >> "CfgXM8" >> "extraApps"); +_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + +{ + call compile format["ExAd_XM8_MAP_%1 = [];",_x]; + + if(isClass(missionConfigFile >> "CfgXM8" >> _x))then{ + _idc = getNumber(missionConfigFile >> "CfgXM8" >> _x >> "controlID"); + _slide = _display ctrlCreate ["RscExileXM8Slide",_idc, _display displayCtrl 4007]; + [_display, _slide, _idc]call compile preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onLoad"); + _slide ctrlShow false; + } +}forEach _apps; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf new file mode 100644 index 0000000..e254e1e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createFrame.sqf @@ -0,0 +1,8 @@ +params ["_display","_parent","_idc","_position","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscFrame", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlEnable false; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf new file mode 100644 index 0000000..46de465 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createList.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_actionOnSelChanged","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscListBox",_idc,_parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged]; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf new file mode 100644 index 0000000..852f479 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createPicture.sqf @@ -0,0 +1,11 @@ +params ["_display","_parent","_idc","_position","_picture","_color","_enable","_keepAspect","_tooltip","_ctrl"]; + +_ctrl = _display ctrlCreate [(if (_keepAspect) then {"RscPictureKeepAspect"} else {"RscPicture"}), _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetText _picture; +_ctrl ctrlSetTextColor _color; +_ctrl ctrlEnable _enable; +_ctrl ctrlSetTooltip _tooltip; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf new file mode 100644 index 0000000..53dfa25 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createStructuredText.sqf @@ -0,0 +1,9 @@ +params ["_display","_parent","_idc","_position","_text","_font","_size","_color","_align","_shadow","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscStructuredText", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetStructuredText (parseText format ["%1", _text,_size,_color, _align,_font,_shadow]); +_ctrl ctrlEnable false; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf new file mode 100644 index 0000000..ace02c5 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getAppCtrl.sqf @@ -0,0 +1,11 @@ +params ["_display","_slide","_key","_map","_index",["_ctrl", controlNull]]; + +_map = call compile format["ExAd_XM8_MAP_%1",_slide]; +_index = _map find _key; + +if (_index != -1) then { + _idc = ((getNumber (missionConfigFile >> "CfgXM8" >> _slide >> "controlID")) + _index); + _ctrl = _display displayCtrl _idc; +}; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf new file mode 100644 index 0000000..84a9f82 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_getNextIDC.sqf @@ -0,0 +1,6 @@ +params ["_slide","_key","_baseIDC","_map"]; + +_baseIDC = getNumber (missionConfigFile >> "CfgXM8" >> _slide >> "controlID"); +_map = call compile format["ExAd_XM8_MAP_%1",_slide]; + +(_baseIDC + (_map pushBack _key)) \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf new file mode 100644 index 0000000..c8508d9 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/customize.sqf @@ -0,0 +1,17 @@ +/* + customize.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf new file mode 100644 index 0000000..f34de5c --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/postInit.sqf @@ -0,0 +1,32 @@ +/* + postInit.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +_path = "ExAdClient\XM8\customize.sqf"; +call compile preprocessFileLineNumbers _path; + +{ + if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen"))then{ + _code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onOpen")); + missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onOpen",_x], _code]; + }; + + if(isText(missionConfigFile >> "CfgXM8" >> _x >> "onClose"))then{ + _code = compileFinal (preprocessFileLineNumbers getText(missionConfigFile >> "CfgXM8" >> _x >> "onClose")); + missionNamespace setVariable [format["ExileClient_gui_xm8_slide_%1_onClose",_x], _code]; + }; +}forEach (getArray(missionConfigFile >> "CfgXM8" >> "extraApps")); \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/Icons/apps_icon.paa b/mpmissions/Exile.Altis/XM8_apps/Icons/apps_icon.paa deleted file mode 100644 index caef81d4e5ffc5a6002bf58d9e74e0e4dd9195b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHP4NO(%8U9YW2StQl3wJT0$W6rBkuE7+db@?idzc$PQ^#$*SDUy^g*4NYpR}oL zx;k*!5SMf~XUS}3u4`SpY>lGZ(P|rED%#j0n^_0mD67zlx(UQHyyyFUzay&o`MKW3`73g5jIkRxZn(JoMD8+@RXCFKbC>3kEZ{@( z^1Qqv3ID6{sl}gPco=)p%h+xoV_o=+-BnW>(%8dWAuR+f1S|wB1S|wB1S|wB1S|wB z1nxcr3aHAqZdGN>=W~dw56Wf!f__X_NQT!zdAH z;N-eReJ#DpU>(n2z^s(=C5IdQpCwN%9<$e0DH-apn{b!3tS9wbT_o5UuF?3e{|r8Y z$FJ*wm(@cqyvNWJpCykEkNRGOXT?W#JRSOP2>(^=9w#n@(x1dhrJqIP|0*l^Stc$j zjTdfmOY{GqdOIuJZo@@*I^YbJ4Zc;2{|Qxs_gUeN%)%WUZyyFYcE4Qq(6ENK5B=S& zkD1~oQEzYKugJ^V-Pdso;~(_C2|T{0|A-&6{#*P{D7{e=%Q#k99=NHEZ$u1m(mzs% zn;MhS_;V+DQy=YN>-=)V3@-a}*%>8Jp~&SqToy!ec4uRt!>ybl+2fI@o`X#9{#@x2s3 zMrZLKBY?3+kMjJdA8AbQx}Kr%=ig>yj-Kkk40RaYgEk*e_#KouXf8^|I4C6xcAA-SPRz0TVU>MZQ0_QB$RDoDOX9uv&J(C_Y_kIQHu%sse+zEL;I+70e$tq~IWVC=tvSBI!S){vj| zX;q(_1oh(Q)yOHqtPfH6H}e-wZdTm1Im#VX%pCqs=l{x8Ookeh_lvh4q zUdziTkUo3}D#G+(c2FNWRnmv#ZI#KF^KT*$=Krw7HS;ymvYG#Xw96$qa!DHHGac6d z7rC+dJGf_5{q4Ug(B^c=zaN`_T+cP6)Y~jC>`zcK^wLQvS9~}0;lR@!R60RS^@v#M z3D<{-<~Le;3C`?!UAQQm4Gwsb{WtVZi#a0x6z~5y4iEM!EfpBQpio#J8&Mv*4>xLg zrB;vC6Alv`mR4kNDXArH_~SbZ$6xS?K6G784J$Q z@=I$`|9i@PKVNTTSa75?rqX3G+je8UixxPt7`vn82eY<1Fpeh7X$UbKGC-h{i*e}#WG^%PCg@A>Cg@A>Cg}~j8fJD2H_8c_;qA+y9$pYJ`9 zW{*pDV-3R{IHxUQz-(oSx+fDbXfo`YrkT8?UaeCu_6D@_VdM49d;1tJl09%lAvq^L z8mlCQ$)@_V4OM+Ja8Z0%?MOUuczFGW6Te@WUKIbY_R3{xatRLmK);}Gw&&LLtNZe{ z8fm2*IuJO&@ss<>-z!PjNYCM&5ovf{U3almNQh{P<^=+Cf{lG$1xvc8Qpe*18)DDG{@`_n_mcun=+bOqb4LsVPs3D~3-RND&LcoWaDvzywdXEI*}f!($)*z}t0!Q)&&b9VzpPODz>ji(xit^fRHhPVHq8+se#T|EEgPc(hh< ze97!`yzO7*zRHTvVL3u*bF=>;7DqT6_^U&vZS8T&%ZK%Et22aX%E zx{vOLwh^>YVfph|A=&<(d$8u%(AV^Ec6BJ55(t*J=J3A2`C83PeN6oyj~&*YI+p2p z!vhVD!?eve0dml6UPAhB>~DpBXl5GNm-l(m@~i054SY6SqJP6phMc1AdfdNX+qScN zyi~rOMte%-)vFU~AINg0DNBTkQ!4~&$0@I;^uperF}Im_ySy91VO{T8(`oCR zw~Bt!Ub|Vdu0XrF*VOEp@5&*O0&E-UYHm3MJ} z^eZ2jtbNV-vz+lwTZ+#m|K~$Jee`-_Bm4H>7ku{-K1}4Z9#`bFF4p{4UM0TD_^=(V zte9PlqmnR~qxzwGwhixW-2VE;{)L7Lx?Xk7>w4^`y#68}GUxyEvys+rISRlp(%vS+ zCvCL59`<&bEX7rvR(J!+BR{nH-~9KM-}Iec-EHKj4o40XW_mG+>s5o@$S*(mVrxYw zvY|9)B^E^N<|dl>H_KVqP#!?S`E>x0LAA3szEqQ0u1~BJ81T|$91lY_+&S@Wl$mba zF4;~?fdZ5H?Bc#Sss?BkG+BFz2X&@q*(H-2;2eV%URw7~-kP@fvNn>1+}zydCfFL| z%C2RLDGzg)FquBe#FXqgDcK}T2*09XMd`^ErF`@TQSc1V>{vf!?{Kgk7k|+Ge7F7* z8o>4CmuFsROKLdF<70Ln&$b0;Q?SwS#hdbf{8CFvkOl;Jfc-c)`XHm9nQSJL7+b{( zpJCrxvVf8WRi5Mu`NEf;tbbaUS?cRAz4B+BO}rGvm-v3-iz}T5+mg?Q78Q6N6%KVC N`pU2I5K=_L{SVUx6Wag) diff --git a/mpmissions/Exile.Altis/XM8_apps/Icons/generic_app.paa b/mpmissions/Exile.Altis/XM8_apps/Icons/generic_app.paa deleted file mode 100644 index 0ce2f5b56bfca305973e9012a1369fa6148d2e5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPeQaA-6+d>I)rPsTw0SAeXfLX}si8w+BBjy_vD-CSv{snRFELTJy>l*wxbRvjM=hYuA3vanQGyFhfVU#kZ%K zumwMaA8T&@h8O)|{2W5hVLw1L0B}ME_#1wf?!uIZcj@uXn5G0w378W2q!M@r6L{BW zv}6ogf9cTx-d7v0OUAkr2j~7GG;vLP894gs(i~%|kFi%=b5&JUI__(u@vCw%KuA%P zLvOOoy^Q7b{o6l6eK<3BRcrrRyBFubug!u^=UeqvE(TC~dV20V+Y;Krrg8cPAn!hB z`P_}mnU=Yq%xkuAmU>3a2aEt{Yg0(3?BXXGMhcZ?SG;EZF{O^{)_A* z9v(n_`1~JgGPUfD?5GH^?$qkihvoBM8RJ3vCQ`|!o2a(Pepkb5v%h0ACq0CbfB843 zDZGYb90TOvo*{f>tJ*q{zx(Dk_tBxb^XzDoHePI_`EqMSoHA=c6>(qf z{AYQ@ektPW3X1dBeRdfqv|9LR`d}W8xQyYb929>Rtb_2G!6d84_`%>0LTBm{XX_Fb zLG}WbTt5Gl*-TKAA47SdbmYp#)Sj`ZUVqhBfHPo~@S@+bKM985k%$K`N?nO=`TW<8 zqB-U4hp`Rs7}tlDhogq}nEWp^KPs>Xv;%T9YN~e*S1&g0pA)=h_|DgFlm9ILNj5Yz zB=rCJ_K(rJ0v&pPfw<8f*KrahD+%c_-0St~;fQ5fm`^N#YobE{l%iKR>^( z<>e1nhhDzwE5IiIDAly1dZbH&+YxiQPfaZ@>;`b)y)+fPcYWN7MLFUBHx1jyHZ*PyfxI(?fU- z^GXVs(&zUl?Q;A9Ek0up*E=x-9jm?qZ1T@V%h=;7^cd_l(B5I-SC*>;d6M|U2JDW; z4e<;3H`sp>K2Q(Hk|0Pr6&zhg#MsNc_#l^dH?jw<6cp|0C8ME71&EozDYKS zDfMuGj&>v7xyy*%ZV@Nhup#}eFzMSTOFwJK-{jw1|B3pO)d$o5(Mm`zMeHMI@2fQ2 z$5WpA=%VA7Y5%I-bNWsD$9`^Y@BgpT{{2?tm)ZaG z4uG-UThIc8^*&*7KdsWRtsY<1kE&X|$o$6SKg<8k3FGs>n-jR)64rN>hjI89>R+UP zGx^W*Uqn8)>OU(z+~nWnf9<^gaY`Q#-@Jmv3;VTe6t6P--<0_8)05l2qrboQ6mIOa zTJgy&z$tv*0sWUhhL31vFlCqn|4g%5iy(1bMgJAsgq1SX5L)@5t&~L;IfLKzt7&IbT*3NZEbk0SdgdUeRf30=Qmg^ z)-vLM`#bp7o`L`NYNr85{XGUeFz}*))t2e)1He<&i-hBAb+&TS|NQ!|5H1`0-@Qda zgVg!ky~Wu7l^&N@|F;<*Q;OpsJ*E`5H9r;XET8_bH)Z6%H)Z6%^tinE=dUdbSNumZky)ngLNY(;pcX&m#A!V z5`N0De2Hp?<7n0);MM$U7-hO`|KzvmG>j~}ab^e5dV_7mWe9E7-x7a-@$a6p$8eH{ z@p0y^Itgz}5<}R#{zJT|JmYB{%CQUcQ1fGqmr#JmZq#P(oIEf>%c9PmRn|M-ia8Sp zU%E<@#wFFKX!+^4!SL@Shz)Ni7UB+f1KcY$WiEs=7pUG(;Okv#?H5stqUFEV3FF>t zTKjubeQogjbB}76pGN81lf#T%?}VDI>p%)kt;37r(c5LqFTby?Um^}Q`46}K{dp1N zBrq)Ei8MyXhL)=QD#sfp8D}OYNoU~DWu{q}LJ zd~9FheO^BHQ+u)UxIvfX>QRVodtT`M^TF=Ki@bbUwu2qlFyK*||C+g!%8X&MQx3<^ z;Obpd_NM8(j$>~aRB(;0yn7_`ZcR63>u@;ayPrqX4sAV0n>4rtmu=XiqCD?E^T;or ToO$k^9h2SP+Zl;OxWwUq%MohH diff --git a/mpmissions/Exile.Altis/XM8_apps/XM8_apps_config.sqf b/mpmissions/Exile.Altis/XM8_apps/XM8_apps_config.sqf deleted file mode 100644 index 617c5a6..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/XM8_apps_config.sqf +++ /dev/null @@ -1,13 +0,0 @@ -/* - Improved XM8 apps by vitaly'mind'chizhikov - Official forum thread: - Original idea by Shix. -*/ - -XM8_apps_app1 = [ - "ExAd Virtual Garage", - "XM8_apps\apps\XM8_VG\Icons\apps_icon.paa", - {call XM8_VG_checkNearByFlags}, - TRUE, - "XM8_apps\apps\XM8_VG\scripts\XM8_VG_init.sqf" -]; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/XM8_apps_sliders.hpp b/mpmissions/Exile.Altis/XM8_apps/XM8_apps_sliders.hpp deleted file mode 100644 index fdc3448..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/XM8_apps_sliders.hpp +++ /dev/null @@ -1,14 +0,0 @@ -class CfgXM8 { - //This slide use IDCs from 104140 to 104156 - class sideApps { - controlID = 104140; - title = "XM8 Apps"; - onLoadScript = ""; - }; - //This slide use IDCs from 352500 to - class mainVGSlide { - controlID = 352500; - title = "Virtual Garage"; - onLoadScript = "XM8_apps\apps\XM8_VG\scripts\XM8_VG_mainVGSlide_onLoad.sqf"; - }; -}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/Icons/apps_icon.paa b/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/Icons/apps_icon.paa deleted file mode 100644 index 779971f9c7dc0b20958bfa88cc7a762b608b21d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5625 zcmeHLeN0nV6hD*#uZ1p*Q9oiZEd>oI$`UDYNJ=3<9$D2wZ#x{H73LHRVWiHnKQK;R z=5UIxCMI;6k%@za;T$h5MaC>)p9U6XUWhb6NI>y?HP1 z{oZ@`o^yWZy!U?hhOzv7qa`QbYLo+jAPBPp_!XmxV}_06eB;Y`9Eae}aZz60vMfB` zfcv}A03XBxxYPg_asOv63$g%kgkTFY5M&_8K#+lFl7VO@IiTYGInkQ{h|fl5UXWBE z{>F~YKn&zB@T4I@i}#Z$kH@?T8~L{+zHmWugj($n7&8jQOl(vBOtSXH zIKF|Bm@3KP>5lVkc@Z%h{5yLQCaLmkX=R3~20%?IjUR`L)0%EZq|_LNWS7eo)jzb| zhnrCVuwt7%xvWqO+abw$eC2KBlTlFN5#v*SUcv1(rNy3NR}7J1W4TEj_ZG^(lI=@` zx_5+Z4csel98})wF6}q8?ComM3Psf}QgBUjwB>dArsA=X$fM9Yvan?A~(kfkmKQ*n^UmyC8-Min!`7g0jb;d8u@F1`DHe*_W5K=PTzuA3$q3=}jFhD7B zs>8dG5A5&2_z3n_Oz1VzJ=V^jug4BdDSl&uZj)TA;SQ5zF9wg>_+kyHu{{~Tb$p_H zM~~aVSS8w15!Jb-kr>IellxEUa^l>=?YZUNhr`8z_)&t`FX#26CSd2+Bo$@fEcVm`^n&%DLUxKh7g$1K@3IRNwEl-pkv4`!S!@^`#|oOl&!o)G7w- zhgYf%lL@)Bi$;ej9ddK@#3e_*!_j!4*u z(h1AQr5Q+-c`NK5ZqK{kV$B$By4knc;R*O>Dzau@9IEr`*934$eKl1Lw)h1_1n~MQ zO6j4hf%|)zsDzJkJd2IexYI_%uc>Q1w_CLW<~R3o`@K*2V?)g3jp4^VyAtNF1aMqS zbEhzV`4C27ZG<{NMATnh5Vsc>8bzmkkF9aZadEgUlMa&t*#oAqSstM46pD zu|!0fZLy_az6;{cg!=MSb2C?UXKCbVsdC=Bx=eGk1_ntnnLQ!7`!cu5dH=%dH>YJ? zN7<&YT4Ji5TpQy78g8-$rjT3g$8!F@D3i-NFUzfZUiO4+ z9@T!CbTk1kwP6`5C{7Q0mqsZNClzSmLzKJe-|Mn_5c9G+`6?m(K+UW1P2goZjPm?Z z08i_`00LhYoxc@rNbZ2hM-lz`{EZxE#&fq2_rl&J1vkYf0iAf^t$mSI9(=@(cmZNL Weo^ssx+s;dEnXA2Omr_j^zIK>Pazfn diff --git a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/XM8_VG_config.sqf b/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/XM8_VG_config.sqf deleted file mode 100644 index a85e659..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/XM8_VG_config.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - XM8 VG app by Jan Babor - - file: XM8_emptyApp\XM8_emptyApp_config.sqf - function: no function - - This is configuration file for VG app. -*/ - -XM8_VG_elChanged = { - params ["_listCtrl","_picCtrl","_strCtrl","_ref","_data","_pic"]; - - _ref = _listCtrl lbData (lbCurSel _listCtrl); - _data = {if(str (_x select 0) == _ref)exitWith{_x}}forEach ((objectFromNetId ExAdCurFlagNetId) getVariable["ExAdVGVeh",[]]); - if(!isNil "_data")then{ - _pic = getText(configFile >> "CfgVehicles" >> (_data select 1) >> "picture"); - ctrlSetText [_picCtrl, _pic]; - ["requestVGDetailInfo", [_ref, ExAdCurFlagNetId, (profileNamespace getVariable["ExAd_StreamFriendlyUI",0]), netId player, _strCtrl]] call ExAd_fnc_serverDispatch; - }else{ - ctrlSetText [_picCtrl, ""]; - ["",_strCtrl] call ExAd_fnc_loadVGDetailView; - } -}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_init.sqf b/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_init.sqf deleted file mode 100644 index e83ac38..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_init.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - XM8 VG app by Jan Babor - - file: XM8_VG\scripts\XM8_VG_init.sqf - - This script will be executed once, when player login. It is executed straight from initLocalPlayer.sqf. - This is best place to compile functions, define global variables and read gonfiguration files used in app. -*/ - -params ["_pathToAppFolder"]; - -XM8_VG_mainVGSlideIDCmap = []; - -{ - if (isNil _x) then { - private ["_code"]; - _code = compileFinal (preprocessFileLineNumbers (format (["%1scripts\%2.sqf",_pathToAppFolder,_x]))); - if (isNil "_code") then {_code = compileFinal ""}; - missionNamespace setVariable [_x, _code]; - }; -} forEach [ - "XM8_VG_mainVGSlide_onLoad", - "XM8_VG_checkNearByFlags", - "XM8_VG_loadContent" -]; - -call compile preProcessFileLineNumbers format ["%1XM8_VG_config.sqf",_pathToAppFolder]; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_loadContent.sqf b/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_loadContent.sqf deleted file mode 100644 index 30e3c7c..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_loadContent.sqf +++ /dev/null @@ -1,46 +0,0 @@ -/* -function: XM8_VG_loadContent -file: XM8_VG\scripts\XM8_VG_loadContent.sqf - -XM8 VG by Jan Babor -Part of the ExAd Virtual Garage script -*/ -private ["_display","_error","_slides","_getControl","_flag","_allowedVeh","_storedVeh","_strTxtVehCntColor","_strTxtVehCnt"]; - -_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; -if (isNull _display) exitWith {_error = "Error loading XM8 VG app, display is null"; systemChat _error; diag_log _error;}; -_slides = _display displayCtrl 4007; -if (isNull _slides) exitWith {_error = "Error loading XM8 VG app, slides control is null"; systemChat _error; diag_log _error;}; - -_getControl = { - params ["_key"]; - private ["_ctrl","_idc","_index","_slideClassName"]; - _ctrl = controlNull; - _slideClassName = "mainVGSlide"; //Classname of your slide - _map = XM8_VG_mainVGSlideIDCmap; //Variable name of IDC map of slide - _index = _map find _key; - if (_index != -1) then { - _idc = ((getNumber (missionConfigFile >> "CfgXM8" >> _slideClassName >> "controlID")) + _index); - _ctrl = _display displayCtrl _idc; - }; - _ctrl; -}; - - -_flag = if(typeName ExAdCurFlagNetId == "STRING")then{objectFromNetId ExAdCurFlagNetId}else{ExAdCurFlagNetId}; - -_allowedVeh = _flag call ExAd_fnc_allowedVGVeh; -_storedVeh = count (_flag getVariable ["ExAdVGVeh", []]); -_strTxtVehCntColor = if(_allowedVeh > _storedVeh)then{"#FFFFFF"}else{"#B22400"}; - -_strTxtVehCnt = "SubTitle1Cnt" call _getControl; -_strTxtVehCnt ctrlSetStructuredText parseText format ["%2/%3",_strTxtVehCntColor,_storedVeh,_allowedVeh]; - -[(objectFromNetId ExAdCurFlagNetId) getVariable ["ExAdVGVeh", []],ctrlIDC ("StoreVehList" call _getControl)] call ExAd_fnc_fillVGList; -for "_i" from 0 to 3 do { - _index = lbAdd[ctrlIDC ("StoreVehList" call _getControl),""]; -}; - -[[_flag, ExAd_VG_ALLOWED_VEH_TYPE,_flag getVariable ["ExileTerritorySize", 50]] call ExAd_fnc_getNearByLocalVeh,ctrlIDC ("NearVehicleList" call _getControl)] call ExAd_fnc_fillVGList; - -("InfoCB" call _getControl) cbSetChecked ((profileNamespace getVariable["ExAd_StreamFriendlyUI",0]) == 1); \ No newline at end of file diff --git a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_mainVGSlide_onLoad.sqf b/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_mainVGSlide_onLoad.sqf deleted file mode 100644 index 7846054..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/apps/XM8_VG/scripts/XM8_VG_mainVGSlide_onLoad.sqf +++ /dev/null @@ -1,157 +0,0 @@ -/* - XM8 VG app by Jan Babor - - Virtual Garage app that works with the ExAd Virtual Garage plugin. - - file: XM8_emptyApp\scripts\XM8_VG_mainVGSlide_onLoad.sqf - function: XM8_VG_mainVGSlide_onLoad -*/ -private ["_makeButton","_makeBackground","_makeStructuredText","_makePicture","_makeList","_getNextIDC","_pW","_pH","_display","_slides","_unloadScript","_error","_thisSlide"]; - -_makeButton = { - params ["_parent","_idc","_position","_action","_text","_tooltip"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscButtonMenu",_idc,_parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlSetText _text; - _ctrl ctrlSetEventHandler ["ButtonClick",_action]; - _ctrl ctrlSetTooltip _tooltip; - _ctrl ctrlCommit 0; - _ctrl; -}; - -_makeBackgroundGUI = { - params ["_parent","_idc","_position"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscBackgroundGUI", _idc, _parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlCommit 0; - _ctrl ctrlSetBackgroundColor [0,0,0,0.5]; - _ctrl; -}; - -_makeFrame = { - params ["_parent","_idc","_position"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscFrame", _idc, _parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlEnable false; - _ctrl ctrlCommit 0; - _ctrl; -}; - -_makeStructuredText = { - params ["_parent","_idc","_position","_text","_font","_size","_color","_align","_shadow"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscStructuredText", _idc, _parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlSetStructuredText (parseText format ["%1", _text,_size,_color, _align,_font,_shadow]); - _ctrl ctrlEnable false; - _ctrl ctrlCommit 0; - _ctrl; -}; - -_makePicture = { - params ["_parent","_idc","_position","_picture","_color","_enable","_keepAspect","_tooltip"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate [(if (_keepAspect) then {"RscPictureKeepAspect"} else {"RscPicture"}), _idc, _parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlSetText _picture; - _ctrl ctrlSetTextColor _color; - _ctrl ctrlEnable _enable; - _ctrl ctrlSetTooltip _tooltip; - _ctrl ctrlCommit 0; - _ctrl; -}; - -_makeList = { - params ["_parent","_idc","_position","_actionOnSelChanged","_tooltip"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscListBox",_idc,_parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlSetEventHandler ["LBSelChanged",_actionOnSelChanged]; - _ctrl ctrlSetTooltip _tooltip; - _ctrl ctrlCommit 0; - _ctrl; -}; - -_makeCheckBox = { - params ["_parent","_idc","_position","_actionOnSelChanged","_tooltip"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscCheckBox",_idc,_parent]; - _ctrl ctrlSetPosition _position; - _ctrl ctrlSetEventHandler ["CheckedChanged",_actionOnSelChanged]; - _ctrl ctrlSetTooltip _tooltip; - _ctrl ctrlCommit 0; - _ctrl; -}; - -_getNextIDC = { - params ["_key"]; - private ["_slideClassName","_baseIDC","_result","_map"]; - _slideClassName = "mainVGSlide"; - _map = XM8_VG_mainVGSlideIDCmap; - _baseIDC = getNumber (missionConfigFile >> "CfgXM8" >> _slideClassName >> "controlID"); - _result = _baseIDC + (_map pushBack _key); - _result; -}; - -_pW = 0.025; -_pH = 0.04; -_leftCol = 1; -_leftColW = 12.8; -_rightCol = _leftCol + _leftColW + 2; -_rightColW = _leftColW + 3; -_margin = 0.2; - -_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; -if (isNull _display) exitWith {_error = "Error loading XM8 VG app, display is null"; systemChat _error; diag_log _error;}; -_slides = _display displayCtrl 4007; -if (isNull _slides) exitWith {_error = "Error loading XM8 VG app, slides control is null"; systemChat _error; diag_log _error;}; - -_unloadScript = ' - if (ExileClientXM8CurrentSlide == "mainVGSlide") then { - ExileClientXM8CurrentSlide = "sideApps"; - }; - ExAdCurFlagNetId = nil; -'; -_display displayAddEventHandler ["unload",_unloadScript]; - -XM8_VG_mainVGSlideIDCmap = []; - -_thisSlide = _display ctrlCreate ["RscExileXM8Slide",("mainVGSlide" call _getNextIDC),_slides]; - -[_thisSlide,("backButton" call _getNextIDC),[27.6 * _pW, 17.7 * _pH, 6 * _pW, 1 * _pH],'["sideApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK,""] call _makeButton; - -/*Stored Vehicle Details*/ -[_thisSlide,("InfoTitle" call _getNextIDC),[_rightCol * _pW, 2.75 * _pH, _rightColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_DETAILS,"PuristaMedium",1.2,"#ffffff","left",1] call _makeStructuredText; - -[_thisSlide,("InfoBgBox" call _getNextIDC),[_rightCol * _pW, 4 * _pH, _rightColW * _pW, 13.5 * _pH]] call _makeBackgroundGUI; - -_idcInfoPic = "InfoPic" call _getNextIDC; -[_thisSlide,_idcInfoPic,[(_rightCol + 9) * _pW, 4 * _pH, 6.75 * _pW, 5.5 * _pH],"",[1,1,1,1],false,true,""] call _makePicture; - -_idcInfoStr = "InfoVehStr" call _getNextIDC; -[_thisSlide,_idcInfoStr,[(_rightCol + _margin) * _pW, (4 + _margin) * _pH, (_rightColW - 2 * _margin) * _pW, (13.5 - 2 * _margin) * _pH],"","PuristaMedium",0.75,"#ffffff","left",1] call _makeStructuredText; - -[_thisSlide,("InfoCBStr" call _getNextIDC),[(_rightCol + _margin + 0.4) * _pW, (16.5 - _margin + 0.25 ) * _pH, (_rightColW - 2 * _margin) * _pW, (13.5 - 2 * _margin) * _pH],STR_ExAd_VG_APP_CB_SECRET,"PuristaMedium",0.65,"#ffffff","left",1] call _makeStructuredText; - -[_thisSlide,("InfoCB" call _getNextIDC),[(_rightCol + _margin) * _pW, (16.5 - _margin + 0.2) * _pH, 0.75 * _pW, 0.75 * _pH],'profileNamespace setVariable["ExAd_StreamFriendlyUI",_this select 1]',"Toogle - Stream friendly UI"] call _makeCheckBox; - -/*Stored Vehicles*/ -[_thisSlide,("SubTitle1" call _getNextIDC),[_leftCol * _pW, 2.75 * _pH, _leftColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_STORED,"PuristaMedium",1.2,"#ffffff","left",1] call _makeStructuredText; - -[_thisSlide,("SubTitle1Cnt" call _getNextIDC),[_leftCol * _pW, 3 * _pH, _leftColW * _pW, 1 * _pH],"","PuristaMedium",1,"#ffffff","right",1] call _makeStructuredText; - -_idcStoredVehList = "StoreVehList" call _getNextIDC; -[_thisSlide,_idcStoredVehList,[_leftCol * _pW, 4 * _pH, _leftColW * _pW, 5 * _pH],format["[_this select 0,%1,%2] call XM8_VG_elChanged",_idcInfoPic,_idcInfoStr],""] call _makeList; - -[_thisSlide,("fetchButton" call _getNextIDC),[_leftCol*_pW, 9*_pH, _leftColW*_pW, 1*_pH],format["disableUserInput true;['VGLoad', %1] call ExAd_fnc_onBtnClickVG",_idcStoredVehList],STR_ExAd_VG_APP_BTN_FETCH,""] call _makeButton; - -/*Nearby vehicles*/ -[_thisSlide,("SubTitle2" call _getNextIDC),[_leftCol * _pW, 10.25 * _pH, _leftColW * _pW, 1 * _pH],STR_ExAd_VG_APP_TTL_NEAR,"PuristaMedium",1.2,"#ffffff","left",1] call _makeStructuredText; - -_idcNearVehList = "NearVehicleList" call _getNextIDC; -[_thisSlide,_idcNearVehList,[_leftCol * _pW, 11.5 * _pH, _leftColW * _pW, 5 * _pH],"",""] call _makeList; - -[_thisSlide,("storeButton" call _getNextIDC),[_leftCol * _pW, 16.5 * _pH, _leftColW * _pW, 1 * _pH],format["if(call ExAd_fnc_allowVGStore)then{disableUserInput true;['VGStore', %1] call ExAd_fnc_onBtnClickVG}else{['Whoops', ['%2']] call ExileClient_gui_notification_event_addNotification}",_idcNearVehList,STR_ExAd_VG_NOTI_FULL],STR_ExAd_VG_APP_BTN_STORE,""] call _makeButton; diff --git a/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_show.sqf b/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_show.sqf deleted file mode 100644 index b09f3e2..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_show.sqf +++ /dev/null @@ -1,175 +0,0 @@ -/** -* ExileClient_gui_xm8_show -* -* Exile Mod -* www.exilemod.com -* © 2015 Exile Mod Team -* -* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. -* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. -*/ - -/* - XM8 apps Imporeved by vitaly'mind'chizhikov - Based on idea XM8 apps by Shix. see http://www.exilemod.com/topic/9040-xm8-apps/?page=1 - Original function from Exile 0.9.6 -*/ - -private["_display","_control","_slideControlID","_slideName","_slideTitle","_slideControl","_titleControl","_toSlideOpenFunction","_hideSideApps"]; -disableSerialization; -createDialog "RscExileXM8"; -ExileClientXM8IsVisible = true; -_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; -if (ExileClientXM8IsPowerOn) then { - _control = _display displayCtrl 4002; - _control ctrlSetFade 1; - _control ctrlCommit 0; -} else { - { - _control = _display displayCtrl _x; - _control ctrlSetFade 1; - _control ctrlCommit 0; - } forEach [4002,4003,4004,4005,4007,4001,4010,4030,4020]; -}; -true call ExileClient_gui_postProcessing_toggleDialogBackgroundBlur; -if (ExileClientXM8CurrentSlide isEqualTo "party") then { - if (ExileClientPartyID isEqualTo -1) then { - ExileClientXM8CurrentSlide = "apps"; - }; -}; - -private ["_sliders","_appSlide","_newTerritoryBut","_newTerritoryPic","_sideAppsBut","_sideAppsPic","_newSliderIDC","_newSlider","_buttonBack", -"_makeButtonCtrl","_pW","_pH"]; -_pW = 0.025; -_pH = 0.04; -_sliders = _display displayCtrl 4007; -_appSlide = _sliders controlsGroupCtrl 4040; - -//Lets create XM8_apps slide manually, as we are unable to change RscExileXM8 directly in config. -_newSliderIDC = getNumber (missionConfigFile >> "CfgXM8" >> "sideApps" >> "controlID"); -_newSlider = _display ctrlCreate ["RscExileXM8Slide", _newSliderIDC, _sliders]; - -//Lets fill our slider with contents. First lets make go back button -_buttonBack = _display ctrlCreate ["RscButtonMenu",_newSliderIDC + 1,_newSlider]; -_buttonBack ctrlSetPosition [27.6*_pW,17.7*_pH,6*_pW,1*_pH]; -_buttonBack ctrlSetText "GO BACK"; -_buttonBack ctrlSetEventHandler ["ButtonClick","['apps', 1] call ExileClient_gui_xm8_slide"]; -_buttonBack ctrlCommit 0; - -//We hide sideApps in order to be compatible with legacy apps. -_hideSideApps = ' - disableSerialization; - _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; - _sliders = _display displayCtrl 4007; - _sideAppsIDC = getNumber (missionConfigFile >> "CfgXM8" >> "sideApps" >> "controlID"); - _appSlide = _display displayCtrl _sideAppsIDC; - _appSlide ctrlShow false; - _appSlide ctrlCommit 0; -'; - -//We make app buttons with this function -_makeButtonCtrl = { - params ["_idc","_pos","_text","_script","_parent","_pic","_compatible"]; - private ["_ctrl"]; - _ctrl = _display ctrlCreate ["RscExileXM8AppButton1x1",_idc,_parent]; - _ctrl ctrlSetPosition [_pos select 0,_pos select 1,6 * _pW, 4.8 * _pH]; - _ctrl ctrlSetText _text; - if (!_compatible) then { - _ctrl ctrlSetEventHandler ["ButtonClick",_hideSideApps]; - - } else { - _ctrl ctrlSetEventHandler ["ButtonClick",""]; - }; - _ctrl ctrlAddEventHandler ["ButtonClick",format ["call %1",_script]]; - _ctrl ctrlCommit 0; - - _ctrl = _display ctrlCreate ["RscPictureKeepAspect",-1,_parent]; - _ctrl ctrlSetText _pic; - _ctrl ctrlSetPosition [_pos select 0,(_pos select 1) + 0.01,6 * _pW, 2.8 * _pH]; - _ctrl ctrlEnable false; - _ctrl ctrlCommit 0; -}; -//Lets try to create 15 buttons, if some buttons in XM8_apps_config are commented, they will be scipped - -for "_i" from 1 to 15 do { - private ["_pos", "_data"]; - if (!isNil (format ["XM8_apps_app%1", _i])) then { - _data = call compile format ["XM8_apps_app%1", _i]; - _pos = [0,0]; - if (_i in [1,2,3,4,5]) then { - _pos set [0, (0.4 + ((_i-1) * 6.8)) * _pW]; - _pos set [1, 2 * _pH]; - }; - if (_i in [6,7,8,9,10]) then { - _pos set [0, (0.4 + (((_i-1) - 5) * 6.8)) * _pW]; - _pos set [1, 7.2 * _pH]; - }; - if (_i in [11,12,13,14,15]) then { - _pos set [0, (0.4 + (((_i-1) - 10) * 6.8)) * _pW]; - _pos set [1, 12.4 * _pH]; - }; - [(_newSliderIDC + 1 + _i) ,_pos,(_data select 0),str(_data select 2),_newSlider,(_data select 1),(_data select 3)] call _makeButtonCtrl; - }; -}; - -/* -We need some space to put XM8_apps button, for that lets cut territory button in half. -In fact we cant re-possition button as it will render picture (textureNoShortcut) incorrectly. -So lets make new 'territory' button, smaller then original one. -We will hide old button in ExileClient_gui_xm8_slide_apps_onOpen and ExileClient_gui_xm8_slide -*/ -_newTerritoryBut = _display ctrlCreate ["RscExileXM8AppButton1x1",(_newSliderIDC + 15),_appSlide]; -_newTerritoryBut ctrlSetPosition [(23.5 - 3) * _pW,(9.5 - 2) * _pH,6 * _pW, 5 * _pH]; -_newTerritoryBut ctrlSetText getText (configFile >> "CfgXM8" >> "territory" >> "title"); -_newTerritoryBut ctrlSetEventHandler ["ButtonClick","['territory', 0] call ExileClient_gui_xm8_slide"]; -_newTerritoryBut ctrlCommit 0; -_newTerritoryPic = _display ctrlCreate ["RscPictureKeepAspect",(_newSliderIDC + 17),_appSlide]; -_newTerritoryPic ctrlSetText "\exile_assets\texture\ui\xm8_app_territory_ca.paa"; -_newTerritoryPic ctrlSetPosition [(25 - 3) * _pW,(10 - 2) * _pH,(6 * _pW) * 0.5, (5 * _pH) * 0.5]; -_newTerritoryPic ctrlEnable false; -_newTerritoryPic ctrlCommit 0; - -//Now lets make New button for XM8_apps inside app slider. -_sideAppsBut = _display ctrlCreate ["RscExileXM8AppButton1x1",(_newSliderIDC + 16),_appSlide]; -_sideAppsBut ctrlSetPosition [(30 - 3) * _pW,(9.5 - 2) * _pH,6 * _pW, 5 * _pH]; -_sideAppsBut ctrlSetText getText (missionConfigFile >> "CfgXM8" >> "sideApps" >> "title"); -_sideAppsBut ctrlSetEventHandler ["ButtonClick","['sideApps', 0] call ExileClient_gui_xm8_slide"]; -_sideAppsBut ctrlCommit 0; -_sideAppsPic = _display ctrlCreate ["RscPictureKeepAspect",(_newSliderIDC + 18),_appSlide]; -_sideAppsPic ctrlSetText format ["%1%2",XM8_apps_folderPath, "XM8_apps\icons\apps_icon.paa"]; -_sideAppsPic ctrlSetPosition [(31.5 - 3) * _pW,(10 - 2) * _pH,(6 * _pW) * 0.5, (5 * _pH) * 0.5]; -_sideAppsPic ctrlEnable false; -_sideAppsPic ctrlCommit 0; - -{ - //We dont have configured slides, thus we create it via scripting. We do that by executing slide creating scripts. - _slideOnLoadScript = getText (_x >> "onLoadScript"); - if (!isNil "_slideOnLoadScript") then { - call compile preprocessFileLineNumbers _slideOnLoadScript; - }; - - _slideControlID = getNumber (_x >> "controlID"); - _slideName = configName _x; - _slideTitle = getText (_x >> "title"); - _slideControl = _display displayCtrl _slideControlID; - if (_slideName isEqualTo ExileClientXM8CurrentSlide) then { - _titleControl = _display displayCtrl 4004; - _titleControl ctrlSetStructuredText (parseText (format ["%1", _slideTitle])); - _slideControl ctrlSetPosition [(0 * 0.05), (0 * 0.05)]; - _slideControl ctrlCommit 0; - _slideControl ctrlShow true; - _toSlideOpenFunction = missionNamespace getVariable [format ["ExileClient_gui_xm8_slide_%1_onOpen", _slideName], ""]; - if !(_toSlideOpenFunction isEqualTo "") then - { - call _toSlideOpenFunction; - }; - } else { - _slideControl ctrlShow false; - }; -} forEach (("true" configClasses (configFile >> "CfgXM8")) + ("true" configClasses (missionConfigFile >> "CfgXM8"))); -/* -Lets read missionConfigFile as well, as we may have custom slides added. -forEach ("true" configClasses (configFile >> "CfgXM8")); //Original line -*/ -ExileXM8ThreadHandle = [10, ExileClient_gui_xm8_thread_update, [], true] call ExileClient_system_thread_addtask; -call ExileClient_gui_xm8_thread_update; diff --git a/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide_apps_onOpen.sqf b/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide_apps_onOpen.sqf deleted file mode 100644 index 545b4e5..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/scripts/ExileClient_gui_xm8_slide_apps_onOpen.sqf +++ /dev/null @@ -1,47 +0,0 @@ -/** - * ExileClient_gui_xm8_slide_apps_onOpen - * - * Exile Mod - * www.exilemod.com - * © 2015 Exile Mod Team - * - * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. - * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. - */ - -// XM8 apps Imporeved by vitaly'mind'chizhikov -// Based on idea XM8 apps by Shix. see http://www.exilemod.com/topic/9040-xm8-apps/?page=1 -// Original function from Exile 0.9.6 - -private["_display","_health","_popTabsValue","_popTabs","_respectValue","_respect"]; -disableSerialization; -_display = uiNameSpace getVariable ["RscExileXM8", displayNull]; -_health = _display displayCtrl 4057; -_health ctrlSetStructuredText parseText (format ["


%1%2
HEALTH
", round ((1 - damage player) * 100), "%"]); -_popTabsValue = ExileClientPlayerMoney; -if (_popTabsValue > 999) then -{ - _popTabsValue = format ["%1k", floor (_popTabsValue / 1000)]; -}; -_popTabs = _display displayCtrl 4058; -_popTabs ctrlSetTooltip format["%1", ExileClientPlayerMoney]; -_popTabs ctrlSetStructuredText parseText (format ["


%1
POP TABS
", _popTabsValue]); -_respectValue = ExileClientPlayerScore; -if (_respectValue > 999) then -{ - _respectValue = format ["%1k", floor (_respectValue / 1000)]; -}; -_respect = _display displayCtrl 4059; -_respect ctrlSetTooltip format["%1", ExileClientPlayerScore]; -_respect ctrlSetStructuredText parseText (format ["


%1
RESPECT
", _respectValue]); - -//Lets hide old territory button, as we already made new one early on in ExileClient_gui_xm8_show. -//Why we make new? Because if button is re-possition it will render picture (textureNoShortcut) incorrectly. -private ["_sliders","_appSlide","_oldTerritoryBut"]; -_sliders = _display displayCtrl 4007; -_appSlide = _sliders controlsGroupCtrl 4040; -_oldTerritoryBut = _appSlide controlsGroupCtrl 1113; -_oldTerritoryBut ctrlShow false; -_oldTerritoryBut ctrlSetFade 0; -_oldTerritoryBut ctrlCommit 0; - diff --git a/mpmissions/Exile.Altis/XM8_apps/scripts/XM8_apps_init.sqf b/mpmissions/Exile.Altis/XM8_apps/scripts/XM8_apps_init.sqf deleted file mode 100644 index e89183a..0000000 --- a/mpmissions/Exile.Altis/XM8_apps/scripts/XM8_apps_init.sqf +++ /dev/null @@ -1,28 +0,0 @@ -/* - Improved XM8 apps by vitaly'mind'chizhikov - Original idea by Shix. -*/ - -params ["_pathToFolder"]; - -//Setting path to app -XM8_apps_folderPath = _pathToFolder; - -//Apply config -call compile preprocessFileLineNumbers format ["%1XM8_apps\XM8_apps_config.sqf",_pathToFolder]; - -//Run init scripts for those apps that made for Improved XM8 apps (not legacy apps) -for "_i" from 1 to 15 do { - private ["_pos", "_data"]; - if (!isNil (format ["XM8_apps_app%1", _i])) then { - _data = call compile format ["XM8_apps_app%1", _i]; - if (_data select 3) then { - _arr = (_data select 4) splitString "\"; - _arr resize ((count _arr) - 2); - ((_arr joinString "\") + "\") call compile preprocessFileLineNumbers (_data select 4); - } else { - - }; - }; -}; - diff --git a/mpmissions/Exile.Altis/config.cpp b/mpmissions/Exile.Altis/config.cpp index 1244e6e..e7e8bea 100644 --- a/mpmissions/Exile.Altis/config.cpp +++ b/mpmissions/Exile.Altis/config.cpp @@ -1,6 +1,22 @@ +class CfgXM8 +{ + extraApps[] = {"ExAd_VG"}; + + class ExAd_VG + { + title = "Virtual Garage"; + controlID = 50000; //IDC:50000 -> 50014 + onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf"; + onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf"; + onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf"; + }; +}; + class CfgExileCustomCode { ExileServer_system_territory_database_load = "ExAdClient\VirtualGarage\CustomCode\ExileServer_system_territory_database_load.sqf"; + ExileClient_gui_xm8_slide = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_slide.sqf"; + ExileClient_gui_xm8_show = "ExAdClient\XM8\CustomCode\ExileClient_gui_xm8_show.sqf"; }; class CfgInteractionMenus @@ -11,12 +27,6 @@ class CfgInteractionMenus target = "Exile_Construction_Flag_Static"; class Actions { - class VG : ExileAbstractAction - { - title = "Virtual Garage"; - condition = "(([_object, getPlayerUID player] call ExileClient_util_territory_getAccessLevel) select 0) >= ExAd_VG_ACCESS_LEVEL"; - action = "[] spawn {[] call ExileClient_gui_xm8_show; UISleep 1; call XM8_VG_checkNearByFlags}"; - }; class HackVG : ExileAbstractAction { title = "Hack Virtual Garage";