Merge branch 'master' into dynamicInteractMenu

This commit is contained in:
Nicolás Badano 2015-03-21 08:55:05 -03:00
commit 4fe09034ff

View File

@ -1,16 +1,16 @@
/* /*
* Author: commy2 * Author: commy2
*
* Check if the unit can interact. * Check if the unit can interact.
* *
* Arguments: * Arguments:
* 0: The player. (Object) * 0: The player. <OBJECT>
* 1: The interaction target. objNull to ignore. (Object) * 1: The interaction target. objNull to ignore. <OBJECT>
* 2: Exceptions. What general conditions are to skip? (Array) * 2: Exceptions. What general conditions are to skip? <ARRAY> (Optional)
* *
* Return Value: * Return Value:
* Unit can interact? * Unit can interact?
* *
* Public: No
*/ */
#include "script_component.hpp" #include "script_component.hpp"
@ -18,7 +18,11 @@ private ["_unit", "_target", "_exceptions"];
_unit = _this select 0; _unit = _this select 0;
_target = _this select 1; _target = _this select 1;
_exceptions = _this select 2; _exceptions = if (count _this > 2) then {
_this select 2;
} else {
[];
};
_exceptions = [_exceptions, {toLower _this}] call FUNC(map); _exceptions = [_exceptions, {toLower _this}] call FUNC(map);