-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated and adjusted the eventhandler setup and fixed arsenal (#1093)
* Improved and adjusted the eventhandler setup and arsenal Moved eventhandlers to respective init functions Added new handling for Ace Arsenal and default loadous. Zeus and Debug now have access to all gear as well as all loadouts Improved documentation * Added missing function * Fixed function call * Updated and fixed arsenal * Removed Dewbugging
- Loading branch information
1 parent
eb229ea
commit 270d409
Showing
15 changed files
with
142 additions
and
62 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
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,37 @@ | ||
#include "..\script_component.hpp"; | ||
/* | ||
* Author: CPL.Brostrom.A | ||
* This function initzialise ace arsenal default loadouts in eden and in mission. | ||
* | ||
* Example: | ||
* call cScripts_fnc_init_aceArsenal | ||
* | ||
* Public: No | ||
*/ | ||
|
||
if (!EGVAR(patches,usesACEArsenal)) exitWith {}; | ||
|
||
call FUNC(addDefaultArsenalLoadouts); | ||
|
||
if (is3DEN) exitWith {}; | ||
|
||
GVAR(StagingArsenalOpen) = false; | ||
|
||
// Event Handlers | ||
["ace_arsenal_displayClosed", { | ||
if (GVAR(StagingArsenalOpen)) then { | ||
[QEGVAR(EH_StagingArsenal,displayClose)] call CBA_fnc_localEvent; | ||
}; | ||
}] call CBA_fnc_addEventHandler; | ||
|
||
[QEGVAR(EH_StagingArsenal,displayOpen), { | ||
GVAR(StagingArsenalOpen) = true; | ||
}] call CBA_fnc_addEventHandler; | ||
|
||
[QEGVAR(EH_StagingArsenal,displayClosed), { | ||
[player, true] call ace_arsenal_fnc_removeBox; | ||
GVAR(StagingArsenalOpen) = false; | ||
|
||
// Reset default loadouts | ||
call FUNC(addDefaultArsenalLoadouts); | ||
}] call CBA_fnc_addEventHandler; |
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
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
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,24 @@ | ||
#include "..\script_component.hpp"; | ||
/* | ||
* Author: SGT.Brostrom.A | ||
* This function return true if a player is curator | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* true/False <BOOLEAN> | ||
* | ||
* Example: | ||
* call cScripts_fnc_unit_setInsignia | ||
* | ||
*/ | ||
|
||
private _curator = player getVariable [QEGVAR(Player,Unit), ""]; | ||
_curator = toLower _curator; | ||
if (_curator == "s3") exitWith {true}; | ||
if (_curator == "zeus") exitWith {true}; | ||
if (_curator == "curator") exitWith {true}; | ||
if (_curator == "debug") exitWith {true}; | ||
|
||
false |
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
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
14 changes: 14 additions & 0 deletions
14
cScripts/functions/systems/fn_clearDefaultArsenalLoadouts.sqf
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,14 @@ | ||
#include "..\script_component.hpp"; | ||
/* | ||
* Author: SGT.Brostrom.A | ||
* This function remove all ace arsenal default loadouts. | ||
* | ||
* Example: | ||
* call cScripts_fnc_removeDefaultArsenalLoadouts | ||
* | ||
* Public: No | ||
*/ | ||
|
||
if (!EGVAR(patches,usesACEArsenal)) exitWith {}; | ||
|
||
ace_arsenal_defaultLoadoutsList = []; |
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