DayZ 1.27
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 = GetGame().ConfigGetChildrenCount(config_path);
225
226 for(int x = 0; x < children_count; x++)
227 {
228 GetGame().ConfigGetChildName(config_path, x, child_name);
229 path = config_path + " " + child_name;
230 scope = GetGame().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 = GetGame().ConfigIsExisting(path + " Nutrition");
240 bool has_stages = GetGame().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 }
Icon x
string path
Определения OptionSelectorMultistate.c:142
static void RegisterItem(string classname, int id)
Определения PlayerStomach.c:189
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native bool ConfigIsExisting(string path)
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native CGame GetGame()
array< string > TStringArray
Определения EnScript.c:685

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetInt(), CGame::ConfigIsExisting(), GetGame(), path, RegisterItem() и x.