DIFF

class RecipeBaseSource

Derived classes
View all 223 descendants

Constructors 1

Constants 1

protected const int BASE_CRAFT_ANIMATION_ID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING

Members 33

string m_ItemsToCreate[MAXIMUM_RESULTS]
Referenced by AddResult(), and SpawnItems()
ref array<string> m_SoundCategories[MAX_NUMBER_OF_INGREDIENTS]
protected ref array<ref RecipeAnimationInfo> m_AnimationInfos = new array<ref RecipeAnimationInfo>()

used for overriding animation based on ingredient

ItemBase m_Items[MAX_NUMBER_OF_INGREDIENTS]
ItemBase m_IngredientsSorted[MAX_NUMBER_OF_INGREDIENTS]

if the recipe is valid, this array will contain all ingredients sorted against the recipe ingredients

Referenced by CheckIngredientMatch(), CheckRecipe(), PerformRecipe()
Show 1 more, RecipeBase()
ref array<ItemBase> m_IngredientsToBeDeleted = new array<ItemBase>
int m_ID
Referenced by GetID(), and SetID()
int m_NumberOfResults
Referenced by AddResult(), ApplyModificationsResults(), RecipeBase()
Show 1 more, SpawnItems()
int m_RecipeUID

obsolete

float m_AnimationLength = 1

animation length in relative time units

float m_Specialty = 0

value > 0 for roughness, value < 0 for precision

bool m_IsInstaRecipe

should this recipe be performed instantly without animation

bool m_AnywhereInInventory

is this recipe valid even when neither of the items is in hands

float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
float m_ResultSetQuantity[MAXIMUM_RESULTS]
float m_ResultSetHealth[MAXIMUM_RESULTS]
float m_ResultSpawnDistance[MAXIMUM_RESULTS]
Referenced by RecipeBase(), and SpawnItems()
int m_ResultToInventory[MAXIMUM_RESULTS]
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
int m_ResultInheritsColor[MAXIMUM_RESULTS]
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
bool m_ResultUseSoftSkills[MAXIMUM_RESULTS]

Methods 33

void Init()
Referenced by RecipeBase()
protected void SetAnimation(DayZPlayerConstants uid)
References m_RecipeUID
float GetLengthInSecs()
float GetSpecialty()
References m_Specialty
bool IsRecipeAnywhere()
Referenced by CheckRecipe()
bool IsRepeatable()
bool CheckIngredientMatch(ItemBase item1, ItemBase item2)
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid = BASE_CRAFT_ANIMATION_ID, bool showItem = false)
void RemoveIngredient(int index, string ingredient)
void AddResult(string item)
bool IsInstaRecipe()
References m_IsInstaRecipe
void DeleleIngredientsPass()
Referenced by PerformRecipe()
void OnSelectedRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
References Error(), and OnSelected()
void OnSelected(ItemBase item1, ItemBase item2, PlayerBase player)
Referenced by OnSelectedRecipe()
void ApplySoftSkillsSpecialty(PlayerBase player)
void Do(ItemBase ingredients[], PlayerBase player, array<ItemBase> results, float specialty_weight)
Referenced by PerformRecipe()
void SetID(int id)
References m_ID
void GetAllItems(array<string> items)
References array.Count(), array.Get(), array.Insert()
Show 1 more, m_Ingredients
string GetSoundCategory(int ingredientIndex, ItemBase item)
int GetIngredientMaskForItem(string item)

returns a mask which marks ingredient positions for a given item in this recipe(for example mask of value 3 [....000011] means this item is both ingredient 1 and 2 in this recipe[from right to left])

References array.Count(), array.Get(), Math.Pow()
Show 1 more, m_Ingredients
int GetAnimationCommandUID()