Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
pot.c
Go to the documentation of this file.
1 class 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 
16  override string GetEmptyingLoopSoundsetHard()
17  {
18  return "pour_HardGround_Pot_SoundSet";
19  }
20 
21  override string GetEmptyingLoopSoundsetSoft()
22  {
23  return "pour_SoftGround_Pot_SoundSet";
24  }
25 
26  override string GetEmptyingLoopSoundsetWater()
27  {
28  return "pour_Water_Pot_SoundSet";
29  }
30 
31  override string GetEmptyingEndSoundsetHard()
32  {
33  return "pour_End_HardGround_Pot_SoundSet";
34  }
35 
36  override string GetEmptyingEndSoundsetSoft()
37  {
38  return "pour_End_SoftGround_Pot_SoundSet";
39  }
40 
41  override string GetEmptyingEndSoundsetWater()
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 
61  override bool CanReceiveItemIntoCargo( EntityAI item )
62  {
63  if ( !super.CanReceiveItemIntoCargo( item ) )
64  return false;
65 
66  if ( IsCargoException4x3( item ) )
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 
88  override bool CanLoadItemIntoCargo( EntityAI item )
89  {
90  if ( !super.CanLoadItemIntoCargo( item ) )
91  return false;
92 
93  if ( IsCargoException4x3( item ) )
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 
121  override void SetActions()
122  {
123  super.SetActions();
124 
127 
130  }
131 }
GetEmptyingLoopSoundsetWater
string GetEmptyingLoopSoundsetWater()
IsCargoException4x3
bool IsCargoException4x3(EntityAI item)
Definition: itembase.c:4591
CanReceiveItemIntoCargo
override bool CanReceiveItemIntoCargo(EntityAI item)
Definition: container_base.c:72
ActionEmptyCookingPot
Definition: actionemptycookingpot.c:1
RemoveAction
void RemoveAction(typename actionName)
Definition: advancedcommunication.c:118
IsOpen
override bool IsOpen()
Definition: fireplacebase.c:2395
Bottle_Base
Definition: canistergasoline.c:1
ActionDrinkCookingPot
Definition: actiondrinkcookingpot.c:1
ActionDrink
Definition: actiondrink.c:9
GetPouringSoundset
string GetPouringSoundset()
CanPutInCargo
override bool CanPutInCargo(EntityAI parent)
Definition: explosivesbase.c:247
AddAction
void AddAction(typename actionName)
Definition: advancedcommunication.c:86
SetActions
void SetActions()
Definition: advancedcommunication.c:79
GetEmptyingEndSoundsetWater
string GetEmptyingEndSoundsetWater()
GetEmptyingLoopSoundsetHard
string GetEmptyingLoopSoundsetHard()
GetEmptyingEndSoundsetHard
string GetEmptyingEndSoundsetHard()
GetEmptyingEndSoundsetSoft
string GetEmptyingEndSoundsetSoft()
ActionEmptyBottleBase
Definition: actionemptybottlebase.c:14
CanHaveWetness
override bool CanHaveWetness()
Definition: fireplacebase.c:529
CanLoadItemIntoCargo
override bool CanLoadItemIntoCargo(EntityAI item)
Definition: container_base.c:80
EntityAI
Definition: building.c:5
GetEmptyingLoopSoundsetSoft
string GetEmptyingLoopSoundsetSoft()