Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
hoxtonmask.c
Go to the documentation of this file.
1class 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}
override bool CanPutAsAttachment(EntityAI parent)
Definition hoxtonmask.c:3
override bool IsMan()
Definition man.c:48
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition itembase.c:8462