Changed initialization order of config settings.

ACE_Settings should never force any setting by default. Loading it first ensures that all settings from ACE_Settings exist. This way, ACE_ServerSettings will override ACE_Settings, even if no force is used. Mission settings will override the server config settings, if no force is used.

This ensures that all settings are of their correct type, in case an outdated or corrupt server config is used, as well as have their correct localized display name and description
This commit is contained in:
Glowbal 2015-04-05 12:38:10 +02:00
parent 279641787d
commit f1a3d588ba

View File

@ -32,12 +32,18 @@ _parseConfigForSettings = {
};
};
// Server config
[configFile >> "ACE_ServerSettings"] call _parseConfigForSettings;
// Order is this way because:
// ACE_Settings should never force any setting by default. Loading it first ensures that all settings from ACE_Settings exist.
// This way, ACE_ServerSettings will override ACE_Settings, even if no force is used.
// Mission settings will override the server config settings, if no force is used.
// This ensures that all settings are of their correct type, in case an outdated or corrupt server config is used , as well as have their correct localized display name and description
// Regular config
[configFile >> "ACE_Settings"] call _parseConfigForSettings;
// Server config
[configFile >> "ACE_ServerSettings"] call _parseConfigForSettings;
// mission side settings
[missionConfigFile >> "ACE_Settings"] call _parseConfigForSettings;