Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
gasmask_filter.c
Go to the documentation of this file.
1
class
GasMask_Filter
:
ItemBase
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
32
class
GasMask_Filter_Improvised:
GasMask_Filter
33
{
34
override
float
GetFilterDamageRatio
()
35
{
36
return
0.25;
//Health lost per quantity consumed
37
}
38
}
ItemBase
Definition:
inventoryitem.c:730
GetGame
proto native CGame GetGame()
SetQuantity
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:3159
GetFilterDamageRatio
GasMask_Filter ItemBase GetFilterDamageRatio()
Definition:
gasmask_filter.c:34
GasMask_Filter
Definition:
gasmask_filter.c:1
GameConstants
Definition:
constants.c:612
DAYZ
scripts_v1.24.157551
scripts
world
entities
itembase
clothing
gasmask_filter.c
Generated by
1.8.17