73 {
76
77 ConstructionActionData construction_action_data = action_data.m_Player.GetConstructionActionData();
78 int slot_id = construction_action_data.
GetSlotId();
79
80 if ( slot_id != -1 )
81 {
82 ItemBase attachment =
ItemBase.Cast( target_entity.GetInventory().FindAttachment( slot_id ) );
83
84 if ( attachment )
85 {
86
87 attachment.CombineItemsClient( item );
88 }
89 else
90 {
92 float stackable = item_base.GetTargetQuantityMax( slot_id );
93
94 if( stackable == 0 || stackable >= item_base.GetQuantity() )
95 {
96 action_data.m_Player.PredictiveTakeEntityToTargetAttachmentEx(target_entity, item, slot_id);
97 }
98 else if( stackable != 0 && stackable < item_base.GetQuantity() )
99 {
100 item_base.SplitIntoStackMaxClient( target_entity, slot_id );
101 }
102 }
103 }
104 }
class GP5GasMask extends MaskBase ItemBase