210 {
212
213 all_paths.Insert("CfgVehicles");
214 all_paths.Insert("cfgLiquidDefinitions");
215
216 string config_path;
217 string child_name;
218 int scope;
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
246 consumable_count++;
247 }
248 }
249 }
250 }
251
252 return true;
253 }
static void RegisterItem(string classname, int id)
array< string > TStringArray