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

◆ InitAllLiquids()

static bool InitAllLiquids ( )
static

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

57 {
58 if (!g_Game)
59 return false;
60
61 string cfg_classname = "cfgLiquidDefinitions";
62 string property_value = "NULL_PROPERTY";
63 int cfg_item_count = g_Game.ConfigGetChildrenCount(cfg_classname);
64
65 for (int i = 0; i < cfg_item_count; i++)
66 {
67 string liquid_class_name;
68 GetGame().ConfigGetChildName(cfg_classname, i, liquid_class_name);
69 string liquid_full_path = string.Format("%1 %2",cfg_classname, liquid_class_name);
70 int config_liquid_type = GetGame().ConfigGetInt(string.Format("%1 type", liquid_full_path));
71
72 NutritionalProfile profile = SetUpNutritionalProfile(config_liquid_type, liquid_class_name);
73 LiquidInfo info = new LiquidInfo(liquid_class_name, profile);
74 m_LiquidInfosByType.Insert(config_liquid_type, info);
75 m_LiquidInfosByName.Insert(liquid_class_name, info);
76
77 //legacy stuff
78 m_AllLiquidsByType.Insert(config_liquid_type, profile);
79 m_AllLiquidsByName.Insert(liquid_class_name, profile);
80 }
81 return true;
82 }
DayZGame g_Game
Определения DayZGame.c:3868
static ref map< string, ref LiquidInfo > m_LiquidInfosByName
Определения Liquid.c:42
class LiquidInfo m_AllLiquidsByType
static ref map< int, ref LiquidInfo > m_LiquidInfosByType
Определения Liquid.c:41
static NutritionalProfile SetUpNutritionalProfile(int liquid_type, string liquid_class_name)
Определения Liquid.c:336
static ref map< string, ref NutritionalProfile > m_AllLiquidsByName
Определения Liquid.c:40
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.
Определения Liquid.c:3
proto native CGame GetGame()

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetInt(), g_Game, GetGame(), m_AllLiquidsByName, m_AllLiquidsByType, m_LiquidInfosByName, m_LiquidInfosByType и SetUpNutritionalProfile().