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

◆ GenerateHumanReadableRecipeList()

void PluginRecipesManagerBase::GenerateHumanReadableRecipeList ( )
inlineprotected

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

343 {
344 set<string> testset = new set<string>;
345
346 FileHandle file = OpenFile("$profile:RecipeDump.txt", FileMode.WRITE);
347 if ( file == 0 )
348 {
349 //error message
350 PrintString("failed to open file RecipeDump");
351 return;
352 }
353 array<int> recipes = new array<int>;
354 for (int i = 0; i < PluginRecipesManager.m_RecipeCache.Count(); i++)
355 {
356 string key = PluginRecipesManager.m_RecipeCache.GetKey(i);
357 CacheObject value = PluginRecipesManager.m_RecipeCache.GetElement(i);
358
359 string line = key;
360 recipes.Clear();
361 recipes.InsertAll( value.GetRecipes() );
362
363 //PrintString("Item: " + key);
364
365 for (int x = 0; x < recipes.Count(); x++)
366 {
367 int recipe_id = recipes.Get(x);
368 string recipe_name = Widget.TranslateString(GetRecipeName(recipe_id));
369 testset.Insert(recipe_name);
370
371 line += "," +recipe_name;
372 }
373 FPrintln(file, line);
374
375 }
376
377 // generate localized list of recipe names
378 foreach ( string st : testset)
379 {
380 FPrintln(file, st);
381 }
382
383 CloseFile(file);
384 }
void CacheObject()
Определения CacheObject.c:35
Icon x
void PluginRecipesManager()
Определения PluginRecipesManager.c:52
string GetRecipeName(int recipe_id)
Определения PluginRecipesManager.c:76
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Определения EnScript.c:345
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.