Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
hoxtonmask.c
Go to the documentation of this file.
1 class HoxtonMask extends ClothingBase
2 {
3  override bool CanPutAsAttachment( EntityAI parent )
4  {
5  if(!super.CanPutAsAttachment(parent)) {return false;}
6  bool headgear_present = false;
7 
8  if ( parent.FindAttachmentBySlotName( "Headgear" ) )
9  {
10  headgear_present = parent.FindAttachmentBySlotName( "Headgear" ).ConfigGetBool( "noMask" );
11  }
12 
13  if ( ( GetNumberOfItems() == 0 || !parent || parent.IsMan() ) && !headgear_present )
14  {
15  return true;
16  }
17  return false;
18  }
19 }
ClothingBase
Definition: dallasmask.c:1
CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition: itembase.c:4021
GetNumberOfItems
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition: itembase.c:3380
EntityAI
Definition: building.c:5