Private Member Functions | |
| void | PluginRecipesManager () |
| void | ~PluginRecipesManager () |
| bool | IsEnableDebugCrafting () |
| void | SetEnableDebugCrafting (bool enable) |
| string | GetRecipeName (int recipe_id) |
| int | GetValidRecipes (ItemBase item1, ItemBase item2, array< int > ids, PlayerBase player) |
| int | GetValidRecipesProper (int num_of_items, ItemBase items[], array< int > ids, PlayerBase player) |
| float | GetRecipeLengthInSecs (int recipe_id) |
| float | GetRecipeSpecialty (int recipe_id) |
| bool | GetIsInstaRecipe (int recipe_id) |
| bool | GetIsRepeatable (int recipe_id) |
| override void | OnInit () |
| void | CallbackGenerateCache () |
| protected void | GenerateRecipeCache () |
| void | WalkRecipes () |
| protected void | MatchItems (TStringArray full_path) |
| bool | IsRecipePossibleToPerform (int id, ItemBase itemA, ItemBase itemB, PlayerBase player) |
| void | PerformRecipeServer (int id, ItemBase item_a, ItemBase item_b, PlayerBase player) |
| void | GenerateHumanReadableRecipeList () |
| array< RecipeBase > | GetRecipesForItem (string itemName) |
| protected bool | RecipeSanityCheck (int num_of_ingredients, InventoryItemBase items[], PlayerBase player) |
| override protected void | RegisterRecipe (RecipeBase recipe) |
| override protected void | UnregisterRecipe (string clasname) |
| protected bool | CheckRecipe (int id, ItemBase item1, ItemBase item2, PlayerBase player) |
| protected void | PrintCache () |
| protected 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 | |
| protected void | ClearResults () |
| protected bool | ResolveIngredients (int num_of_ingredients, int passes=0) |
| protected void | PrintResultMasks (int num) |
| protected int | GetRecipeIntersection (int num_of_ingredients, ItemBase items[]) |
| fills an array with recipe IDs which 'item_a' and 'item_b' share | |
| protected int | SortIngredients (int num_of_ingredients, ItemBase items_unsorted[], int resolved_recipes[]) |
| protected void | CreateAllRecipes () |
| string | GetSoundCategory (int recipeID, ItemBase item1, ItemBase item2) |
| RecipeAnimationInfo | GetRecipeAnimationInfo (int recipeID, PlayerBase player, ItemBase mainItem, ItemBase target) |
| int | GetAnimationCommandUID (int recipeID) |
Static Private Member Functions | |
| static int | GetMaxNumberOfRecipes () |
| static int | RecipeIDFromClassname (string classname) |
Private Attributes | |
| ref Timer | m_TestTimer |
| const int | MAX_NUMBER_OF_RECIPES = GetMaxNumberOfRecipes() |
| const int | MAX_CONCURENT_RECIPES = 128 |
| const int | MAX_INGREDIENTS = 5 |
| int | m_RegRecipeIndex |
| int | m_ResolvedRecipes [MAX_CONCURENT_RECIPES] |
| bool | m_EnableDebugCrafting = false |
| ItemBase | m_Ingredients [MAX_INGREDIENTS] |
| int | m_IngredientBitMask [MAX_INGREDIENTS] |
| int | m_IngredientBitMaskSize [MAX_INGREDIENTS] |
| int | m_BitsResults [MAX_INGREDIENTS] |
| ItemBase | m_ingredient1 [MAX_CONCURENT_RECIPES] |
| ItemBase | m_ingredient2 [MAX_CONCURENT_RECIPES] |
| ItemBase | m_ingredient3 [MAX_CONCURENT_RECIPES] |
| ItemBase | m_sortedIngredients [MAX_NUMBER_OF_INGREDIENTS] |
| ref array< int > | m_RecipesMatched = new array<int> |
| ref array< string > | m_CachedItems = new array<string> |
| ref array< ref RecipeBase > | m_RecipeList = new array<ref RecipeBase> |
| ref Timer | myTimer1 |
| ref array< int > | m_RcpsArray |
| string | m_BaseName |
| int | m_RecipeID |
| int | item_mask |
| int | m_BaseMask |
| string | m_ItemName |
| ref CacheObject | m_CoItem |
| ref CacheObject | m_CoBase |
Static Private Attributes | |
| static ref map< string, ref CacheObject > | m_RecipeCache = new map<string,ref CacheObject > |
| static ref map< typename, bool > | m_RecipesInitializedItem = new map<typename, bool> |
| static ref map< string, int > | m_RecipeNamesList = new map<string, int> |
|
inlineprivate |
|
inlineprivate |
References GenerateRecipeCache(), and Debug::Log().
|
inlineprivate |
Referenced by IsRecipePossibleToPerform(), and PerformRecipeServer().
|
inlineprivate |
References MAX_INGREDIENTS.
Referenced by SortIngredientsInRecipe().
|
inlineprivate |
References RegisterRecipies().
Referenced by PluginRecipesManager().
|
inlineprivate |
References CacheObject(), CloseFile(), FPrintln(), GetRecipeName(), OpenFile(), PrintString, and x.
|
inlineprivate |
References CFG_MAGAZINESPATH, CFG_VEHICLESPATH, CFG_WEAPONSPATH, CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetFullPath(), CGame::ConfigGetInt(), GetGame(), MatchItems(), CGame::ProfilerStart(), CGame::ProfilerStop(), WalkRecipes(), and x.
Referenced by CallbackGenerateCache(), and PluginRecipesManager().
|
inlinestaticprivate |
|
inlineprivate |
fills an array with recipe IDs which 'item_a' and 'item_b' share
References CacheObject(), GetType(), and x.
Referenced by GetValidRecipesProper().
Referenced by GenerateHumanReadableRecipeList().
|
inlineprivate |
References CacheObject().
References SortIngredientsInRecipe().
|
inlineprivate |
References ItemBase::DisassembleOnLastDetach(), GetValidRecipesProper(), and m_Ingredients.
|
inlineprivate |
References GetRecipeIntersection(), and SortIngredients().
Referenced by GetValidRecipes().
|
inlineprivate |
References m_EnableDebugCrafting.
|
inlineprivate |
References CheckRecipe(), m_Ingredients, RecipeSanityCheck(), and SortIngredientsInRecipe().
|
inlineprivate |
References CacheObject(), LayoutHolder::Count(), m_ItemName, m_RecipeID, and x.
Referenced by GenerateRecipeCache().
|
inlineprivate |
|
inlineprivate |
References CheckRecipe(), Error(), m_Ingredients, RecipeSanityCheck(), and SortIngredientsInRecipe().
|
inlineprivate |
References CreateAllRecipes(), GenerateRecipeCache(), and myTimer1.
|
inlineprivate |
References CacheObject(), and PrintString.
|
inlineprivate |
References Debug::Log().
Referenced by UnregisterRecipe().
|
inlineprivate |
References ACCEPTABLE_DISTANCE, vector::Distance(), MAX_INGREDIENTS, and SANITY_CHECK_ACCEPTABLE_RESULT.
Referenced by IsRecipePossibleToPerform(), and PerformRecipeServer().
|
inlineprivate |
References Error().
Referenced by RegisterRecipies().
References Math::Pow(), ResolveIngredients(), and x.
Referenced by ResolveIngredients(), and SortIngredientsInRecipe().
|
inlineprivate |
|
inlineprivate |
References SortIngredientsInRecipe().
Referenced by GetValidRecipesProper().
|
inlineprivate |
sorts ingredients correctly as either first or second ingredient based on their masks
References CacheObject(), ClearResults(), GetType(), Math::Log2(), and ResolveIngredients().
Referenced by GetSoundCategory(), IsRecipePossibleToPerform(), PerformRecipeServer(), and SortIngredients().
|
inlineprivate |
References RecipeIDFromClassname().
|
inlineprivate |
References CacheObject(), MAX_NUMBER_OF_INGREDIENTS, Math::Pow(), and x.
Referenced by GenerateRecipeCache().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by IsEnableDebugCrafting().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by ClearResults(), and RecipeSanityCheck().
|
private |
|
private |