2015-03-07 12:47:28 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Register synchronized objects from passed object as a medical facility
|
2015-03-07 12:25:28 +00:00
|
|
|
*
|
2015-03-07 12:47:28 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: The module logic <LOGIC>
|
|
|
|
* 1: units <ARRAY>
|
|
|
|
* 2: activated <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 14:25:10 +00:00
|
|
|
* None
|
2015-03-07 12:47:28 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-03-07 12:25:28 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
private ["_setting", "_objects"];
|
|
|
|
params [["_logic", objNull, [objNull]]];
|
2015-03-07 12:25:28 +00:00
|
|
|
if (!isNull _logic) then {
|
2015-11-30 16:27:09 +00:00
|
|
|
_setting = _logic getVariable ["class",0];
|
2015-03-07 12:25:28 +00:00
|
|
|
_objects = synchronizedObjects _logic;
|
|
|
|
{
|
|
|
|
if (local _x) then {
|
2015-11-30 16:27:09 +00:00
|
|
|
_x setVariable[QGVAR(isMedicalFacility), true, true];
|
2015-03-07 12:25:28 +00:00
|
|
|
};
|
2015-11-30 16:23:48 +00:00
|
|
|
} forEach _objects;
|
2015-03-07 12:25:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
true;
|