Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
gasmask_filter.c
Go to the documentation of this file.
2{
3 /*
4 override void OnQuantityChanged(float delta)
5 {
6 super.OnQuantityChanged(delta);
7
8 if (GetQuantity() == 0)
9 {
10 SetHealth("","",0);
11 }
12 }
13 */
14
15 override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
16 {
17 if (GetGame().IsServer())
18 {
19 if( newLevel == GameConstants.STATE_RUINED )
20 {
21 SetQuantity(0);
22 }
23 }
24 }
25
26 override float GetFilterDamageRatio()
27 {
28 return 0.09; //Health lost per quantity consumed
29 }
30}
31
32class GasMask_Filter_Improvised: GasMask_Filter
33{
34 override float GetFilterDamageRatio()
35 {
36 return 0.25; //Health lost per quantity consumed
37 }
38}
proto native CGame GetGame()
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Set item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
Definition itembase.c:8148