diff --git a/addons/advSlingload/script_component.hpp b/addons/advSlingload/script_component.hpp index 0091c8e20..6077b37f8 100644 --- a/addons/advSlingload/script_component.hpp +++ b/addons/advSlingload/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT advSlingload -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/ai/script_component.hpp b/addons/ai/script_component.hpp index 6248c12d5..045b82c32 100644 --- a/addons/ai/script_component.hpp +++ b/addons/ai/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT ai -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/ares_compositions/script_component.hpp b/addons/ares_compositions/script_component.hpp index 348d883da..8b4542749 100644 --- a/addons/ares_compositions/script_component.hpp +++ b/addons/ares_compositions/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT ares_compositions -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/arsenal/script_component.hpp b/addons/arsenal/script_component.hpp index 0d21303cb..3535b491b 100644 --- a/addons/arsenal/script_component.hpp +++ b/addons/arsenal/script_component.hpp @@ -3,12 +3,12 @@ Developed by http://tacticalbacon.de */ #define COMPONENT arsenal -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" /* Addon spezifisch diff --git a/addons/building/script_component.hpp b/addons/building/script_component.hpp index 0c1b9facb..49fb86980 100644 --- a/addons/building/script_component.hpp +++ b/addons/building/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT building -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/bw/script_component.hpp b/addons/bw/script_component.hpp index 867f6d100..57a3791b4 100644 --- a/addons/bw/script_component.hpp +++ b/addons/bw/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT bw -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/config/script_component.hpp b/addons/config/script_component.hpp index 4bd1ab09e..75a7fc7db 100644 --- a/addons/config/script_component.hpp +++ b/addons/config/script_component.hpp @@ -3,10 +3,10 @@ Developed by http://tacticalbacon.de */ #define COMPONENT config -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/eden/script_component.hpp b/addons/eden/script_component.hpp index 785b41590..840a520ec 100644 --- a/addons/eden/script_component.hpp +++ b/addons/eden/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT eden -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/eos/script_component.hpp b/addons/eos/script_component.hpp index 64ba36b20..245c7ec7c 100644 --- a/addons/eos/script_component.hpp +++ b/addons/eos/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT eos -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/extension/functions/fnc_callExtension.sqf b/addons/extension/functions/fnc_callExtension.sqf index 2cde21e9e..6c7df25de 100644 --- a/addons/extension/functions/fnc_callExtension.sqf +++ b/addons/extension/functions/fnc_callExtension.sqf @@ -10,8 +10,7 @@ params [ ["_codeReturn", false, [false]] ]; -// Darf nicht dann kommt nichts zurück -//if (!canSuspend) exitWith {"ERROR: Suspending not allowed in this contex"}; +if (!canSuspend) exitWith {"ERROR: Suspending not allowed in this contex"}; private _array = [_cmd]; if (!isNil {_data}) then {_array pushBack _data}; @@ -26,10 +25,9 @@ if (_errorCode < 0 || {_returnCode < 0}) then systemChat _msg; }; -// TODO: Darf nicht dann kommt nichts zurück -/*if (_returnCode > 1) then +if (_returnCode > 1) then { _result = [_returnCode] call FUNC(getFromCache); -};*/ +}; if (_codeReturn) then {_returnCode} else {_result}; diff --git a/addons/extension/script_component.hpp b/addons/extension/script_component.hpp index f2434e111..b69e90a64 100644 --- a/addons/extension/script_component.hpp +++ b/addons/extension/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT extension -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/medical/script_component.hpp b/addons/medical/script_component.hpp index a2b10475f..bf185cc9a 100644 --- a/addons/medical/script_component.hpp +++ b/addons/medical/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT medical -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/menubutton/config.cpp b/addons/menubutton/config.cpp index 6c989c055..9f2b8e708 100644 --- a/addons/menubutton/config.cpp +++ b/addons/menubutton/config.cpp @@ -14,9 +14,9 @@ class CfgPatches name = "TBMod MenuButton"; requiredAddons[] = { - "TBMod_common" + "TBMod_main" }; - addonRootClass = "TBMod_common"; + addonRootClass = "TBMod_main"; }; }; @@ -27,12 +27,13 @@ class RscDisplayMain: RscStandardDisplay { class Spotlight { - class GVAR(missionServer) + class TB_missionServer { - text = "TacticalBacon Server"; + text = ""; + textIsQuote = 0; picture = PATHTOF(button.paa); - //action = QUOTE([_this, 'server.tacticalbacon.de', '2302', 'tbm'] call COMPILE_SCRIPT(joinServer)); // execVM QPATHTOF - action = "connectToServer ['server.tacticalbacon.de', 2302, 'tbm']"; + //video = "\a3\Ui_f\Video\spotlight_1_Apex.ogv"; + action = QUOTE([_this, 'server.tacticalbacon.de', '2302', 'tbm'] call COMPILE_SCRIPT(joinServer)); // execVM QPATHTOF actionText = "Join TacticalBacon Server"; condition = "true"; }; diff --git a/addons/menubutton/joinServer.sqf b/addons/menubutton/joinServer.sqf new file mode 100644 index 000000000..b6005c762 --- /dev/null +++ b/addons/menubutton/joinServer.sqf @@ -0,0 +1,88 @@ +#include "\A3\Ui_f\hpp\defineResincl.inc" +/* + Original idea/code: http://killzonekid.com/farewell-my-arma-friends/ + Modified for Spotlight: https://github.com/ampersand38/Server-Spotlight +*/ +params +[ + ["_buttons", []], + ["_IP", "127.0.0.1"], + ["_PORT", "2302"], + ["_PASS", ""], + ["_TIMEOUT", 30] +]; + +ctrlactivate ((ctrlparent (_buttons select 0)) displayctrl 105); + +/* +1 _IP +2 _PORT +3 _PASS +4 IDC_CANCEL +5 IDD_MISSION +6 IDD_DEBRIEFING +7 IDD_MP_SETUP +8 IDD_MULTIPLAYER +9 IDC_MULTI_TAB_DIRECT_CONNECT +10 IDD_IP_ADDRESS +11 IDC_IP_ADDRESS +12 IDC_IP_PORT +13 IDC_MULTI_SESSIONS +14 IDC_OK +15 IDC_MULTI_JOIN +16 IDD_PASSWORD +17 IDC_PASSWORD +18 diag_tickTime + _TIMEOUT +*/ +onEachFrame format [ +" + onEachFrame + { + ctrlActivate (findDisplay %8 displayCtrl %9); + onEachFrame + { + private _ctrlServerAddress = findDisplay %10 displayCtrl 2300; + _ctrlServerAddress controlsGroupCtrl %11 ctrlSetText ""%1""; + _ctrlServerAddress controlsGroupCtrl %12 ctrlSetText ""%2""; + ctrlActivate (_ctrlServerAddress controlsGroupCtrl %14); + onEachFrame + { + ((findDisplay %8 displayCtrl %13) lbData 0) call + { + if (diag_tickTime > %18) then + { + onEachFrame {}; + }; + if !(_this isEqualTo '') then + { + findDisplay %8 displayCtrl %13 lbSetCurSel 0; + onEachFrame + { + ctrlActivate (findDisplay %8 displayCtrl %15); + onEachFrame + { + if (diag_tickTime > %18) then + { + onEachFrame {}; + }; + if (!isNull findDisplay %16) then + { + private _ctrlPassword = findDisplay %16 displayCtrl %17; + _ctrlPassword ctrlSetTextColor [0,0,0,0]; + _ctrlPassword ctrlSetText ""%3""; + ctrlActivate (findDisplay %16 displayCtrl %14); + }; + if (getClientStateNumber >= 3) then + { + onEachFrame {}; + }; + }; + }; + }; + }; + }; + }; + }; +", _IP, _PORT, _PASS, IDC_CANCEL, IDD_MISSION, IDD_DEBRIEFING, IDD_MP_SETUP, IDD_MULTIPLAYER, +IDC_MULTI_TAB_DIRECT_CONNECT, IDD_IP_ADDRESS, IDC_IP_ADDRESS, IDC_IP_PORT, IDC_MULTI_SESSIONS, +IDC_OK, IDC_MULTI_JOIN, IDD_PASSWORD, IDC_PASSWORD, diag_tickTime + _TIMEOUT]; diff --git a/addons/menubutton/script_component.hpp b/addons/menubutton/script_component.hpp index 40998067d..256e2d17c 100644 --- a/addons/menubutton/script_component.hpp +++ b/addons/menubutton/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT menubutton -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/nachschub/script_component.hpp b/addons/nachschub/script_component.hpp index a0862b58f..d461f4c3f 100644 --- a/addons/nachschub/script_component.hpp +++ b/addons/nachschub/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT nachschub -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/persistence/script_component.hpp b/addons/persistence/script_component.hpp index 0c59471c7..9303b52a7 100644 --- a/addons/persistence/script_component.hpp +++ b/addons/persistence/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT persistence -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/poppy/script_component.hpp b/addons/poppy/script_component.hpp index 836701c10..69fc6f24e 100644 --- a/addons/poppy/script_component.hpp +++ b/addons/poppy/script_component.hpp @@ -3,12 +3,12 @@ Developed by http://tacticalbacon.de */ #define COMPONENT poppy -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" #define LOADOUT_INDEXES [ \ "uniform", "vest", "backpack", \ diff --git a/addons/rhs/script_component.hpp b/addons/rhs/script_component.hpp index e47201050..5110956ab 100644 --- a/addons/rhs/script_component.hpp +++ b/addons/rhs/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT rhs -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/skins/script_component.hpp b/addons/skins/script_component.hpp index 21294880c..a42a9c769 100644 --- a/addons/skins/script_component.hpp +++ b/addons/skins/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT skins -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/spectrum/script_component.hpp b/addons/spectrum/script_component.hpp index b6de4c35c..d362be0ad 100644 --- a/addons/spectrum/script_component.hpp +++ b/addons/spectrum/script_component.hpp @@ -3,10 +3,10 @@ Developed by http://tacticalbacon.de */ #define COMPONENT spectrum -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/stealthvehicle/script_component.hpp b/addons/stealthvehicle/script_component.hpp index 3a329a70d..1249273bc 100644 --- a/addons/stealthvehicle/script_component.hpp +++ b/addons/stealthvehicle/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT stealthvehicle -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/taser/script_component.hpp b/addons/taser/script_component.hpp index 03030e6f4..9a2ba8fb9 100644 --- a/addons/taser/script_component.hpp +++ b/addons/taser/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT taser -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" diff --git a/addons/tasks/script_component.hpp b/addons/tasks/script_component.hpp index e56e7352b..0214e1707 100644 --- a/addons/tasks/script_component.hpp +++ b/addons/tasks/script_component.hpp @@ -3,12 +3,12 @@ Developed by http://tacticalbacon.de */ #define COMPONENT tasks -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" +#include "\x\TBMod\addons\main\script_macros.hpp" #define STATE_NotInitialised 0 #define STATE_Initialised 1 diff --git a/addons/vz99/script_component.hpp b/addons/vz99/script_component.hpp index d133ec165..ed7d5b912 100644 --- a/addons/vz99/script_component.hpp +++ b/addons/vz99/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT vz99 -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/warlords/script_component.hpp b/addons/warlords/script_component.hpp index c28ff7a61..b1357fd6c 100644 --- a/addons/warlords/script_component.hpp +++ b/addons/warlords/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT warlords -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/zeus/script_component.hpp b/addons/zeus/script_component.hpp index eecfc94ab..f36f567b5 100644 --- a/addons/zeus/script_component.hpp +++ b/addons/zeus/script_component.hpp @@ -3,9 +3,9 @@ Developed by http://tacticalbacon.de */ #define COMPONENT zeus -#include "\x\TBMod\addons\common\script_mod.hpp" +#include "\x\TBMod\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#include "\x\TBMod\addons\common\script_macros.hpp" \ No newline at end of file +#include "\x\TBMod\addons\main\script_macros.hpp" \ No newline at end of file