DIFF

class PluginRecipesManagerSource

PluginRecipesManager PluginRecipesManagerBase PluginBase

All members, including inherited

Constructors 2

void PluginRecipesManager()
References CreateAllRecipes(), GenerateRecipeCache(), new Timer()
Show 1 more, myTimer1
void ~PluginRecipesManager()

Constants 3

const int MAX_NUMBER_OF_RECIPES = GetMaxNumberOfRecipes()
Referenced by RegisterRecipe()
const int MAX_CONCURENT_RECIPES = 128
Referenced by SortIngredients()
const int MAX_INGREDIENTS = 5

Members 27

static ref map<string,ref CacheObject > m_RecipeCache = new map<string,ref CacheObject >
static ref map<typename, bool> m_RecipesInitializedItem = new map<typename, bool>
ref Timer m_TestTimer
int m_RegRecipeIndex
Referenced by RegisterRecipe()
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>
Referenced by GenerateRecipeCache()
static ref map<string, int> m_RecipeNamesList = new map<string, int>

all recipes

ref Timer myTimer1
ref array<int> m_RcpsArray
Referenced by MatchItems()
string m_BaseName
Referenced by MatchItems()
int m_RecipeID
Referenced by MatchItems()
int item_mask
int m_BaseMask
Referenced by MatchItems()
string m_ItemName
Referenced by MatchItems()
ref CacheObject m_CoItem
Referenced by MatchItems()
ref CacheObject m_CoBase
Referenced by MatchItems()

Methods 35

static int GetMaxNumberOfRecipes()
void SetEnableDebugCrafting(bool enable)
float GetRecipeLengthInSecs(int recipe_id)
float GetRecipeSpecialty(int recipe_id)
bool GetIsRepeatable(int recipe_id)
override void OnInit()
void CallbackGenerateCache()
bool IsRecipePossibleToPerform(int id, ItemBase itemA, ItemBase itemB, PlayerBase player)
protected bool RecipeSanityCheck(int num_of_ingredients, InventoryItemBase items[], PlayerBase player)
override protected void UnregisterRecipe(string clasname)
static int RecipeIDFromClassname(string classname)
Referenced by UnregisterRecipe()
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)
References Debug.Log(), int.ToString(), int.ToString()
Show 1 more, m_BitsResults
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()
RecipeAnimationInfo GetRecipeAnimationInfo(int recipeID, PlayerBase player, ItemBase mainItem, ItemBase target)
int GetAnimationCommandUID(int recipeID)