-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1295 from SilentSpike/master
New zeus modules (#130)
- Loading branch information
Showing
25 changed files
with
339 additions
and
101 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Author: SilentSpike | ||
* Contextually removes addons (given in ACE_Curator) from zeus based on their required addon(s) | ||
* | ||
* ACE_Curator format: | ||
* ModuleAddon = "RequiredAddon"; | ||
* OR | ||
* ModuleAddon[] = {"RequiredAddon1","RequiredAddon2",...} | ||
* | ||
* Arguments: | ||
* 0: The zeus logic <LOGIC> | ||
* 1: The zeus player <UNIT> | ||
* | ||
* Return Value: | ||
* nil | ||
* | ||
* Public: No | ||
*/ | ||
|
||
#include "script_component.hpp" | ||
|
||
private ["_logic","_removeAddons","_numCfgs","_cfg","_requiredAddon"]; | ||
|
||
if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; | ||
|
||
_logic = _this select 0; | ||
_removeAddons = []; | ||
|
||
_numCfgs = count (configFile >> "ACE_Curator"); | ||
for "_n" from 0 to (_numCfgs - 1) do { | ||
_cfg = (configFile >> "ACE_Curator") select _n; | ||
|
||
if (isArray _cfg) then { | ||
_requiredAddon = getArray _cfg; | ||
{ | ||
if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith { | ||
_removeAddons pushBack (configName _cfg); | ||
}; | ||
} forEach _requiredAddon; | ||
}; | ||
|
||
if (isText _cfg) then { | ||
_requiredAddon = getText _cfg; | ||
if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then { | ||
_removeAddons pushBack (configName _cfg); | ||
}; | ||
}; | ||
}; | ||
|
||
_logic removeCuratorAddons _removeAddons; |
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,45 @@ | ||
/* | ||
* Author: SilentSpike | ||
* Flips the capture state of the unit the module is attached to. | ||
* | ||
* Arguments: | ||
* 0: The module logic <LOGIC> | ||
* 1: units <ARRAY> | ||
* 2: activated <BOOL> | ||
* | ||
* ReturnValue: | ||
* nil | ||
* | ||
* Public: no | ||
*/ | ||
|
||
#include "script_component.hpp" | ||
|
||
PARAMS_3(_logic,_units,_activated); | ||
private ["_unit","_captive"]; | ||
|
||
if (!_activated) exitWith {}; | ||
|
||
if (isNil QEFUNC(captives,setHandcuffed)) then { | ||
["STR_ACE_Zeus_RequiresAddon"] call EFUNC(common,displayTextStructured); | ||
} else { | ||
_unit = attachedTo _logic; | ||
|
||
if (isNull _unit) then { | ||
["STR_ACE_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured); | ||
} else { | ||
if !(_unit isKindOf "CAManBase") then { | ||
["STR_ACE_Zeus_OnlyInfantry"] call EFUNC(common,displayTextStructured); | ||
} else { | ||
if !(alive _unit) then { | ||
["STR_ACE_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured); | ||
} else { | ||
_captive = GETVAR(_unit,EGVAR(captives,isHandcuffed),false); | ||
// Event initalized by ACE_Captives | ||
["SetHandcuffed", _unit, [_unit, !_captive]] call EFUNC(common,targetEvent); | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
deleteVehicle _logic; |
Oops, something went wrong.