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

◆ GenerateHumanReadableRecipeList()

void PluginRecipesManagerBase::GenerateHumanReadableRecipeList ( )
inlineprotected

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

350 {
351 set<string> testset = new set<string>;
352
353 FileHandle file = OpenFile("$profile:RecipeDump.txt", FileMode.WRITE);
354 if ( file == 0 )
355 {
356 //error message
357 PrintString("failed to open file RecipeDump");
358 return;
359 }
360 array<int> recipes = new array<int>;
361 for (int i = 0; i < PluginRecipesManager.m_RecipeCache.Count(); i++)
362 {
363 string key = PluginRecipesManager.m_RecipeCache.GetKey(i);
364 CacheObject value = PluginRecipesManager.m_RecipeCache.GetElement(i);
365
366 string line = key;
367 recipes.Clear();
368 recipes.InsertAll( value.GetRecipes() );
369
370 //PrintString("Item: " + key);
371
372 for (int x = 0; x < recipes.Count(); x++)
373 {
374 int recipe_id = recipes.Get(x);
375 string recipe_name = Widget.TranslateString(GetRecipeName(recipe_id));
376 testset.Insert(recipe_name);
377
378 line += "," +recipe_name;
379 }
380 FPrintln(file, line);
381
382 }
383
384 // generate localized list of recipe names
385 foreach ( string st : testset)
386 {
387 FPrintln(file, st);
388 }
389
390 CloseFile(file);
391 }
void CacheObject()
Определения CacheObject.c:35
Icon x
void PluginRecipesManager()
Определения PluginRecipesManager.c:52
string GetRecipeName(int recipe_id)
Определения PluginRecipesManager.c:76
Obsolete Managed PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Определения EnScript.c:369
FileMode
Определения EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
int[] FileHandle
Определения EnSystem.c:390
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
WorkspaceWidget Widget
Defined in code.

Перекрестные ссылки CacheObject(), CloseFile(), FPrintln(), GetRecipeName(), OpenFile(), PluginRecipesManager(), PrintString() и x.