class PluginRecipesManagerSource
PluginRecipesManager › PluginRecipesManagerBase › PluginBase
All members, including inherited
Constructors 2
void PluginRecipesManager()void ~PluginRecipesManager()Constants 3
const int MAX_NUMBER_OF_RECIPES = GetMaxNumberOfRecipes()Referenced by RegisterRecipe()
const int MAX_CONCURENT_RECIPES = 128Referenced by SortIngredients()
const int MAX_INGREDIENTS = 5Members 27
static ref map<string,ref CacheObject > m_RecipeCache = new map<string,ref CacheObject >Referenced by GenerateHumanReadableRecipeList(), GenerateRecipeCache(), GetRecipeIntersection()
Show 5 more
, GetRecipesForItem(), MatchItems(), PrintCache(), SortIngredientsInRecipe(), and WalkRecipes()ref Timer m_TestTimerint m_RegRecipeIndexReferenced by RegisterRecipe()
int m_ResolvedRecipes[MAX_CONCURENT_RECIPES]Referenced by GetValidRecipesProper()
bool m_EnableDebugCrafting = falseItemBase m_Ingredients[MAX_INGREDIENTS]int m_IngredientBitMask[MAX_INGREDIENTS]int m_IngredientBitMaskSize[MAX_INGREDIENTS]int m_BitsResults[MAX_INGREDIENTS]Referenced by ClearResults(), PrintResultMasks(), ResolveIngredients()
Show 1 more
, SortIngredientsInRecipe()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]Referenced by GenerateRecipeCache()
ref array<ref RecipeBase> m_RecipeList = new array<ref RecipeBase>all recipes
all recipes
ref Timer myTimer1Referenced by PluginRecipesManager()
Referenced by MatchItems()
string m_BaseNameReferenced by MatchItems()
int m_RecipeIDReferenced by MatchItems()
int item_maskint m_BaseMaskReferenced by MatchItems()
string m_ItemNameReferenced by MatchItems()
ref CacheObject m_CoItemReferenced by MatchItems()
ref CacheObject m_CoBaseReferenced by MatchItems()
Methods 35
static int GetMaxNumberOfRecipes()bool IsEnableDebugCrafting()References m_EnableDebugCrafting
void SetEnableDebugCrafting(bool enable)References m_EnableDebugCrafting
Referenced by ActionWorldCraft.GetText(), ActionWorldCraft.OnActionInfoUpdate(), ItemBase.GetRecipesActions()
Show 1 more
, GenerateHumanReadableRecipeList()References RecipeBase.CheckRecipe(), array.Clear(), RecipeBase.GetID()
Show 7 more
, GetRecipeIntersection(), array.Insert(), SortIngredients(), m_ingredient1, m_ingredient2, m_RecipeList, and m_ResolvedRecipesReferenced by GetValidRecipes()
Referenced by CAContinuousCraft.Execute()
override void OnInit()References PluginBase.OnInit()
void CallbackGenerateCache()Referenced by PluginDiagMenu.CheckGenerateRecipeCache()
protected void GenerateRecipeCache()void WalkRecipes()References CacheObject.AddRecipe(), array.Count(), array.Count()
Show 9 more
, array.Get(), map.Get(), array.Get(), RecipeBase.GetID(), map.Insert(), Math.Pow(), RecipeBase.m_Ingredients, m_RecipeCache, and m_RecipeListReferenced by GenerateRecipeCache()
protected void MatchItems(TStringArray full_path)Referenced by GenerateRecipeCache()
bool IsRecipePossibleToPerform(int id, ItemBase itemA, ItemBase itemB, PlayerBase player)References CheckRecipe(), RecipeSanityCheck(), SortIngredientsInRecipe()
Show 2 more
, m_Ingredients, and m_sortedIngredientsReferenced by ActionWorldCraft.ActionConditionContinue()
void PerformRecipeServer(int id, ItemBase item_a, ItemBase item_b, PlayerBase player)References CheckRecipe(), Error(), RecipeBase.PerformRecipe()
Show 5 more
, RecipeSanityCheck(), SortIngredientsInRecipe(), m_Ingredients, m_RecipeList, and m_sortedIngredientsReferenced by ActionWorldCraft.OnFinishProgressServer()
void GenerateHumanReadableRecipeList()Referenced by PluginDiagMenu.CheckCraftingDump()
array<RecipeBase> GetRecipesForItem(string itemName)References map.Get(), CacheObject.GetRecipes(), array.Insert()
Show 2 more
, m_RecipeCache, and m_RecipeListReferenced by ScriptConsoleItemsTab.ListItemRelatedActions()
protected bool RecipeSanityCheck(int num_of_ingredients, InventoryItemBase items[], PlayerBase player)References vector.Distance(), EntityAI.GetHierarchyRootPlayer(), Object.GetPosition()
Show 3 more
, Object.GetPosition(), Object.IsAlive(), and MAX_INGREDIENTSoverride protected void RegisterRecipe(RecipeBase recipe)References Class.ClassName(), Error(), array.Insert()
Show 7 more
, map.Insert(), RecipeBase.SetID(), int.ToString(), m_RecipeList, m_RecipeNamesList, m_RegRecipeIndex, and MAX_NUMBER_OF_RECIPESoverride protected void UnregisterRecipe(string clasname)Referenced by UnregisterRecipe()
protected bool CheckRecipe(int id, ItemBase item1, ItemBase item2, PlayerBase player)protected void PrintCache()References map.Count(), CacheObject.DebugPrint(), map.GetElement()
Show 3 more
, map.GetKey(), PrintString(), and m_RecipeCacheprotected 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
Referenced by GetSoundCategory(), IsRecipePossibleToPerform(), PerformRecipeServer()
Show 1 more
, SortIngredients()protected void ClearResults()Referenced by SortIngredientsInRecipe()
Referenced by SortIngredientsInRecipe()
protected void PrintResultMasks(int num)fills an array with recipe IDs which 'item_a' and 'item_b' share
Referenced by GetValidRecipesProper()
protected int SortIngredients(int num_of_ingredients, ItemBase items_unsorted[], int resolved_recipes[])References array.Count(), array.Get(), SortIngredientsInRecipe()
Show 5 more
, m_ingredient1, m_ingredient2, m_RecipesMatched, m_sortedIngredients, and MAX_CONCURENT_RECIPESReferenced by GetValidRecipesProper()
protected void CreateAllRecipes()References PluginRecipesManagerBase.RegisterRecipies()
Referenced by PluginRecipesManager()
Referenced by ActionWorldCraft.GetSoundCategory()
RecipeAnimationInfo GetRecipeAnimationInfo(int recipeID, PlayerBase player, ItemBase mainItem, ItemBase target)Referenced by ActionWorldCraft.SetupAction()