68 m_Name =
"RecipeBase default name";
120 if (!
found)
return false;
143 for (
int i = 0;
i <
ptr.Count();
i++)
188 string color =
item.ConfigGetString(
"color");
221 Error(
"failed to spawn entity " +
item_to_spawn +
" , make sure the classname exists and item can be spawned");
251 if (
res.IsItemBase())
260 if (!
resIb.IsMagazine())
263 resIb.SetQuantityMax();
271 mgzn.ServerSetAmmoMax();
459 Error(
"recipe invalid, at least one of the ingredients is NULL");
480 Error(
"CheckRecipe: recipe invalid, at least one of the ingredients is NULL");
497 Error(
"PerformRecipe: recipe invalid, at least one of the ingredients is NULL");
498 Debug.
Log(
"PerformRecipe: at least one of the ingredients is NULL",
"recipes");
525 Debug.
Log(
"CheckRecipe failed on server",
"recipes");
567 for (
int x = 0;
x <
ptr.Count();
x++)
574 string itemType =
item.GetType();
577 for (
int x = 0;
x <
ptr.Count();
x++)
592 for (
int x = 0;
x <
ptr.Count();
x++)
594 if (
ptr.Get(
x) ==
item)
return true;
608 for (
int x = 0;
x <
ptr.Count();
x++)
const float DEFAULT_SPAWN_DISTANCE
const int MAXIMUM_RESULTS
const int MAX_NUMBER_OF_INGREDIENTS
ScriptConsoleEnfScriptTab ScriptConsoleTabBase OnSelected()
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.
string m_ItemsToCreate[MAXIMUM_RESULTS]
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
void InsertIngredientEx(int index, string ingredient, string soundCategory)
void SpawnItems(ItemBase ingredients[], PlayerBase player, array< ItemBase > spawned_objects)
int m_ResultToInventory[MAXIMUM_RESULTS]
bool CheckIngredientMatch(ItemBase item1, ItemBase item2)
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
float m_ResultSetHealth[MAXIMUM_RESULTS]
void DeleleIngredientsPass()
float m_ResultSetQuantity[MAXIMUM_RESULTS]
void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
bool CanDo(ItemBase ingredients[], PlayerBase player)
bool IsItemInRecipe(string item)
ref array< string > m_SoundCategories[MAX_NUMBER_OF_INGREDIENTS]
void OnSelected(ItemBase item1, ItemBase item2, PlayerBase player)
string GetSoundCategory(int ingredientIndex, ItemBase item)
ref array< string > m_Ingredients[MAX_NUMBER_OF_INGREDIENTS]
int GetIngredientMaskForItem(string item)
returns a mask which marks ingredient positions for a given item in this recipe(for example mask of v...
float m_ResultSpawnDistance[MAXIMUM_RESULTS]
void AddResult(string item)
bool m_ResultUseSoftSkills[MAXIMUM_RESULTS]
ItemBase m_Items[MAX_NUMBER_OF_INGREDIENTS]
ItemBase m_IngredientsSorted[MAX_NUMBER_OF_INGREDIENTS]
void ApplyModificationsIngredients(ItemBase sorted[], PlayerBase player)
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
void ApplySoftSkillsSpecialty(PlayerBase player)
void OnSelectedRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
bool CheckConditions(ItemBase sorted[])
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
void PerformRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
void InsertIngredient(int index, string ingredient)
void ApplyModificationsResults(ItemBase sorted[], array< ItemBase > results, ItemBase result, PlayerBase player)
int m_ResultInheritsColor[MAXIMUM_RESULTS]
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
void RemoveIngredient(int index, string ingredient)
void GetAllItems(array< string > items)
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
bool m_AnywhereInInventory
bool CheckRecipe(ItemBase item1, ItemBase item2, PlayerBase player)
ref array< ItemBase > m_IngredientsToBeDeleted
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
const float CRAFTING_TIME_UNIT_SIZE
static proto float Pow(float v, float power)
Return power of v ^ power.