mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
65 lines
1.7 KiB
Plaintext
65 lines
1.7 KiB
Plaintext
|
// by CAA-Picard
|
||
|
|
||
|
// Read AGM_Parameters from config and set them on the mission namespace
|
||
|
_config = configFile >> "AGM_Parameters";
|
||
|
_count = count _config;
|
||
|
for "_index" from 0 to (_count - 1) do {
|
||
|
_x = _config select _index;
|
||
|
|
||
|
_name = configName _x;
|
||
|
_value = _x call bis_fnc_getcfgdata;
|
||
|
[_name, _value] call GVAR(fnc_setParameter);
|
||
|
};
|
||
|
|
||
|
_config = configFile >> "AGM_Parameters_Numeric";
|
||
|
_count = count _config;
|
||
|
for "_index" from 0 to (_count - 1) do {
|
||
|
_x = _config select _index;
|
||
|
|
||
|
_name = configName _x;
|
||
|
_value = _x call bis_fnc_getcfgdata;
|
||
|
[_name, _value] call GVAR(fnc_setParameter);
|
||
|
};
|
||
|
|
||
|
_config = configFile >> "AGM_Parameters_Boolean";
|
||
|
_count = count _config;
|
||
|
for "_index" from 0 to (_count - 1) do {
|
||
|
_x = _config select _index;
|
||
|
|
||
|
_name = configName _x;
|
||
|
_value = _x call bis_fnc_getcfgdata;
|
||
|
[_name, _value > 0] call GVAR(fnc_setParameter);
|
||
|
};
|
||
|
|
||
|
|
||
|
// Read AGM_Parameters from mission and set them on the mission namespace, replacing defaults if necesary
|
||
|
_config = missionConfigFile >> "AGM_Parameters";
|
||
|
_count = count _config;
|
||
|
for "_index" from 0 to (_count - 1) do {
|
||
|
_x = _config select _index;
|
||
|
|
||
|
_name = configName _x;
|
||
|
_value = _x call bis_fnc_getcfgdata;
|
||
|
[_name, _value] call GVAR(fnc_setParameter);
|
||
|
};
|
||
|
|
||
|
_config = missionConfigFile >> "AGM_Parameters_Numeric";
|
||
|
_count = count _config;
|
||
|
for "_index" from 0 to (_count - 1) do {
|
||
|
_x = _config select _index;
|
||
|
|
||
|
_name = configName _x;
|
||
|
_value = _x call bis_fnc_getcfgdata;
|
||
|
[_name, _value] call GVAR(fnc_setParameter);
|
||
|
};
|
||
|
|
||
|
_config = missionConfigFile >> "AGM_Parameters_Boolean";
|
||
|
_count = count _config;
|
||
|
for "_index" from 0 to (_count - 1) do {
|
||
|
_x = _config select _index;
|
||
|
|
||
|
_name = configName _x;
|
||
|
_value = _x call bis_fnc_getcfgdata;
|
||
|
[_name, _value > 0] call GVAR(fnc_setParameter);
|
||
|
};
|