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

◆ GetLiquidConfigProperty()

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

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

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

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetInt(), CGame::ConfigGetText(), g_Game и GetGame().