33 {
35
36 if ( tgt_entity &&
BaseBuildingBase.Cast(tgt_entity) &&!tgt_entity.IsBeingPlaced() )
37 {
38 string component_name = tgt_entity.GetActionComponentName( target.GetComponentIndex() );
39
40 ItemBase attachment =
ItemBase.Cast(tgt_entity.FindAttachmentBySlotName(component_name));
41
42 if ( attachment && player.GetInventory().CanAddEntityIntoHands(attachment) && attachment.
IsTakeable() )
43 {
44 return true;
45 }
46 }
47 return false;
48 }
class GP5GasMask extends MaskBase ItemBase
override bool IsTakeable()