12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- private ["_propertyGroupName","_commonProperties","_groupProperties","_properties","_commonPropertiesUpdate","_combinedPropertiesUpdate","_key","_value","_currentValue","_updateInterface","_forceInterfaceUpdate"];
- _propertyGroupName = [cTabDisplayPropertyGroups,_this select 0] call cTab_fnc_getFromPairs;
- if (isNil "_propertyGroupName") exitWith {false};
- _commonProperties = [cTabSettings,"COMMON"] call cTab_fnc_getFromPairs;
- _groupProperties = [cTabSettings,_propertyGroupName] call cTab_fnc_getFromPairs;
- if (isNil "_groupProperties") then {_groupProperties = [];};
- _properties = _this select 1;
- _updateInterface = if (count _this > 2) then {_this select 2} else {true};
- _forceInterfaceUpdate = if (count _this > 3) then {_this select 3} else {false};
- _commonPropertiesUpdate = [];
- _combinedPropertiesUpdate = [];
- {
- _key = _x select 0;
- _value = _x select 1;
- call {
- _currentValue = [_groupProperties,_key] call cTab_fnc_getFromPairs;
- if (!isNil "_currentValue") exitWith {
- call {
- if !(_currentValue isEqualTo _value) exitWith {
- [_combinedPropertiesUpdate,_key,_value] call BIS_fnc_setToPairs;
- [_groupProperties,_key,_value] call BIS_fnc_setToPairs;
- };
- if (_forceInterfaceUpdate) then {
- [_combinedPropertiesUpdate,_key,_value] call BIS_fnc_setToPairs;
- };
- };
- };
- _currentValue = [_commonProperties,_key] call cTab_fnc_getFromPairs;
- if (!isNil "_currentValue") then {
- call {
- if !(_currentValue isEqualTo _value) then {
- [_commonPropertiesUpdate,_key,_value] call BIS_fnc_setToPairs;
- [_commonProperties,_key,_value] call BIS_fnc_setToPairs;
- };
- if (_forceInterfaceUpdate) then {
- [_commonPropertiesUpdate,_key,_value] call BIS_fnc_setToPairs;
- };
- };
- };
- };
- } forEach _properties;
- [cTabSettings,_propertyGroupName,_groupProperties] call BIS_fnc_setToPairs;
- [cTabSettings,"COMMON",_commonProperties] call BIS_fnc_setToPairs;
- if (!isNil "cTabIfOpen") then {
- call {
- if (!_updateInterface) exitWith {};
- if ((([cTabDisplayPropertyGroups,cTabIfOpen select 1] call cTab_fnc_getFromPairs) == _propertyGroupName) && {count _combinedPropertiesUpdate > 0}) exitWith {
- [_combinedPropertiesUpdate] call cTab_fnc_updateInterface;
- };
- if (count _commonPropertiesUpdate > 0) then {
- [_commonPropertiesUpdate] call cTab_fnc_updateInterface;
- };
- };
- };
- if (_combinedPropertiesUpdate isEqualTo [] && _combinedPropertiesUpdate isEqualTo []) exitWith {false};
- true
|