Merge pull request #2161 from acemod/settingBroadcastLocal

Don't broadcast localization for settings
This commit is contained in:
Glowbal 2015-08-15 17:34:42 +02:00
commit 7246298cc5
2 changed files with 10 additions and 9 deletions

View File

@ -15,17 +15,16 @@
private ["_parseConfigForDisplayNames", "_name"];
_parseConfigForDisplayNames = {
private "_optionEntry";
private ["_optionEntry", "_values", "_text"];
_optionEntry = _this select 0;
if !(isClass _optionEntry) exitwith {false};
_values = getArray (_optionEntry >> "values");
_x set [3, getText (_optionEntry >> "displayName")];
_x set [4, getText (_optionEntry >> "description")];
_x set [5, _values];
_x set [8, getText (_optionEntry >> "category")];
private "_values";
_values = _x select 5;
{
private "_text";
_text = _x;
if (((typeName _text) == "STRING") && {(count _text) > 1} && {(_text select [0,1]) == "$"}) then {
_text = localize (_text select [1, ((count _text) - 1)]); //chop off the leading $
@ -42,7 +41,9 @@ _parseConfigForDisplayNames = {
if !([configFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
if !([configFile >> "ACE_ServerSettings" >> _name] call _parseConfigForDisplayNames) then {
[missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames;
if !([missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
diag_log text format ["[ACE] - Setting found, but couldn't localize [%1] (server has but we don't?)", _name];
};
};
};

View File

@ -72,12 +72,12 @@ if (isNil _name) then {
_name,
_typeName,
(getNumber (_optionEntry >> "isClientSettable")) > 0,
getText (_optionEntry >> "displayName"),
getText (_optionEntry >> "description"),
getArray (_optionEntry >> "values"),
"", //getText (_optionEntry >> "displayName"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
"", //getText (_optionEntry >> "description"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
[], //getArray (_optionEntry >> "values"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
getNumber (_optionEntry >> "force") > 0,
_value,
getText (_optionEntry >> "category")
"" //getText (_optionEntry >> "category") //No need to broadcast, handeled by fnc_loadSettingsLocalizedText
];
//Strings in the values array won't be localized from the config, so just do that now: