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

◆ InitData()

static bool InitData ( )
staticprotected

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

210 {
211 TStringArray all_paths = new TStringArray;
212
213 all_paths.Insert("CfgVehicles");
214 all_paths.Insert("cfgLiquidDefinitions");
215
216 string config_path;
217 string child_name;
218 int scope;
219 string path;
220 int consumable_count;
221 for(int i = 0; i < all_paths.Count(); i++)
222 {
223 config_path = all_paths.Get(i);
224 int children_count = g_Game.ConfigGetChildrenCount(config_path);
225
226 for(int x = 0; x < children_count; x++)
227 {
228 g_Game.ConfigGetChildName(config_path, x, child_name);
229 path = config_path + " " + child_name;
230 scope = g_Game.ConfigGetInt(config_path + " " + child_name + " scope");
231 bool should_check = 1;
232 if (config_path == "CfgVehicles" && scope == 0)
233 {
234 should_check = 0;
235 }
236
237 if (should_check)
238 {
239 bool has_nutrition = g_Game.ConfigIsExisting(path + " Nutrition");
240 bool has_stages = g_Game.ConfigIsExisting(path + " Food");
241
242 if (has_nutrition || has_stages)
243 {
244 //Print("child name:" + child_name);
245 RegisterItem(child_name, consumable_count);//consumable_count value serves as an unique ID for each item
246 consumable_count++;
247 }
248 }
249 }
250 }
251 //Print("consumable_count " + consumable_count);
252 return true;
253 }
DayZGame g_Game
Определения DayZGame.c:3942
Icon x
string path
Определения OptionSelectorMultistate.c:142
static void RegisterItem(string classname, int id)
Определения PlayerStomach.c:189
array< string > TStringArray
Определения EnScript.c:712

Перекрестные ссылки g_Game, path, RegisterItem() и x.