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 );
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 );
145 attachment2.SetCleanness(0);
147 ingredient2.AddQuantity( -1 );