92 ItemBase ingredient2 = ingredients[1];
93 return ingredient2.ConfigGetFloat(
"ragQuantity") > 0 && (ingredient2.GetHierarchyRootPlayer() || !ingredient2.GetInventory().IsAttachment());
99 ItemBase sourceItem = ingredients[1];
101 MiscGameplayFunctions.DropAllItemsInInventoryInBounds(sourceItem,
Vector(0.5, 0, 0.5));
104 int targetQty = sourceItem.ConfigGetFloat(
"ragQuantity");
106 int qtyMax = firstResult.GetQuantityMax();
107 int qtyMin = firstResult.GetQuantityMin();
108 int stackCount = (
int)
Math.
Ceil(targetQty / qtyMax);
113 for (
int i = 1; i < stackCount; ++i)
115 result =
ItemBase.Cast(player.SpawnEntityOnGroundRaycastDispersed(firstResult.GetType()));
117 MiscGameplayFunctions.TransferItemProperties(sourceItem, result,
true,
true,
true,
true);
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
int m_ResultToInventory[MAXIMUM_RESULTS]
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
void AddResult(string item)
void InsertIngredientEx(int index, string ingredient, string soundCategory, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
int m_ResultInheritsColor[MAXIMUM_RESULTS]
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_ResultSetQuantity[MAXIMUM_RESULTS]
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
float m_ResultSetHealth[MAXIMUM_RESULTS]
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
override bool CanDo(ItemBase ingredients[], PlayerBase player)
override void Do(ItemBase ingredients[], PlayerBase player, array< ItemBase > results, float specialty_weight)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float ModFloat(float x, float y)
Returns the floating-point remainder of x/y rounded towards zero.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float Ceil(float f)
Returns ceil of value.