DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ LoadWeatherPresets()

void PluginConfigHandler::LoadWeatherPresets ( )
inlineprotected

См. определение в файле PluginConfigDebugProfile.c строка 1139

1140 {
1141 if (m_WeatherPresets)
1142 {
1143 m_WeatherPresets.Clear();
1144 }
1145 else
1146 {
1147 m_WeatherPresets = new array<ref ScriptConsoleWeatherPreset>;
1148 }
1149
1150 CfgParamArray presetParam;
1151 array<ref CfgParam> weather_params = GetArray(WEATHER_PRESETS_LIST);
1152 for (int i = 0; i < weather_params.Count(); i++)
1153 {
1154 presetParam = CfgParamArray.Cast(weather_params.Get(i));
1155 if (!presetParam)
1156 continue;
1157
1158 CfgParamString paramWName = CfgParamString.Cast(presetParam.GetValueByName("Name", CFG_TYPE_STRING));
1159 CfgParamFloat paramOvercast = CfgParamFloat.Cast(presetParam.GetValueByName("Overcast", CFG_TYPE_FLOAT));
1160 CfgParamFloat paramRain = CfgParamFloat.Cast(presetParam.GetValueByName("Rain", CFG_TYPE_FLOAT));
1161 CfgParamFloat paramSnow = CfgParamFloat.Cast(presetParam.GetValueByName("Snow", CFG_TYPE_FLOAT));
1162 CfgParamFloat paramFog = CfgParamFloat.Cast(presetParam.GetValueByName("Fog", CFG_TYPE_FLOAT));
1163 CfgParamFloat paramWindMagnitude = CfgParamFloat.Cast(presetParam.GetValueByName("WindMagnitude", CFG_TYPE_FLOAT));
1164 CfgParamFloat paramWindDirection = CfgParamFloat.Cast(presetParam.GetValueByName("WindDirection", CFG_TYPE_FLOAT));
1165 CfgParamFloat paramVolFogDD = CfgParamFloat.Cast(presetParam.GetValueByName("VolFogDD", CFG_TYPE_FLOAT));
1166 CfgParamFloat paramVolFogHD = CfgParamFloat.Cast(presetParam.GetValueByName("VolFogHD", CFG_TYPE_FLOAT));
1167 CfgParamFloat paramVolFogHB = CfgParamFloat.Cast(presetParam.GetValueByName("VolFogHB", CFG_TYPE_FLOAT));
1168
1169 m_WeatherPresets.Insert(new ScriptConsoleWeatherPreset(paramWName.GetValue(), paramOvercast.GetValue(), paramRain.GetValue(), paramSnow.GetValue(), paramFog.GetValue(), paramWindMagnitude.GetValue(), paramWindDirection.GetValue(), paramVolFogDD.GetValue(), paramVolFogHD.GetValue(), paramVolFogHB.GetValue()));
1170 }
1171 }
const int CFG_TYPE_STRING
Определения CfgParam.c:1
const int CFG_TYPE_FLOAT
Определения CfgParam.c:3
void ScriptConsoleWeatherPreset(string name, float overcast, float rain, float snow, float fog, float windMagnitude, float windDir, float volFogDD, float volFogHD, float volFogHB)
Определения PluginConfigDebugProfile.c:34
const string WEATHER_PRESETS_LIST
Определения PluginConfigDebugProfile.c:89
ref array< ref ScriptConsoleWeatherPreset > m_WeatherPresets
Определения PluginConfigDebugProfile.c:96
array< ref CfgParam > GetArray(string key)
Определения PluginConfigDebugProfile.c:167

Перекрестные ссылки CFG_TYPE_FLOAT, CFG_TYPE_STRING, GetArray(), m_WeatherPresets, ScriptConsoleWeatherPreset() и WEATHER_PRESETS_LIST.

Используется в AddWeatherPreset() и OnInit().