56 {
57 bool success = true;
58
59 InventoryLocation il = new InventoryLocation;
60
62 string component_name = tgt_entity.GetActionComponentName( action_data.m_Target.GetComponentIndex() );
64
65 if ( tgt_entity &&
ItemBase.CastTo(attachment, tgt_entity.FindAttachmentBySlotName(component_name)) )
66 {
68 if ( action_data.m_Player.GetInventory().HasInventoryReservation( attachment, il) )
69 {
70 success = false;
71 }
72 else
73 {
74 action_data.m_Player.GetInventory().AddInventoryReservationEx( attachment, il, GameInventory.c_InventoryReservationTimeoutMS);
75 }
76 }
77
78 if ( success )
79 {
80 if( il )
81 action_data.m_ReservedInventoryLocations.Insert(il);
82 }
83
84 return success;
85 }
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory