ACE3/addons/cargo/functions/fnc_moduleMakeLoadable.sqf

35 lines
833 B
Plaintext
Raw Normal View History

2016-01-22 04:12:54 +00:00
/*
* Author: PabstMirror
* Module to make an object loadable.
*
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [logic, [box], true] call ace_cargo_fnc_moduleMakeLoadable
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_objects", "_activated"];
TRACE_3("params",_logic,_objects,_activated);
if ((isNull _logic) || {!_activated}) exitWith {};
if (_objects isEqualTo []) exitWith {
ACE_LOGWARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic);
};
private _canLoad = _logic getVariable ["canLoad", true];
private _setSize = _logic getVariable ["setSize", 1];
TRACE_2("settings",_canLoad,_setSize);
{
[_x, _canLoad, _setSize] call FUNC(makeLoadable);
} forEach _objects;