more common code cleanup

This commit is contained in:
commy2 2015-09-20 22:29:38 +02:00
parent 493ce1b092
commit 5fd1938f25
11 changed files with 19 additions and 16 deletions

View File

@ -80,6 +80,7 @@ if (_eventType == "ACEc") then {
["ACEg", ACEg] call FUNC(_handleNetEvent);
};
};
} forEach _eventTargets;
false
} count _eventTargets;
};
};

View File

@ -21,6 +21,7 @@ params ["_client"];
_eventLog = _eventEntry select 1;
["SEH_s", _client, [_x, _eventLog]] call FUNC(targetEvent);
} forEach (GVAR(syncedEvents) select 0);
false
} count (GVAR(syncedEvents) select 0);
true

View File

@ -41,7 +41,8 @@ if (isServer) then {
{
_x params ["", "_eventArgs","_ttl"];
[_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
} forEach _eventLog;
false
} count _eventLog;
ACE_LOGINFO_1("[%1] synchronized",_eventName);
};

View File

@ -1,6 +1,5 @@
/*
* Author: commy2, idea by Falke
*
* Returns a brightness value depending on the sun and moon state. Ranges from 0 to 1 (dark ... bright).
*
* Arguments:

View File

@ -9,10 +9,10 @@
* None
*
* Example:
* [ACE_Player] call FUNC(applyForceWalkStatus)
* [ACE_Player] call ace_common_fnc_applyForceWalkStatus
*
* Public: No
*/
*/
#include "script_component.hpp"
params ["_unit"];

View File

@ -14,37 +14,40 @@
*
* Public: No
*/
#include "script_component.hpp"
private ["_splittedList", "_nilCheckPassedList"];
params ["_list", "_variable", "_setting", "_global"];
if (typeName _list == "STRING") then {
private ["_splittedList", "_nilCheckPassedList"];
_splittedList = [_list, ","] call BIS_fnc_splitString;
_nilCheckPassedList = "";
{
_x = [_x] call FUNC(stringRemoveWhiteSpace);
if !(isnil _x) then {
if !(isNil _x) then {
if (_nilCheckPassedList == "") then {
_nilCheckPassedList = _x;
} else {
_nilCheckPassedList = _nilCheckPassedList + ","+ _x;
};
};
}foreach _splittedList;
false
} count _splittedList;
_list = [] call compile format["[%1]",_nilCheckPassedList];
};
{
if (!isnil "_x") then {
if (!isNil "_x") then {
if (typeName _x == typeName objNull) then {
if (local _x) then {
_x setvariable [_variable, _setting, _global];
};
};
};
}foreach _list;
false
} count _list;
true

View File

@ -10,7 +10,6 @@
*
* Public: Yes
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {};

View File

@ -1,6 +1,5 @@
/*
* Author: commy2
*
* Is the unit able to enter the vehicle in the given position?
*
* Arguments:

View File

@ -10,6 +10,7 @@
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,6 +1,5 @@
/*
* Author: commy2
*
* Returns the current radio / chat / marker channel.
*
* Arguments:

View File

@ -1,5 +1,6 @@
/*
* Author: Glowbal
* ?
*
* Arguments:
* None
@ -9,7 +10,6 @@
*
* Public: No
*/
#include "script_component.hpp"
params ["_entity"];