2015-03-07 12:47:28 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
2015-08-24 19:55:48 +00:00
|
|
|
* Assign a medical role to a unit.
|
2015-03-07 12:25:28 +00:00
|
|
|
*
|
2015-03-07 12:47:28 +00:00
|
|
|
* Arguments:
|
2015-08-24 19:55:48 +00:00
|
|
|
* 0: The module logic <OBJECT>
|
|
|
|
* 1: Synchronized units <ARRAY>
|
|
|
|
* 2: Activated <BOOL>
|
2015-03-07 12:47:28 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 14:25:10 +00:00
|
|
|
* None
|
2015-03-07 12:47:28 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [LOGIC, [bob, kevin], true] call ACE_medical_fnc_moduleAssignMedicRoles
|
|
|
|
*
|
2015-03-07 12:47:28 +00:00
|
|
|
* Public: No
|
2015-03-07 12:25:28 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-24 19:55:48 +00:00
|
|
|
params ["_logic"];
|
2015-03-07 12:25:28 +00:00
|
|
|
|
|
|
|
if (!isNull _logic) then {
|
2016-09-04 14:44:22 +00:00
|
|
|
private _list = _logic getVariable ["EnableList", ""];
|
|
|
|
private _setting = _logic getVariable ["role", 0];
|
2015-03-07 12:25:28 +00:00
|
|
|
|
2015-08-24 19:55:48 +00:00
|
|
|
[_list, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
|
|
|
|
[synchronizedObjects _logic, QGVAR(medicClass), _setting, true] call EFUNC(common,assignObjectsInList);
|
|
|
|
};
|