DayZ 1.24
Loading...
Searching...
No Matches
Pot.c
Go to the documentation of this file.
1class Pot extends Bottle_Base
2{
3 void Pot();
4 void ~Pot();
5
6 override bool IsContainer()
7 {
8 return true;
9 }
10
11 override string GetPouringSoundset()
12 {
13 return "emptyVessle_Pot_SoundSet";
14 }
15
17 {
18 return "pour_HardGround_Pot_SoundSet";
19 }
20
22 {
23 return "pour_SoftGround_Pot_SoundSet";
24 }
25
27 {
28 return "pour_Water_Pot_SoundSet";
29 }
30
32 {
33 return "pour_End_HardGround_Pot_SoundSet";
34 }
35
37 {
38 return "pour_End_SoftGround_Pot_SoundSet";
39 }
40
42 {
43 return "pour_End_Water_Pot_SoundSet";
44 }
45
46 override bool CanPutInCargo(EntityAI parent)
47 {
48 if (!super.CanPutInCargo(parent))
49 return false;
50
51 if (parent && IsCargoException4x3(parent))
52 return false;
53
54 //is 'parent' somewhere in cargo?
55 if (parent && parent.GetInventory().IsCargoInHiearchy())
56 return false;
57
58 return true;
59 }
60
62 {
63 if (!super.CanReceiveItemIntoCargo(item))
64 return false;
65
67 return false;
68
69 //is 'this' somewhere in cargo?
70 if (GetInventory().IsCargoInHiearchy())
71 return false;
72
73 //can 'this' be attached to the item (->assumed smaller size than item)?
74 int slotId;
75 for (int i = 0; i < GetInventory().GetSlotIdCount(); i++)
76 {
77 slotId = GetInventory().GetSlotId(i);
78 if (item.GetInventory().HasAttachmentSlot(slotId))
79 {
80 //Print("CanReceiveItemIntoCargo | item " + item + " matches in slot name: " + InventorySlots.GetSlotName(slotId) + " of " + this);
81 return false;
82 }
83 }
84
85 return true;
86 }
87
89 {
90 if (!super.CanLoadItemIntoCargo(item))
91 return false;
92
94 return false;
95
96 //can 'this' be attached to the item (->assumed smaller size than item)?
97 int slotId;
98 for (int i = 0; i < GetInventory().GetSlotIdCount(); i++)
99 {
100 slotId = GetInventory().GetSlotId(i);
101 if (item.GetInventory().HasAttachmentSlot(slotId))
102 {
103 //Print("CanLoadItemIntoCargo | item " + item + " matches in slot name: " + InventorySlots.GetSlotName(slotId) + " of " + this);
104 return false;
105 }
106 }
107
108 return true;
109 }
110
111 override bool IsOpen()
112 {
113 return true;
114 }
115
116 override bool CanHaveWetness()
117 {
118 return true;
119 }
120
131}
void AddAction(typename actionName)
void RemoveAction(typename actionName)
bool IsCargoException4x3(EntityAI item)
Definition ItemBase.c:9270
override string GetEmptyingEndSoundsetWater()
Definition Pot.c:41
override bool CanHaveWetness()
Definition Pot.c:116
override bool CanReceiveItemIntoCargo(EntityAI item)
Definition Pot.c:61
override void SetActions()
Definition Pot.c:121
override string GetEmptyingLoopSoundsetWater()
Definition Pot.c:26
override string GetEmptyingLoopSoundsetHard()
Definition Pot.c:16
override string GetEmptyingEndSoundsetSoft()
Definition Pot.c:36
override bool CanPutInCargo(EntityAI parent)
Definition Pot.c:46
override bool CanLoadItemIntoCargo(EntityAI item)
Definition Pot.c:88
override string GetEmptyingLoopSoundsetSoft()
Definition Pot.c:21
override bool IsContainer()
Definition Pot.c:6
override string GetEmptyingEndSoundsetHard()
Definition Pot.c:31
override string GetPouringSoundset()
Definition Pot.c:11
override bool IsOpen()
Definition Pot.c:111