2015-05-18 19:43:02 +00:00
|
|
|
/*
|
|
|
|
* Author: SilentSpike
|
2015-05-18 21:50:36 +00:00
|
|
|
* Contextually removes addons (given in ACE_Curator) from zeus based on their required addon(s)
|
|
|
|
*
|
|
|
|
* ACE_Curator format:
|
|
|
|
* ModuleAddon = "RequiredAddon";
|
|
|
|
* OR
|
|
|
|
* ModuleAddon[] = {"RequiredAddon1","RequiredAddon2",...}
|
2015-05-18 19:43:02 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The zeus logic <LOGIC>
|
|
|
|
* 1: The zeus player <UNIT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2016-11-15 12:07:48 +00:00
|
|
|
* None
|
2015-05-18 19:43:02 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [LOGIC, bob] call ace_zeus_fnc_handleZeusUnitAssigned
|
|
|
|
*
|
2015-05-18 19:43:02 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-05-18 21:50:36 +00:00
|
|
|
#include "script_component.hpp"
|
2015-05-18 19:43:02 +00:00
|
|
|
|
2015-05-18 21:50:36 +00:00
|
|
|
if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") };
|
|
|
|
|
2015-08-04 22:16:23 +00:00
|
|
|
params ["_logic"];
|
2017-10-10 14:39:59 +00:00
|
|
|
private _removeAddons = [];
|
2015-05-18 21:50:36 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _numCfgs = count (configFile >> "ACE_Curator");
|
2015-05-18 21:50:36 +00:00
|
|
|
for "_n" from 0 to (_numCfgs - 1) do {
|
2017-10-10 14:39:59 +00:00
|
|
|
private _cfg = (configFile >> "ACE_Curator") select _n;
|
2015-05-18 21:50:36 +00:00
|
|
|
|
|
|
|
if (isArray _cfg) then {
|
|
|
|
_requiredAddon = getArray _cfg;
|
|
|
|
{
|
|
|
|
if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith {
|
|
|
|
_removeAddons pushBack (configName _cfg);
|
|
|
|
};
|
2015-08-05 06:36:01 +00:00
|
|
|
} forEach _requiredAddon;
|
2015-05-18 21:50:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if (isText _cfg) then {
|
|
|
|
_requiredAddon = getText _cfg;
|
|
|
|
if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then {
|
|
|
|
_removeAddons pushBack (configName _cfg);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2015-05-18 19:43:02 +00:00
|
|
|
|
|
|
|
_logic removeCuratorAddons _removeAddons;
|