This commit is contained in:
Glowbal 2015-03-27 16:26:18 +01:00
parent 4336cf0fc1
commit 7a091215e1

View File

@ -15,52 +15,32 @@
GVAR(settings) = [];
// Load settings from main config
_countOptions = count (configFile >> "ACE_Settings");
for "_index" from 0 to (_countOptions - 1) do {
_optionEntry = (configFile >> "ACE_Settings") select _index;
_parseConfigForSettings = {
private ["_config", "_countOptions", "_optionEntry", "_index"];
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
_x set [6, true];
} forEach GVAR(settings);
};
// @todo
// Load settings from server userconfig only if the ACE_ServerSettings is loaded
/*if (isClass (configFile >> "CfgPatches" >> "ACE_ServerSettings")) then {
DFUNC(serverUserConfig) = compile preprocessFileLineNumbers "\userconfig\ACE\ACE_Settings.hpp";
if !(isNil DFUNC(serverUserConfig)) then {
[] call FUNC(serverUserConfig);
_config = _this select 0;
_countOptions = count _config;
for "_index" from 0 to (_countOptions - 1) do {
_optionEntry = _config select _index;
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
if !(missionNamespace getVariable format ["%1_forced", _x]) then {
missionNamespace setVariable format ["%1_forced", _x, true];
publicVariable format ["%1_forced", _name];
};
} forEach GVAR(settingsList);
_x set [6, true];
} forEach GVAR(settings);
};
};*/
// Load settings from mission config
_countOptions = count (missionConfigFile >> "ACE_Settings");
for "_index" from 0 to (_countOptions - 1) do {
_optionEntry = (missionConfigFile >> "ACE_Settings") select _index;
[_optionEntry] call FUNC(setSettingFromConfig);
};
// Check if all settings should be forced
if (GVAR(forceAllSettings)) then {
{
_x set [6, true];
} forEach GVAR(settings);
};
// Server config
[configFile >> "ACE_ServerSettings"] call _parseConfigForSettings;
// Regular config
[configFile >> "ACE_Settings"] call _parseConfigForSettings;
// mission side settings
[missionConfigFile >> "ACE_Settings"] call _parseConfigForSettings;
// Publish all settings data
publicVariable QGVAR(settings);
// Publish all setting values