5 m_Name =
"#STR_CraftFireplace0";
76 ItemBase ingredient1 = ingredients[0];
77 ItemBase ingredient2 = ingredients[1];
79 if ( ingredient1.Type() == ingredient2.Type() || ingredient1.GetInventory().GetSlotId(0) == ingredient2.GetInventory().GetSlotId(0) )
90 ItemBase ingredient1 = ingredients[0];
91 ItemBase ingredient2 = ingredients[1];
94 if ( !
GetGame().IsMultiplayer() )
97 ingredient1.GetInventory().GetCurrentInventoryLocation( loc );
98 player.GetInventory().ClearInventoryReservationEx( ingredient1, loc );
99 ingredient2.GetInventory().GetCurrentInventoryLocation( loc );
100 player.GetInventory().ClearInventoryReservationEx( ingredient2, loc );
104 if ( ingredient1.GetQuantity() <= 0 )
108 player.ServerTakeEntityToTargetAttachment( result, ingredient1 );
112 player.LocalTakeEntityToTargetAttachment( result, ingredient1 );
117 string ingredient1_classname = ingredient1.GetType();
118 ItemBase attachment1 =
ItemBase.Cast( result.GetInventory().CreateAttachment( ingredient1_classname ) );
119 MiscGameplayFunctions.TransferItemProperties( ingredient1, attachment1 );
120 attachment1.SetQuantity( 1 );
121 attachment1.SetCleanness(0);
124 ingredient1.AddQuantity( -1 );
128 if ( ingredient2.GetQuantity() <= 0 )
132 player.ServerTakeEntityToTargetAttachment( result, ingredient2 );
136 player.LocalTakeEntityToTargetAttachment( result, ingredient2 );
141 string ingredient2_classname = ingredient2.GetType();
142 ItemBase attachment2 =
ItemBase.Cast( result.GetInventory().CreateAttachment( ingredient2_classname ) );
143 MiscGameplayFunctions.TransferItemProperties( ingredient2, attachment2 );
144 attachment2.SetQuantity( 1 );
145 attachment2.SetCleanness(0);
147 ingredient2.AddQuantity( -1 );
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
int m_ResultToInventory[MAXIMUM_RESULTS]
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
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]
bool m_ResultUseSoftSkills[MAXIMUM_RESULTS]
bool CanDo(PlayerBase player, TStringVectorMap surfaceTypes)
void Do(PlayerBase player)