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

◆ GetLiquidConfigProperty()

static string GetLiquidConfigProperty ( int liquid_type,
string property_name,
bool is_nutrition_property = false )
staticprivate

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

286 {
287 string cfg_classname = "cfgLiquidDefinitions";
288 string property_value = "NULL_PROPERTY";
289 if (!g_Game)
290 return property_value;
291
292 int cfg_item_count = g_Game.ConfigGetChildrenCount(cfg_classname);
293
294 for (int i = 0; i < cfg_item_count; i++)
295 {
296 string liquid_class_name;
297 g_Game.ConfigGetChildName(cfg_classname, i, liquid_class_name);
298 string liquid_full_path = string.Format("%1 %2", cfg_classname, liquid_class_name);
299 int config_liquid_type = g_Game.ConfigGetInt(string.Format("%1 type", liquid_full_path));
300
301 if (config_liquid_type == liquid_type)// found the specific class, now lets extract the values
302 {
303 if (!is_nutrition_property)
304 {
305 g_Game.ConfigGetText(string.Format("%1 %2", liquid_full_path, property_name), property_value);
306 return property_value;
307 }
308 else
309 {
310 g_Game.ConfigGetText(string.Format("%1 Nutrition %2", liquid_full_path, property_name), property_value);
311 return property_value;
312 }
313 }
314 }
315 return property_value;
316 }
DayZGame g_Game
Определения DayZGame.c:3942

Перекрестные ссылки g_Game.