DayZ 1.24
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 headgear_present = parent.FindAttachmentBySlotName("Headgear").ConfigGetBool("noMask");
10
11 if ((GetNumberOfItems() == 0 || !parent || parent.IsMan()) && !headgear_present)
12 return true;
13 return false;
14 }
15}
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition ItemBase.c:8059
override bool CanPutAsAttachment(EntityAI parent)
Definition HoxtonMask.c:3
override bool IsMan()
Definition Man.c:33