This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
490 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
PREP(initCBAClassEvents); | ||
PREP(initCBASettings); | ||
PREP(flipCheck); | ||
PREP(unFlip); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "script_component.hpp" | ||
|
||
/* | ||
this line is commented, otherwise it would disturb the linter. | ||
["LandVehicle", "init", FUNC(onInit), nil, nil, true] call CBA_fnc_addClassEventHandler; | ||
*/ | ||
|
||
if (!GVAR(on)) exitWith{}; | ||
|
||
[] call FUNC(initCBAClassEvents); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "script_component.hpp" | ||
|
||
ADDON = false; | ||
|
||
PREP_RECOMPILE_START; | ||
#include "XEH_PREP.hpp" | ||
PREP_RECOMPILE_END; | ||
|
||
ADDON = true; | ||
|
||
/* INITIALIZE GLOBAL VARS */ | ||
// list all global variables used within the component | ||
// define variable with default value! | ||
// GVAR(...) | ||
|
||
// initialize CBA Settings | ||
[] call FUNC(initCBASettings); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/** | ||
* Description: | ||
* initialize CBA class event handler | ||
* | ||
* Author: | ||
* James | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Server only: | ||
* no | ||
* | ||
* Public: | ||
* no - should be called only once at mission start from XEH_PostInit.sqf | ||
* | ||
* Global: | ||
* no | ||
* | ||
* Sideeffects: | ||
* add action menu item to vehicles (both land and air) to unflip vehicle | ||
* | ||
* Example: | ||
* [] call EFUNC(flip,initCBAClassEvents); | ||
* | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
/* CLASS EH */ | ||
/* EXAMPLE FROM https://github.com/CBATeam/CBA_A3/wiki/Adding-Event-Handlers-to-Classes-of-Objects | ||
["CAManBase", "fired", {systemChat str _this}] call CBA_fnc_addClassEventHandler; | ||
This will show a chat message every time a soldier fires a weapon. It is advised to use CAManBase instead of Man when dealing with soldiers, because Man is the parent class of all animals, including the randomly spawning rabbits, snakes and fish. Using CAManBase slightly reduces the overhead that would happen when any of these spawn (which actually happens pretty frequently). | ||
["AllVehicles", "getIn", {hint str _this}] call CBA_fnc_addClassEventHandler; | ||
This event happens every time a soldier enters a vehicle. | ||
*/ | ||
|
||
|
||
// fügt auf allen clients einen Add Action Eintrag für umgekippte Fahrzeuge hinzu | ||
// ersetzt player add action in onPlayerRespawn (viel performanter, da kein pulling) | ||
["LandVehicle", "Air"] apply | ||
{ | ||
[ | ||
_x, | ||
"init", | ||
{ | ||
params ["_vec"]; | ||
|
||
_vec addAction | ||
[ | ||
FLIP_ACTION_UNFLIP_TEXT call XTuerkiesText, | ||
{ | ||
params ["_target", "_caller", "_actionId", "_arguments"]; | ||
[_target] call FUNC(unFlip); | ||
}, | ||
[], | ||
0, | ||
false, | ||
true, | ||
"", | ||
format["[_target, _this] call %1", QFUNC(flipCheck)] | ||
]; | ||
}, | ||
nil, | ||
nil, | ||
true | ||
] call CBA_fnc_addClassEventHandler; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Description: | ||
* initialize CBA settings | ||
* | ||
* Author: | ||
* James | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Server only: | ||
* no | ||
* | ||
* Public: | ||
* no - should be called only once from XEH_PreInit.sqf at mission start | ||
* | ||
* Global: | ||
* no | ||
* | ||
* Sideeffects: | ||
* yes - create a new setting in the game addons options (according to category and name) | ||
* | ||
* Example: | ||
* [] call EFUNC(beam,initCBASettings); | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
[ | ||
QGVAR(on), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting. | ||
"CHECKBOX", // setting type | ||
"Aktiviert die Flip-Komponente", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. | ||
"OPT Komponenten", // Pretty name of the category where the setting can be found. Can be stringtable entry. | ||
true, // Default value <BOOLEAN> | ||
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer | ||
{} // function that will be executed once on mission start and every time the setting is changed. | ||
] call CBA_Settings_fnc_init; | ||
|
||
if (!GVAR(on)) exitWith{}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "..\script_component.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#define COMPONENT flip | ||
#define COMPONENT_BEAUTIFIED Flip | ||
#include "..\main\script_mission.hpp" | ||
|
||
#define DEBUG_MODE_MINIMAL | ||
// #define DEBUG_MODE_FULL | ||
// #define DISABLE_COMPILE_CACHE | ||
// #define ENABLE_PERFORMANCE_COUNTERS | ||
|
||
#ifdef DEBUG_ENABLED_flip | ||
#define DEBUG_MODE_FULL | ||
#endif | ||
|
||
#include "..\main\script_macros.hpp" | ||
#include "setup.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// hier bitte alle Variablen anlegen, die man in irgendeiner Weise | ||
// einstellen können soll oder irgendwann mal ändern will | ||
// Beispiele: Add-Action Texte, Variablen, Konstanten, Marker etc | ||
// #define MEIN_MAKRO ... | ||
#define FLIP_ACTION_UNFLIP_TEXT "Fahrzeug aufrichten" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#define MAJOR 4 | ||
#define MINOR 15 | ||
#define BUILD 1 | ||
#define BUILD 2 |
Oops, something went wrong.