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

◆ GetLiquidConfigProperty()

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

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

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

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