4 float m_LowFilterEventTime;
6 override bool IsGasMask()
13 return {EffectWidgetsTypes.MASK_OCCLUDER, EffectWidgetsTypes.MASK_BREATH};
23 GetInventory().CreateInInventory(
"GasMask_Filter");
28 return FindAttachmentBySlotName(
"GasMaskFilter");
35 if (filter && !filter.IsRuined() && filter.GetQuantity() > 0)
43 float GetFilterQuantityMax()
47 return filter.GetQuantityMax();
55 float GetFilterQuantity()
59 return filter.GetQuantity();
64 float GetFilterQuantity01()
66 if (!HasValidFilter())
76 quantity = filter.GetQuantity();
88 bool IsExternalFilterAttached()
90 return ItemBase.Cast(FindAttachmentBySlotName(
"GasMaskFilter")) !=
null;
93 bool HasIntegratedFilter()
98 bool CanHaveExternalFilter()
100 return !HasIntegratedFilter();
103 bool ConsumeQuantity(
float quantity,
PlayerBase consumer_player)
110 itemToConsume =
this;
112 else if (HasValidFilter())
114 itemToConsume = filter;
118 itemToConsume.AddQuantity(-quantity);
119 OnQuantityConsumed(itemToConsume, consumer_player, quantity);
128 void OnQuantityConsumed(notnull
ItemBase filter,
PlayerBase consumer_player,
float quantity)
130 float damage = quantity * filter.GetFilterDamageRatio();
131 filter.AddHealth(
"",
"", -damage);
134 override protected void InitGlobalExclusionValues()
136 super.InitGlobalExclusionValues();
138 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_MASK_2);
140 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_GLASSES_TIGHT_0);
141 AddSingleExclusionValueGlobal(EAttExclusions.EXCLUSION_HEADGEAR_HELMET_0);