mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
28 lines
632 B
Plaintext
28 lines
632 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Executes code after setting are initilized.
|
|
*
|
|
* Arguments:
|
|
* 0: Code to execute <CODE>
|
|
* 1: Parameters to run the code with <ANY>
|
|
*
|
|
* Return Value:
|
|
* 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];
|
|
};
|