Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
canteen.c
Go to the documentation of this file.
1class 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 = GetGame().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}
Definition enmath.c:7
Keeps information about currently loaded world, like temperature.
Definition worlddata.c:3
float GetAgentSpawnChance(eAgents agent)
Definition worlddata.c:253
override void EEOnCECreate()
eAgents
Definition eagents.c:3
override bool CanPutInCargo(EntityAI parent)
proto native CGame GetGame()
override void InsertAgent(int agent, float count=1)
Definition itembase.c:8795
bool IsOpen()
Definition itembase.c:8938