|
void | GenerateRecipeCache () |
|
void | WalkRecipes () |
|
void | MatchItems (TStringArray full_path) |
|
void | PerformRecipeServer (int id, ItemBase item_a, ItemBase item_b, PlayerBase player) |
|
void | GenerateHumanReadableRecipeList () |
|
array< RecipeBase > | GetRecipesForItem (string itemName) |
|
bool | RecipeSanityCheck (int num_of_ingredients, InventoryItemBase items[], PlayerBase player) |
|
void | RegisterRecipe (RecipeBase recipe) |
|
void | UnregisterRecipe (string clasname) |
|
bool | CheckRecipe (int id, ItemBase item1, ItemBase item2, PlayerBase player) |
|
void | PrintCache () |
|
bool | SortIngredientsInRecipe (int id, int num_of_ingredients, ItemBase ingredients_unsorted[], ItemBase ingredients_sorted[]) |
| sorts ingredients correctly as either first or second ingredient based on their masks
|
|
void | ClearResults () |
|
bool | ResolveIngredients (int num_of_ingredients, int passes=0) |
|
void | PrintResultMasks (int num) |
|
int | GetRecipeIntersection (int num_of_ingredients, ItemBase items[]) |
| fills an array with recipe IDs which 'item_a' and 'item_b' share
|
|
int | SortIngredients (int num_of_ingredients, ItemBase items_unsorted[], int resolved_recipes[]) |
|
void | CreateAllRecipes () |
|
string | GetSoundCategory (int recipeID, ItemBase item1, ItemBase item2) |
|
int | GetAnimationCommandUID (int recipeID) |
|
◆ ~PluginRecipesManager()
◆ CallbackGenerateCache()
void CallbackGenerateCache |
( |
| ) |
|
|
inlineprivate |
160 {
161 Debug.
Log(
"CallbackGenerateCache",
"recipes");
163
164
165 }
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:136
void GenerateRecipeCache()
Definition PluginRecipesManager.c:167
Перекрестные ссылки GenerateRecipeCache() и Debug::Log().
◆ CheckRecipe()
444 {
447 }
ref array< ref RecipeBase > m_RecipeList
Definition PluginRecipesManager.c:42
Definition RecipeBase.c:5
Используется в PerformRecipeServer().
◆ ClearResults()
488 {
490 {
492 }
493
494 }
const int MAX_INGREDIENTS
Definition PluginRecipesManager.c:21
int m_BitsResults[MAX_INGREDIENTS]
Definition PluginRecipesManager.c:31
Перекрестные ссылки MAX_INGREDIENTS.
Используется в SortIngredientsInRecipe().
◆ CreateAllRecipes()
void CreateAllRecipes |
( |
| ) |
|
|
inlineprotected |
627 {
629 }
void RegisterRecipies()
Please do not delete commented recipes, they are usually commented out for a reason.
Definition PluginRecipesManagerBase.c:14
Перекрестные ссылки RegisterRecipies().
Используется в PluginRecipesManager().
◆ GenerateHumanReadableRecipeList()
void GenerateHumanReadableRecipeList |
( |
| ) |
|
|
inlineprotected |
316 {
318
321 {
322
324 return;
325 }
328 {
331
335
336
337
339 {
343
345 }
347
348 }
349
350
352 {
354 }
355
357 }
void CacheObject()
Definition CacheObject.c:35
void PluginRecipesManager()
Definition PluginRecipesManager.c:52
string GetRecipeName(int recipe_id)
Definition PluginRecipesManager.c:76
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Definition EnScript.c:345
FileMode
Definition EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.
Перекрестные ссылки CacheObject(), CloseFile(), FPrintln(), GetRecipeName(), OpenFile(), PrintString() и x.
◆ GenerateRecipeCache()
void GenerateRecipeCache |
( |
| ) |
|
|
inlineprotected |
168 {
169 GetGame().ProfilerStart(
"m_RecipeCache");
170
171
174
176
180
187 {
190
192 {
195
197 {
200 }
201 }
202 }
203 GetGame().ProfilerStop(
"m_RecipeCache");
204 }
void WalkRecipes()
Definition PluginRecipesManager.c:206
ref array< string > m_CachedItems
Definition PluginRecipesManager.c:40
void MatchItems(TStringArray full_path)
Definition PluginRecipesManager.c:250
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
proto native CGame GetGame()
array< string > TStringArray
Definition EnScript.c:685
Перекрестные ссылки CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, GetGame(), MatchItems(), WalkRecipes() и x.
Используется в CallbackGenerateCache() и PluginRecipesManager().
◆ GetAnimationCommandUID()
int GetAnimationCommandUID |
( |
int | recipeID | ) |
|
|
inlineprotected |
◆ GetIsInstaRecipe()
bool GetIsInstaRecipe |
( |
int | recipe_id | ) |
|
|
inlineprivate |
146 {
148 else return false;
149 }
◆ GetMaxNumberOfRecipes()
48 {
49 return 2048;
50 }
◆ GetRecipeIntersection()
int GetRecipeIntersection |
( |
int | num_of_ingredients, |
|
|
ItemBase | items[] ) |
|
inlineprotected |
fills an array with recipe IDs which 'item_a' and 'item_b' share
557 {
562
563
564
565
566
567
569
571 {
574 {
575 return 0;
576 }
578 {
582 }
583 }
584
585
588 {
591 {
593 {
596 {
599 }
600 }
601 }
602 }
604 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
ref array< int > m_RecipesMatched
Definition PluginRecipesManager.c:39
Перекрестные ссылки CacheObject(), GetType() и x.
Используется в GetValidRecipesProper().
◆ GetRecipeLengthInSecs()
float GetRecipeLengthInSecs |
( |
int | recipe_id | ) |
|
|
inlineprivate |
134 {
136 return 0;
137 }
◆ GetRecipeName()
◆ GetRecipesForItem()
360 {
363
366 {
368 }
369
371 }
Перекрестные ссылки CacheObject().
◆ GetRecipeSpecialty()
float GetRecipeSpecialty |
( |
int | recipe_id | ) |
|
|
inlineprivate |
140 {
142 return 0;
143 }
◆ GetSoundCategory()
633 {
636
639
641
644
646 {
648 }
649
651 }
Definition InventoryItem.c:731
bool SortIngredientsInRecipe(int id, int num_of_ingredients, ItemBase ingredients_unsorted[], ItemBase ingredients_sorted[])
sorts ingredients correctly as either first or second ingredient based on their masks
Definition PluginRecipesManager.c:462
Перекрестные ссылки SortIngredientsInRecipe().
◆ GetValidRecipes()
87 {
89 {
91 return 0;
92 }
93
94 if ( (
item1.GetInventory().IsAttachment() &&
item1.GetHierarchyParent().DisassembleOnLastDetach() ) || (
item2.GetInventory().IsAttachment() &&
item2.GetHierarchyParent().DisassembleOnLastDetach() ) )
95 {
97 return 0;
98 }
101
103 }
ItemBase m_Ingredients[MAX_INGREDIENTS]
Definition PluginRecipesManager.c:27
int GetValidRecipesProper(int num_of_items, ItemBase items[], array< int > ids, PlayerBase player)
Definition PluginRecipesManager.c:105
Перекрестные ссылки GetValidRecipesProper().
◆ GetValidRecipesProper()
106 {
110
111
112
113
114
115
120 {
122
124 {
127 }
128 }
130 }
int GetRecipeIntersection(int num_of_ingredients, ItemBase items[])
fills an array with recipe IDs which 'item_a' and 'item_b' share
Definition PluginRecipesManager.c:556
int SortIngredients(int num_of_ingredients, ItemBase items_unsorted[], int resolved_recipes[])
Definition PluginRecipesManager.c:606
int m_ResolvedRecipes[MAX_CONCURENT_RECIPES]
Definition PluginRecipesManager.c:24
ItemBase m_ingredient2[MAX_CONCURENT_RECIPES]
Definition PluginRecipesManager.c:34
ItemBase m_ingredient1[MAX_CONCURENT_RECIPES]
Definition PluginRecipesManager.c:33
Перекрестные ссылки GetRecipeIntersection() и SortIngredients().
Используется в GetValidRecipes().
◆ IsEnableDebugCrafting()
bool IsEnableDebugCrafting |
( |
| ) |
|
|
inlineprivate |
67 {
69 }
bool m_EnableDebugCrafting
Definition PluginRecipesManager.c:26
Перекрестные ссылки m_EnableDebugCrafting.
◆ MatchItems()
251 {
254
256 {
259 }
261 {
265 {
267
269 {
271
272
274
276 }
277 }
278 }
279
280
281 }
string m_BaseName
Definition PluginRecipesManager.c:241
static ref map< string, ref CacheObject > m_RecipeCache
Definition PluginRecipesManager.c:14
ref CacheObject m_CoItem
Definition PluginRecipesManager.c:246
ref CacheObject m_CoBase
Definition PluginRecipesManager.c:247
string m_ItemName
Definition PluginRecipesManager.c:245
int m_BaseMask
Definition PluginRecipesManager.c:244
ref array< int > m_RcpsArray
Definition PluginRecipesManager.c:240
int m_RecipeID
Definition PluginRecipesManager.c:242
Перекрестные ссылки CacheObject(), m_ItemName, m_RecipeID и x.
Используется в GenerateRecipeCache().
◆ OnInit()
◆ PerformRecipeServer()
284 {
287
289 {
290 Error(
"PerformRecipeServer - one of the items null !!");
291 return;
292 }
293
295
298
300 {
301 Error(
"PerformRecipeServer - recipe not valid !!");
302 return;
303 }
305 {
306 Error(
"PerformRecipeServer - recipe failed to pass sanity check !!");
307 return;
308 }
311
312
313 }
bool RecipeSanityCheck(int num_of_ingredients, InventoryItemBase items[], PlayerBase player)
Definition PluginRecipesManager.c:373
bool CheckRecipe(int id, ItemBase item1, ItemBase item2, PlayerBase player)
Definition PluginRecipesManager.c:443
ItemBase m_sortedIngredients[MAX_NUMBER_OF_INGREDIENTS]
Definition PluginRecipesManager.c:37
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
Перекрестные ссылки CheckRecipe(), Error(), RecipeSanityCheck() и SortIngredientsInRecipe().
◆ PluginRecipesManager()
void PluginRecipesManager |
( |
| ) |
|
|
inlineprivate |
53 {
54
57
59 }
void CreateAllRecipes()
Definition PluginRecipesManager.c:626
ref Timer myTimer1
Definition PluginRecipesManager.c:45
Definition DayZPlayerImplement.c:63
Перекрестные ссылки CreateAllRecipes(), GenerateRecipeCache() и myTimer1.
◆ PrintCache()
◆ PrintResultMasks()
548 {
549 for (
int i = 0;
i <
num;
i++)
550 {
552 }
553 }
Перекрестные ссылки Debug::Log().
◆ RecipeIDFromClassname()
437 {
440 return -1;
441 }
static ref map< string, int > m_RecipeNamesList
Definition PluginRecipesManager.c:43
Используется в UnregisterRecipe().
◆ RecipeSanityCheck()
374 {
376
378 {
383
385 {
387 }
388
390 {
392 }
393
395 {
397 }
398 }
400 {
402 {
403 return false;
404 }
405 }
406 return true;
407 }
const int SANITY_CHECK_ACCEPTABLE_RESULT
Definition PluginRecipesManager.c:10
ERecipeSanityCheck
Definition PluginRecipesManager.c:2
enum ERecipeSanityCheck ACCEPTABLE_DISTANCE
Definition EnConvert.c:106
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Перекрестные ссылки ACCEPTABLE_DISTANCE, vector::Distance(), MAX_INGREDIENTS и SANITY_CHECK_ACCEPTABLE_RESULT.
Используется в PerformRecipeServer().
◆ RegisterRecipe()
410 {
411
413 {
415 }
416
420
421 }
int m_RegRecipeIndex
Definition PluginRecipesManager.c:23
const int MAX_NUMBER_OF_RECIPES
Definition PluginRecipesManager.c:19
Перекрестные ссылки Error().
Используется в RegisterRecipies().
◆ ResolveIngredients()
bool ResolveIngredients |
( |
int | num_of_ingredients, |
|
|
int | passes = 0 ) |
|
inlineprotected |
497 {
501
503 {
506 {
509 }
510 }
511
514
516 {
520 }
521
522
524
526 {
530 {
531 return false;
532 }
533 }
534
536
538
540 {
542 }
543 return true;
544 }
int m_IngredientBitMask[MAX_INGREDIENTS]
Definition PluginRecipesManager.c:28
int m_IngredientBitMaskSize[MAX_INGREDIENTS]
Definition PluginRecipesManager.c:29
bool ResolveIngredients(int num_of_ingredients, int passes=0)
Definition PluginRecipesManager.c:496
static proto float Pow(float v, float power)
Return power of v ^ power.
Перекрестные ссылки Math::Pow(), ResolveIngredients() и x.
Используется в ResolveIngredients() и SortIngredientsInRecipe().
◆ SetEnableDebugCrafting()
void SetEnableDebugCrafting |
( |
bool | enable | ) |
|
|
inlineprivate |
◆ SortIngredients()
int SortIngredients |
( |
int | num_of_ingredients, |
|
|
ItemBase | items_unsorted[], |
|
|
int | resolved_recipes[] ) |
|
inlineprotected |
◆ SortIngredientsInRecipe()
◆ UnregisterRecipe()
424 {
426
428 {
430
432
433 }
434 }
static int RecipeIDFromClassname(string classname)
Definition PluginRecipesManager.c:436
Перекрестные ссылки RecipeIDFromClassname().
◆ WalkRecipes()
◆ item_mask
◆ m_BaseMask
◆ m_BaseName
◆ m_BitsResults
◆ m_CachedItems
◆ m_CoBase
◆ m_CoItem
◆ m_EnableDebugCrafting
◆ m_ingredient1
◆ m_ingredient2
◆ m_ingredient3
◆ m_IngredientBitMask
◆ m_IngredientBitMaskSize
◆ m_Ingredients
◆ m_ItemName
◆ m_RcpsArray
◆ m_RecipeCache
◆ m_RecipeID
◆ m_RecipeList
◆ m_RecipeNamesList
◆ m_RecipesInitializedItem
◆ m_RecipesMatched
◆ m_RegRecipeIndex
◆ m_ResolvedRecipes
◆ m_sortedIngredients
◆ m_TestTimer
◆ MAX_CONCURENT_RECIPES
◆ MAX_INGREDIENTS
◆ MAX_NUMBER_OF_RECIPES
◆ myTimer1
Объявления и описания членов класса находятся в файле: