98 ItemBase ingredient1 = ingredients[0];
99 ItemBase ingredient2 = ingredients[1];
102 if ( !
g_Game.IsMultiplayer() )
105 ingredient1.GetInventory().GetCurrentInventoryLocation( loc );
106 player.GetInventory().ClearInventoryReservationEx( ingredient1, loc );
107 ingredient2.GetInventory().GetCurrentInventoryLocation( loc );
108 player.GetInventory().ClearInventoryReservationEx( ingredient2, loc );
112 if ( ingredient1.GetQuantity() <= 0 )
116 player.ServerTakeEntityToTargetAttachment( result, ingredient1 );
120 player.LocalTakeEntityToTargetAttachment( result, ingredient1 );
125 string ingredient1_classname = ingredient1.GetType();
126 ItemBase attachment1 =
ItemBase.Cast( result.GetInventory().CreateAttachment( ingredient1_classname ) );
127 MiscGameplayFunctions.TransferItemProperties( ingredient1, attachment1 );
129 attachment1.SetCleanness(0);
132 ingredient1.AddQuantity( -1 );
136 if ( ingredient2.GetQuantity() <= 0 )
140 player.ServerTakeEntityToTargetAttachment( result, ingredient2 );
144 player.LocalTakeEntityToTargetAttachment( result, ingredient2 );
149 string ingredient2_classname = ingredient2.GetType();
150 ItemBase attachment2 =
ItemBase.Cast( result.GetInventory().CreateAttachment( ingredient2_classname ) );
151 MiscGameplayFunctions.TransferItemProperties( ingredient2, attachment2 );
153 attachment2.SetCleanness(0);
155 ingredient2.AddQuantity( -1 );
void InsertIngredientEx(int index, string ingredient, string soundCategory, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)