Skip to content

Commit

Permalink
Added loading of CBA config
Browse files Browse the repository at this point in the history
  • Loading branch information
dedmen committed Sep 19, 2016
1 parent 9b88cd3 commit 0819605
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class CfgFunctions
{
file="task_force_radio\functions";
class TaskForceArrowheadRadioInit{postInit = 1;};
class PreInit{preInit = 1;};
class ServerInit;
class ClientInit;
// A
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Name: TFAR_fnc_PreInit
Author(s):
Dedmen
Description:
Initialises CBA_Settings component
Parameters:
Nothing
Returns:
Nothing
Example:
Called by ArmA via functions library.
*/


// frame after preInit, but before postInit (from https://github.com/CBATeam/CBA_A3/blob/master/template/static_settings_addon/XEH_preInit.sqf)
0 spawn {
{
// do nothing if CBA auto_load_settings_file is enabled
if (isClass (configFile >> "CfgPatches" >> "cba_auto_load_settings_file")) exitWith {};

private _info = loadFile "userconfig\cba\settings.sqf";

_info = _info call CBA_settings_fnc_parse;

{
_x params ["_setting", "_value", "_force"];
[_setting, _value, _force, "server"] call CBA_settings_fnc_set;
} forEach _info;
} call CBA_fnc_directCall;
};

0 comments on commit 0819605

Please sign in to comment.