Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
canteen.c
Go to the documentation of this file.
1
class
Canteen
extends
Bottle_Base
2
{
3
void
Canteen
()
4
{
5
6
}
7
8
void
~Canteen
()
9
{
10
11
}
12
13
override
string
GetPouringSoundset
()
14
{
15
return
"emptyVessle_Canteen_SoundSet"
;
16
}
17
18
override
string
GetEmptyingLoopSoundsetHard
()
19
{
20
return
"pour_HardGround_Canteen_SoundSet"
;
21
}
22
23
override
string
GetEmptyingLoopSoundsetSoft
()
24
{
25
return
"pour_SoftGround_Canteen_SoundSet"
;
26
}
27
28
override
string
GetEmptyingLoopSoundsetWater
()
29
{
30
return
"pour_Water_Canteen_SoundSet"
;
31
}
32
33
override
string
GetEmptyingEndSoundsetHard
()
34
{
35
return
"pour_End_HardGround_Canteen_SoundSet"
;
36
}
37
38
override
string
GetEmptyingEndSoundsetSoft
()
39
{
40
return
"pour_End_SoftGround_Canteen_SoundSet"
;
41
}
42
43
override
string
GetEmptyingEndSoundsetWater
()
44
{
45
return
"pour_End_Water_Canteen_SoundSet"
;
46
}
47
48
override
bool
CanPutInCargo
(
EntityAI
parent )
49
{
50
if
( !super.CanPutInCargo(parent) ) {
return
false
;}
51
if
( parent && (parent.IsKindOf(
"Canteen"
))
/* && !(parent.IsKindOf("Container_Base"))*/
)
52
{
53
return
false
;
54
}
55
56
return
true
;
57
}
58
59
override
bool
IsOpen
()
60
{
61
return
true
;
62
}
63
64
override
void
EEOnCECreate
()
65
{
66
super.EEOnCECreate();
67
68
WorldData
data =
g_Game
.GetMission().GetWorldData();
69
if
(data)
70
{
71
float
chance = data.
GetAgentSpawnChance
(
eAgents
.CHOLERA);
72
int
rand =
Math
.
RandomFloat
(0, 100);
73
74
if
(rand < chance)
75
InsertAgent
(
eAgents
.CHOLERA, 1);
76
}
77
}
78
}
Bottle_Base
Definition
canteen.c:2
Bottle_Base::GetEmptyingEndSoundsetSoft
override string GetEmptyingEndSoundsetSoft()
Definition
canteen.c:38
Bottle_Base::IsOpen
override bool IsOpen()
Definition
canteen.c:59
Bottle_Base::GetEmptyingEndSoundsetHard
override string GetEmptyingEndSoundsetHard()
Definition
canteen.c:33
Bottle_Base::GetPouringSoundset
override string GetPouringSoundset()
Definition
canteen.c:13
Bottle_Base::CanPutInCargo
override bool CanPutInCargo(EntityAI parent)
Definition
canteen.c:48
Bottle_Base::EEOnCECreate
override void EEOnCECreate()
Definition
canteen.c:64
Bottle_Base::GetEmptyingLoopSoundsetWater
override string GetEmptyingLoopSoundsetWater()
Definition
canteen.c:28
Bottle_Base::~Canteen
void ~Canteen()
Definition
canteen.c:8
Bottle_Base::GetEmptyingEndSoundsetWater
override string GetEmptyingEndSoundsetWater()
Definition
canteen.c:43
Bottle_Base::Canteen
void Canteen()
Definition
canteen.c:3
Bottle_Base::GetEmptyingLoopSoundsetSoft
override string GetEmptyingLoopSoundsetSoft()
Definition
canteen.c:23
Bottle_Base::GetEmptyingLoopSoundsetHard
override string GetEmptyingLoopSoundsetHard()
Definition
canteen.c:18
EntityAI
Definition
inventoryitem.c:2
Math
Definition
enmath.c:7
WorldData
Keeps information about currently loaded world, like temperature.
Definition
worlddata.c:3
WorldData::GetAgentSpawnChance
float GetAgentSpawnChance(eAgents agent)
Definition
worlddata.c:254
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
eAgents
eAgents
Definition
eagents.c:3
Math::RandomFloat
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
InsertAgent
override void InsertAgent(int agent, float count=1)
Definition
itembase.c:8895
Games
Dayz
scripts
4_world
entities
itembase
edible_base
bottle_base
canteen.c
Generated by
1.17.0