2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-09-03 05:11:49 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Executes code after setting are initilized.
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Arguments:
|
2015-09-03 05:11:49 +00:00
|
|
|
* 0: Code to execute <CODE>
|
|
|
|
* 1: Parameters to run the code with <ANY>
|
|
|
|
*
|
2016-06-18 09:50:41 +00:00
|
|
|
* Return Value:
|
2015-09-03 05:11:49 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [{if (GVAR(setting) then {x} else {y};}, []] call ace_common_fnc_runAfterSettingsInit
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_func", "_params"];
|
|
|
|
|
|
|
|
if (GVAR(settingsInitFinished)) then {
|
|
|
|
//Setting Already Finished, Direct Run the code
|
|
|
|
_params call _func;
|
|
|
|
} else {
|
|
|
|
//Waiting on settings, throw it on the delayed run array
|
|
|
|
GVAR(runAtSettingsInitialized) pushBack [_func, _params];
|
|
|
|
};
|