Merge pull request #419 from acemod/cfgtriggers

rename cfgAce_Triggers to ACE_Triggers
This commit is contained in:
commy2 2015-04-11 18:19:36 +02:00
commit e1bf475355
8 changed files with 12 additions and 11 deletions

View File

@ -1,10 +1,10 @@
class CfgACE_Triggers { class ACE_Triggers {
/* onPlace parameters: /* onPlace parameters:
0: OBJECT - unit placing 0: OBJECT - unit placing
1: OBJECT - Placed explosive 1: OBJECT - Placed explosive
2: STRING - Magazine classname 2: STRING - Magazine classname
3: ARRAY - vars 3: ARRAY - vars
Last Index: CfgACE_Triggers config of trigger type. Last Index: ACE_Triggers config of trigger type.
onSetup parameters: onSetup parameters:
0: STRING - Magazine Classname 0: STRING - Magazine Classname
*/ */

View File

@ -18,7 +18,8 @@ class CfgPatches {
#include "CfgMagazines.hpp" #include "CfgMagazines.hpp"
#include "CfgWeapons.hpp" #include "CfgWeapons.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
#include "CfgACE_Triggers.hpp"
#include "ACE_Triggers.hpp"
#include "ExplosivesUI.hpp" #include "ExplosivesUI.hpp"
class CfgActions { class CfgActions {

View File

@ -12,7 +12,7 @@
* None * None
* *
* Example: * Example:
* [player, _explosive, "SatchelCharge_Remote_Mag", [ConfigFile >> "CfgACE_Triggers" >> "Command"]] call ACE_Explosives_fnc_addClacker; * [player, _explosive, "SatchelCharge_Remote_Mag", [ConfigFile >> "ACE_Triggers" >> "Command"]] call ACE_Explosives_fnc_addClacker;
* *
* Public: Yes * Public: Yes
*/ */

View File

@ -24,7 +24,7 @@ _result = [_unit] call FUNC(getPlacedExplosives);
_children = []; _children = [];
{ {
if (!isNull(_x select 0)) then { if (!isNull(_x select 0)) then {
_required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires"); _required = getArray (ConfigFile >> "ACE_Triggers" >> (_x select 4) >> "requires");
if (_detonator in _required) then { if (_detonator in _required) then {
_item = ConfigFile >> "CfgMagazines" >> (_x select 3); _item = ConfigFile >> "CfgMagazines" >> (_x select 3);

View File

@ -20,7 +20,7 @@ private ["_unit", "_clackerList", "_adjustedList", "_list", "_filter"];
_unit = _this select 0; _unit = _this select 0;
_filter = nil; _filter = nil;
if (count _this > 1) then { if (count _this > 1) then {
_filter = ConfigFile >> "CfgACE_Triggers" >> (_this select 1); _filter = ConfigFile >> "ACE_Triggers" >> (_this select 1);
}; };
_clackerList = []; _clackerList = [];
_adjustedList = false; _adjustedList = false;
@ -31,7 +31,7 @@ _list = [];
_clackerList set [_foreachIndex, "X"]; _clackerList set [_foreachIndex, "X"];
_adjustedList = true; _adjustedList = true;
} else { } else {
if (isNil "_filter" || {(ConfigFile >> "CfgACE_Triggers" >> (_x select 4)) == _filter}) then { if (isNil "_filter" || {(ConfigFile >> "ACE_Triggers" >> (_x select 4)) == _filter}) then {
_list pushBack _x; _list pushBack _x;
}; };
}; };

View File

@ -33,7 +33,7 @@ if (isNil "_triggerConfig") exitWith {
}; };
_magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig; _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig;
_triggerConfig = ConfigFile >> "CfgACE_Triggers" >> _triggerConfig; _triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig;
if (isNil "_triggerConfig") exitWith { if (isNil "_triggerConfig") exitWith {
diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this]; diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this];

View File

@ -19,7 +19,7 @@
private ["_config"]; private ["_config"];
EXPLODE_3_PVT(_this,_explosive,_magazine,_trigger); EXPLODE_3_PVT(_this,_explosive,_magazine,_trigger);
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger; _config = ConfigFile >> "ACE_Triggers" >> _trigger;
// If the onSetup function returns true, it is handled elsewhere // If the onSetup function returns true, it is handled elsewhere
if (isText(_config >> "onSetup") && {[_explosive,_magazine] call compile getText (_config >> "onSetup")}) exitWith {}; if (isText(_config >> "onSetup") && {[_explosive,_magazine] call compile getText (_config >> "onSetup")}) exitWith {};

View File

@ -6,7 +6,7 @@
* 0: Explosive magazine <STRING> * 0: Explosive magazine <STRING>
* *
* Return Value: * Return Value:
* Supported triggers as CfgACE_Triggers config entries <ARRAY> * Supported triggers as ACE_Triggers config entries <ARRAY>
* *
* Example: * Example:
* _supports = ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_TriggerType * _supports = ["SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_TriggerType
@ -20,6 +20,6 @@ _config = getArray (ConfigFile >> "CfgMagazines" >> (_this select 0) >> "ACE_Tri
_count = count _config; _count = count _config;
for "_index" from 0 to (_count - 1) do { for "_index" from 0 to (_count - 1) do {
_result set [_index, ConfigFile >> "CfgACE_Triggers" >> (_config select _index)]; _result set [_index, ConfigFile >> "ACE_Triggers" >> (_config select _index)];
}; };
_result _result