Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
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
(
g_Game
.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
}
GameConstants
Definition
constants.c:664
GasMask_Filter
Definition
gasmask_filter.c:2
GasMask_Filter::EEHealthLevelChanged
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
Definition
gasmask_filter.c:15
GasMask_Filter::GetFilterDamageRatio
override float GetFilterDamageRatio()
Definition
gasmask_filter.c:26
ItemBase
Definition
inventoryitem.c:742
ItemBase::SetQuantity
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Definition
pileofwoodenplanks.c:88
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
GameConstants::STATE_RUINED
const int STATE_RUINED
Definition
constants.c:851
Games
Dayz
scripts
4_world
entities
itembase
clothing
gasmask_filter.c
Generated by
1.17.0