DayZ 1.24
Loading...
Searching...
No Matches
Clothing_Base Class Reference

Private Member Functions

override bool IsClothing ()
 
override bool CanHaveWetness ()
 
int GetGlassesEffectID ()
 Used for 'glasses' (and other colored layers triggered by attach/detach in the InventorySlots.EYEWEAR)
 
array< intGetEffectWidgetTypes ()
 
override bool CanPutInCargo (EntityAI parent)
 
bool CanPutInCargoClothingConditions (EntityAI parent)
 
override bool CanReceiveItemIntoCargo (EntityAI item)
 
bool CanReceiveItemIntoCargoClothingConditions (EntityAI item)
 
bool SmershException (EntityAI hierarchyParent)
 
override bool CanLoadItemIntoCargo (EntityAI item)
 
bool CanLoadItemIntoCargoClothingConditions (EntityAI item)
 
bool CanWearUnderMask (EntityAI parent)
 deprecated
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
override void SwitchItemSelectionTextureEx (EItemManipulationContext context, Param par=null)
 

Detailed Description

Definition at line 4 of file Clothing_Base.c.

Member Function Documentation

◆ CanHaveWetness()

override bool Clothing_Base::CanHaveWetness ( )
inlineprivate

Definition at line 11 of file Clothing_Base.c.

12 {
13 return true;
14 }

◆ CanLoadItemIntoCargo()

override bool Clothing_Base::CanLoadItemIntoCargo ( EntityAI item)
inlineprivate

Definition at line 85 of file Clothing_Base.c.

86 {
87 if (!super.CanLoadItemIntoCargo(item))
88 return false;
89
91 }
bool CanLoadItemIntoCargoClothingConditions(EntityAI item)

◆ CanLoadItemIntoCargoClothingConditions()

bool Clothing_Base::CanLoadItemIntoCargoClothingConditions ( EntityAI item)
inlineprivate

Definition at line 93 of file Clothing_Base.c.

94 {
95 EntityAI parent = GetHierarchyParent();
96
97 if (parent && parent.IsInherited(UndergroundStash))
98 return true;
99
100 return !parent || parent.IsMan() || SmershException(parent);
101 }
bool SmershException(EntityAI hierarchyParent)
override bool IsMan()
Definition Man.c:33

References EntityAI::IsMan().

◆ CanPutInCargo()

override bool Clothing_Base::CanPutInCargo ( EntityAI parent)
inlineprivate

Definition at line 30 of file Clothing_Base.c.

31 {
32 if (!super.CanPutInCargo(parent))
33 return false;
34
35 return !parent || CanPutInCargoClothingConditions(parent);
36 }
bool CanPutInCargoClothingConditions(EntityAI parent)

◆ CanPutInCargoClothingConditions()

bool Clothing_Base::CanPutInCargoClothingConditions ( EntityAI parent)
inlineprivate

Definition at line 38 of file Clothing_Base.c.

39 {
40 bool is_hidden_stash_exception = false;
41
42 if (parent.IsInherited(UndergroundStash))
44
45 if (GetNumberOfItems() == 0 || !parent || parent.IsMan() || is_hidden_stash_exception)
46 {
47 EntityAI cargoParent = parent.GetHierarchyParent();
49 if (cargoParent)
50 return !(parent.IsClothing() && cargoParent.IsClothing()) || (parentClothing && parentClothing.SmershException(cargoParent));
51
52 return true;
53 }
54
55 return false;
56 }
int GetNumberOfItems()
Returns the number of items in cargo, otherwise returns 0(non-cargo objects). Recursive.
Definition ItemBase.c:8059

References GetNumberOfItems(), and EntityAI::IsMan().

◆ CanReceiveItemIntoCargo()

override bool Clothing_Base::CanReceiveItemIntoCargo ( EntityAI item)
inlineprivate

Definition at line 58 of file Clothing_Base.c.

59 {
60 if (!super.CanReceiveItemIntoCargo(item))
61 return false;
62
64 }
bool CanReceiveItemIntoCargoClothingConditions(EntityAI item)

◆ CanReceiveItemIntoCargoClothingConditions()

bool Clothing_Base::CanReceiveItemIntoCargoClothingConditions ( EntityAI item)
inlineprivate

Definition at line 66 of file Clothing_Base.c.

67 {
68 EntityAI hierarchyParent = GetHierarchyParent();
70 }

◆ CanWearUnderMask()

bool Clothing_Base::CanWearUnderMask ( EntityAI parent)
inlineprivate

deprecated

Definition at line 105 of file Clothing_Base.c.

106 {
107 return true;
108 }

◆ EEHealthLevelChanged()

override void Clothing_Base::EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprivate

Definition at line 111 of file Clothing_Base.c.

112 {
113 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
114 if (!GetGame().IsDedicatedServer())
115 {
116 PlayerBase player_owner = PlayerBase.Cast(GetHierarchyParent());
117
118 if (player_owner)
119 {
120 if (player_owner.m_CorpseState != 0)
121 GetGame().GetCallQueue(CALL_CATEGORY_GUI).CallLater(player_owner.UpdateCorpseState, 0, false);
122 }
123 }
124 }
proto native CGame GetGame()
const int CALL_CATEGORY_GUI
Definition tools.c:9

References CALL_CATEGORY_GUI, and GetGame().

◆ GetEffectWidgetTypes()

array< int > Clothing_Base::GetEffectWidgetTypes ( )
inlineprivate

Definition at line 24 of file Clothing_Base.c.

25 {
26 return null;
27 }

◆ GetGlassesEffectID()

int Clothing_Base::GetGlassesEffectID ( )
inlineprivate

Used for 'glasses' (and other colored layers triggered by attach/detach in the InventorySlots.EYEWEAR)

Definition at line 17 of file Clothing_Base.c.

18 {
19 return -1;
20 }

◆ IsClothing()

override bool Clothing_Base::IsClothing ( )
inlineprivate

Definition at line 6 of file Clothing_Base.c.

7 {
8 return true;
9 }

◆ SmershException()

bool Clothing_Base::SmershException ( EntityAI hierarchyParent)
inlineprivate

Definition at line 73 of file Clothing_Base.c.

74 {
75 EntityAI hp = hierarchyParent.GetHierarchyParent();
76 if (hp)
77 {
78 if (!hp.IsMan())
79 return false;
80 }
81
82 return IsInherited(SmershBag) && hierarchyParent.IsInherited(SmershVest);
83 }

◆ SwitchItemSelectionTextureEx()

override void Clothing_Base::SwitchItemSelectionTextureEx ( EItemManipulationContext context,
Param par = null )
inlineprivate

Definition at line 126 of file Clothing_Base.c.

127 {
128 super.SwitchItemSelectionTextureEx(context, par);
129
131 if (!data)
132 return;
133
134 PlayerBase player = data.param1;
135
136 int personality = GetHiddenSelectionIndex("personality");
137 if (personality >= 0)
138 {
139 string tone_mat = player.m_EmptyGloves.GetHiddenSelectionsMaterials().Get(0);
140 string tone_texture;
141
142 if (player.m_CorpseState > PlayerConstants.CORPSE_STATE_FRESH)
143 tone_texture = player.m_DecayedTexture;
144 else
145 tone_texture = player.m_EmptyGloves.GetHiddenSelectionsTextures().Get(0);
146
147 SetObjectMaterial(personality, tone_mat);
148 SetObjectTexture(personality, tone_texture);
149 }
150 }
static const int CORPSE_STATE_FRESH

References PlayerConstants::CORPSE_STATE_FRESH.


The documentation for this class was generated from the following file: