DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс Mask_Base

gas mask base Подробнее...

+ Граф наследования:Mask_Base:

Защищенные члены

void InitGlobalExclusionValues ()
 
set< intGetAttachmentExclusionInitSlotValue (int slotId)
 
void InitGlobalExclusionValues ()
 
void InitGlobalExclusionValues ()
 
void InitGlobalExclusionValues ()
 
set< intGetAttachmentExclusionInitSlotValue (int slotId)
 

Закрытые члены

override void SetActions ()
 
override void SetActions ()
 
override void SetActions ()
 
override bool IsGasMask ()
 
override array< intGetEffectWidgetTypes ()
 
override bool AllowFoodConsumption ()
 
override void OnDebugSpawn ()
 
EntityAI GetExternalFilter ()
 
bool HasValidFilter ()
 has either external or integrated non-empty non-ruined filter ?
 
float GetFilterQuantityMax ()
 
float GetFilterQuantity ()
 
float GetFilterQuantity01 ()
 
bool IsExternalFilterAttached ()
 
bool HasIntegratedFilter ()
 
bool CanHaveExternalFilter ()
 
bool ConsumeQuantity (float quantity, PlayerBase consumer_player)
 
void OnQuantityConsumed (notnull ItemBase filter, PlayerBase consumer_player)
 
void OnQuantityConsumed (notnull ItemBase filter, PlayerBase consumer_player, float quantity)
 
void MouthRag ()
 
override bool CanDetachAttachment (EntityAI parent)
 
override bool IsObstructingVoice ()
 
override int GetVoiceEffect ()
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
void SetIncomingLambaBool (bool state)
 
bool GetIncomingLambdaBool ()
 
override void SetActions ()
 
override void SetActions ()
 
- Закрытые члены унаследованные от Clothing
void InitGlobalExclusionValues ()
 
void CheckParent ()
 
override void OnWorkStart ()
 
override void OnWorkStop ()
 
override void OnWork (float consumed_energy)
 
void OnLightCreated ()
 
void CreateHeadtorchLight ()
 
void AttachLightOnHead (EntityAI person)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
override void OnWasDetached (EntityAI parent, int slot_id)
 
override void SetActions ()
 
override bool IsLightSource ()
 
override ItemBase GetLightSourceItem ()
 
override void OnInvisibleSet (bool invisible)
 

Закрытые данные

float m_LowFilterEventTime
 
bool m_IncomingLambdaChange
 

Подробное описание

gas mask base

Методы

◆ AllowFoodConsumption()

override bool AllowFoodConsumption ( )
inlineprivate
17 {
18 return false;
19 }

◆ CanDetachAttachment()

override bool CanDetachAttachment ( EntityAI parent)
inlineprivate
11 {
13 }
bool m_IncomingLambdaChange
Definition MouthRag.c:3

Перекрестные ссылки m_IncomingLambdaChange.

◆ CanHaveExternalFilter()

bool CanHaveExternalFilter ( )
inlineprivate
99 {
100 return !HasIntegratedFilter();
101 }
bool HasIntegratedFilter()
Definition MaskBase.c:93

◆ ConsumeQuantity()

bool ConsumeQuantity ( float quantity,
PlayerBase consumer_player )
inlineprivate
104 {
105 ItemBase filter = ItemBase.Cast(FindAttachmentBySlotName("GasMaskFilter"));
107
108 if (HasQuantity() && GetQuantity() > 0)
109 {
110 itemToConsume = this;//this mask itself has quantity(masks with integrated, non-attached filter)
111 }
112 else if (HasValidFilter())
113 {
115 }
116 if (itemToConsume)
117 {
118 itemToConsume.AddQuantity(-quantity);
120 return true;
121 }
122
123 return false;
124 }
override float GetQuantity()
Definition ItemBase.c:8129
override bool HasQuantity()
Definition ItemBase.c:8124
Definition InventoryItem.c:731
bool HasValidFilter()
has either external or integrated non-empty non-ruined filter ?
Definition MaskBase.c:32
void OnQuantityConsumed(notnull ItemBase filter, PlayerBase consumer_player)
Definition MaskBase.c:126
Definition EntityAI.c:95

Перекрестные ссылки GetQuantity() и HasQuantity().

◆ EEItemLocationChanged()

override void EEItemLocationChanged ( notnull InventoryLocation oldLoc,
notnull InventoryLocation newLoc )
inlineprivate
26 {
27 super.EEItemLocationChanged(oldLoc,newLoc);
28
29 if (GetGame().IsDedicatedServer())
30 {
33 if (oldLoc.GetParent())
34 Class.CastTo(playerOld,oldLoc.GetParent().GetHierarchyRootPlayer());
35 if (newLoc.GetParent())
36 Class.CastTo(playerNew,newLoc.GetParent().GetHierarchyRootPlayer());
37
38 if (newLoc.GetType() == InventoryLocationType.GROUND)
39 {
41 if (Class.CastTo(newItem,GetGame().CreateObjectEx("Rag",newLoc.GetPos(),ECE_PLACE_ON_SURFACE,RF_DEFAULT)))
42 {
43 MiscGameplayFunctions.TransferItemProperties(this,newItem);
44 newItem.SetQuantity(1);
45 DeleteSafe();
46 }
47 }
48 }
49 }
const int ECE_PLACE_ON_SURFACE
Definition CentralEconomy.c:37
const int RF_DEFAULT
Definition CentralEconomy.c:65
InventoryLocationType
types of Inventory Location
Definition InventoryLocation.c:4
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition PlayerBaseClient.c:2
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), ECE_PLACE_ON_SURFACE, GetGame() и RF_DEFAULT.

◆ GetAttachmentExclusionInitSlotValue() [1/2]

set< int > GetAttachmentExclusionInitSlotValue ( int slotId)
inlineprotected
15 {
16 set<int> ret = super.GetAttachmentExclusionInitSlotValue(slotId);
17
18 //allows shaving
19 ret.RemoveItem(EAttExclusions.SHAVING_MASK_ATT_0);
20 return ret;
21 }

◆ GetAttachmentExclusionInitSlotValue() [2/2]

set< int > GetAttachmentExclusionInitSlotValue ( int slotId)
inlineprotected
180 {
181 set<int> ret = super.GetAttachmentExclusionInitSlotValue(slotId);
182 if (slotId == InventorySlots.MASK)
183 {
184 ret.Insert(EAttExclusions.SHAVING_MASK_ATT_0);
185 }
186 return ret;
187 }
provides access to slot configuration
Definition InventorySlots.c:6

◆ GetEffectWidgetTypes()

override array< int > GetEffectWidgetTypes ( )
inlineprivate
12 {
13 return {EffectWidgetsTypes.MASK_OCCLUDER, EffectWidgetsTypes.MASK_BREATH};
14 }

◆ GetExternalFilter()

EntityAI GetExternalFilter ( )
inlineprivate
27 {
28 return FindAttachmentBySlotName("GasMaskFilter");
29 }

◆ GetFilterQuantity()

float GetFilterQuantity ( )
inlineprivate
56 {
58 if (filter)
59 return filter.GetQuantity();
60 else
61 return GetQuantity();
62 }
EntityAI GetExternalFilter()
Definition MaskBase.c:26

Перекрестные ссылки GetQuantity().

◆ GetFilterQuantity01()

float GetFilterQuantity01 ( )
inlineprivate
65 {
66 if (!HasValidFilter())
67 {
68 return 0;
69 }
70
72 float quantity, quantityMax;
73
74 if (filter)
75 {
76 quantity = filter.GetQuantity();
77 quantityMax = filter.GetQuantityMax();
78 }
79 else
80 {
83 }
84
86 }
float quantityMax
Definition CfgPlayerSpawnDataJson.c:209
override int GetQuantityMax()
Definition ItemBase.c:8081
Definition EnMath.c:7
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

Перекрестные ссылки GetQuantity(), GetQuantityMax(), Math::InverseLerp() и quantityMax.

◆ GetFilterQuantityMax()

float GetFilterQuantityMax ( )
inlineprivate
44 {
46 if (filter) //mask can have a filter, and filter is attached
47 return filter.GetQuantityMax();
48 else if (HasQuantity())//filter was not attached, checking if mask has internal filter
49 return GetQuantityMax();
50
51 //mask does not have a filter attached nor does it have internal filter, max quantity can't be obtained
52 return 0;
53 }

Перекрестные ссылки GetQuantityMax() и HasQuantity().

◆ GetIncomingLambdaBool()

bool GetIncomingLambdaBool ( )
inlineprivate
67 {
69 }

Перекрестные ссылки m_IncomingLambdaChange.

◆ GetVoiceEffect()

override int GetVoiceEffect ( )
inlineprivate
21 {
23 }

◆ HasIntegratedFilter()

bool HasIntegratedFilter ( )
inlineprivate
94 {
95 return HasQuantity();
96 }

Перекрестные ссылки HasQuantity().

◆ HasValidFilter()

bool HasValidFilter ( )
inlineprivate

has either external or integrated non-empty non-ruined filter ?

33 {
35 if (filter && !filter.IsRuined() && filter.GetQuantity() > 0)
36 return true;
37 else if (GetQuantity() > 0 && !IsRuined())
38 return true;
39
40 return false;
41 }

Перекрестные ссылки GetQuantity().

◆ InitGlobalExclusionValues() [1/4]

void InitGlobalExclusionValues ( )
inlineprotected
4 {
5 super.InitGlobalExclusionValues();
6
7 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_0);
8 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_1);
9 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_2);
10
11 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_HEADGEAR_HELMET_0);
12 }

◆ InitGlobalExclusionValues() [2/4]

void InitGlobalExclusionValues ( )
inlineprotected
4 {
5 super.InitGlobalExclusionValues();
6
7 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_0);
8
9 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_GLASSES_TIGHT_0);
10 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_GLASSES_REGULAR_0);
11 }

◆ InitGlobalExclusionValues() [3/4]

void InitGlobalExclusionValues ( )
inlineprotected
135 {
136 super.InitGlobalExclusionValues();
137
138 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_2);
139
140 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_GLASSES_TIGHT_0);
141 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_HEADGEAR_HELMET_0);
142 }

◆ InitGlobalExclusionValues() [4/4]

void InitGlobalExclusionValues ( )
inlineprotected
10 {
11 super.InitGlobalExclusionValues();
12
13 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_0);
14 }

◆ IsExternalFilterAttached()

bool IsExternalFilterAttached ( )
inlineprivate
89 {
90 return ItemBase.Cast(FindAttachmentBySlotName("GasMaskFilter")) != null;
91 }

◆ IsGasMask()

override bool IsGasMask ( )
inlineprivate
7 {
8 return true;
9 }

◆ IsObstructingVoice()

override bool IsObstructingVoice ( )
inlineprivate
16 {
17 return true;
18 }

◆ MouthRag()

void MouthRag ( )
inlineprivate
6 {
8 }

◆ OnDebugSpawn()

override void OnDebugSpawn ( )
inlineprivate
22 {
23 GetInventory().CreateInInventory("GasMask_Filter");
24 }

◆ OnQuantityConsumed() [1/2]

void OnQuantityConsumed ( notnull ItemBase filter,
PlayerBase consumer_player )
inlineprivate
126{};

◆ OnQuantityConsumed() [2/2]

void OnQuantityConsumed ( notnull ItemBase filter,
PlayerBase consumer_player,
float quantity )
inlineprivate
129 {
130 float damage = quantity * filter.GetFilterDamageRatio();
131 filter.AddHealth("","", -damage);
132 }

◆ OnWasAttached()

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprivate
52 {
53 super.OnWasAttached(parent, slot_id);
54
55 if (parent.IsPlayer())
56 {
57 PlayerBase.Cast(parent).CheckForGag(); //gag removal action does check, since 'OnWasDetached' is not called on item destruction.
58 }
59 }

◆ SetActions() [1/5]

override void SetActions ( )
inlineprivate
4 {
5 super.SetActions();
7 }
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
Definition ActionWringClothes.c:13

Перекрестные ссылки AddAction().

◆ SetActions() [2/5]

override void SetActions ( )
inlineprivate
4 {
5 super.SetActions();
7 }

Перекрестные ссылки AddAction().

◆ SetActions() [3/5]

override void SetActions ( )
inlineprivate
4 {
5 super.SetActions();
7 }

Перекрестные ссылки AddAction().

◆ SetActions() [4/5]

override void SetActions ( )
inlineprivate
4 {
5 super.SetActions();
7 }

Перекрестные ссылки AddAction().

◆ SetActions() [5/5]

override void SetActions ( )
inlineprivate
4 {
5 super.SetActions();
7 }

Перекрестные ссылки AddAction().

◆ SetIncomingLambaBool()

void SetIncomingLambaBool ( bool state)
inlineprivate
62 {
64 }

Поля

◆ m_IncomingLambdaChange

bool m_IncomingLambdaChange
private

Используется в CanDetachAttachment() и GetIncomingLambdaBool().

◆ m_LowFilterEventTime

float m_LowFilterEventTime
private

Объявления и описания членов классов находятся в файлах: