forked from IDI-Systems/acre2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
God Mode - Expand and Improve (IDI-Systems#1001)
Co-authored-by: Ferran Obon <[email protected]>
- Loading branch information
1 parent
5537e54
commit 1f363d0
Showing
35 changed files
with
434 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: ACRE2Team | ||
* Returns given group's current targets. | ||
* | ||
* Arguments: | ||
* 1: Group (0-based index or -1 for current channel) <NUMBER> (default: 0) | ||
* | ||
* Return Value: | ||
* Group targets <ARRAY> | ||
* | ||
* Example: | ||
* [0] call acre_api_fnc_godModeGetGroupTargets | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params [["_group", 0, [0]]]; | ||
|
||
private _targets = []; | ||
|
||
if ((_group < -1) || {_group >= GODMODE_NUMBER_OF_GROUPS}) exitWith { | ||
ERROR_1("Invalid group ID. Group ID must be between -1 and %1, but %2 is entered.",GODMODE_NUMBER_OF_GROUPS-1,_group); | ||
[] | ||
}; | ||
|
||
if (_group < -1) then { | ||
_targets = [] call EFUNC(sys_godmode,getUnitsBIChannel); | ||
} else { | ||
_targets = EGVAR(sys_godmode,groupPresets) select _group; | ||
}; | ||
|
||
if (_targets isEqualType {}) then { | ||
_targets = call _targets; | ||
}; | ||
|
||
_targets |
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,36 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: ACRE2Team | ||
* Sets a visible name for the given God Mode group. | ||
* | ||
* Arguments: | ||
* 0: Name <STRING> | ||
* 1: Group to effect (0-based index) <NUMBER> (default: 0) | ||
* | ||
* Return Value: | ||
* Group name set successfully <BOOL> | ||
* | ||
* Example: | ||
* ["Admin", 0] call acre_api_fnc_godModeNameGroup | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params [ | ||
["_name", "", [""]], | ||
["_group", 0, [0]] | ||
]; | ||
|
||
if ((_group < 0) || {_group >= GODMODE_NUMBER_OF_GROUPS}) exitWith { | ||
ERROR_1("Invalid group ID. Group ID must be between 0 and %1, but %2 is entered.",GODMODE_NUMBER_OF_GROUPS-1,_group); | ||
false | ||
}; | ||
|
||
if (_name == "") exitWith { | ||
ERROR_1("Invalid name for group ID %1. Name must not be empty!",_group); | ||
false | ||
}; | ||
|
||
[_name, _group] call EFUNC(sys_godmode,nameGroup); | ||
|
||
true |
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
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
PREP(accessAllowed); | ||
PREP(addDisplayPassthroughKeys); | ||
PREP(getUnitsBIChannel); | ||
PREP(handlePttKeyPress); | ||
PREP(handlePttKeyPressUp); | ||
PREP(modifyAllowedUIDS); | ||
PREP(modifyGroup); | ||
PREP(nameGroup); | ||
PREP(sendText); |
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
Oops, something went wrong.