Skip to content

Commit

Permalink
Revert "aus #613 neuen cmd connectToServer genutzt; script_mod.hpp un…
Browse files Browse the repository at this point in the history
…d script_macros.hpp con common nutzen"

This reverts commit 59f9781.
  • Loading branch information
shukari committed Oct 21, 2021
1 parent 59f9781 commit 514bfde
Show file tree
Hide file tree
Showing 27 changed files with 146 additions and 59 deletions.
4 changes: 2 additions & 2 deletions addons/advSlingload/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/ai/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/ares_compositions/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/arsenal/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions addons/building/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#include "\x\TBMod\addons\main\script_macros.hpp"
4 changes: 2 additions & 2 deletions addons/bw/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/config/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/eden/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/eos/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 3 additions & 5 deletions addons/extension/functions/fnc_callExtension.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ params [
["_codeReturn", false, [false]]
];

// Darf nicht <Suspend> 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};
Expand All @@ -26,10 +25,9 @@ if (_errorCode < 0 || {_returnCode < 0}) then
systemChat _msg;
};

// TODO: Darf nicht <Suspend> dann kommt nichts zurück
/*if (_returnCode > 1) then
if (_returnCode > 1) then
{
_result = [_returnCode] call FUNC(getFromCache);
};*/
};

if (_codeReturn) then {_returnCode} else {_result};
4 changes: 2 additions & 2 deletions addons/extension/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/medical/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
13 changes: 7 additions & 6 deletions addons/menubutton/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class CfgPatches
name = "TBMod MenuButton";

requiredAddons[] = {
"TBMod_common"
"TBMod_main"
};
addonRootClass = "TBMod_common";
addonRootClass = "TBMod_main";
};
};

Expand All @@ -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";
};
Expand Down
88 changes: 88 additions & 0 deletions addons/menubutton/joinServer.sqf
Original file line number Diff line number Diff line change
@@ -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];
4 changes: 2 additions & 2 deletions addons/menubutton/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#include "\x\TBMod\addons\main\script_macros.hpp"
4 changes: 2 additions & 2 deletions addons/nachschub/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#include "\x\TBMod\addons\main\script_macros.hpp"
4 changes: 2 additions & 2 deletions addons/persistence/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#include "\x\TBMod\addons\main\script_macros.hpp"
4 changes: 2 additions & 2 deletions addons/poppy/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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", \
Expand Down
4 changes: 2 additions & 2 deletions addons/rhs/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/skins/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/spectrum/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/stealthvehicle/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions addons/taser/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading

0 comments on commit 514bfde

Please sign in to comment.