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