Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
cargo.c
Go to the documentation of this file.
1
7{
12 proto native EntityAI GetCargoOwner ();
13
18 proto native int GetOwnerCargoIndex ();
19
23 proto native bool IsProxyCargo ();
24
28 proto native int GetItemCount ();
32 proto native EntityAI GetItem (int index);
33
37 proto native int GetWidth ();
41 proto native int GetHeight ();
46 proto bool GetItemRowCol (int index, out int row, out int col);
51 proto bool GetItemSize (int index, out int w, out int h);
52
56 proto native int FindEntityInCargo (notnull EntityAI e);
57
58 private void CargoBase ();
59 private void ~CargoBase ();
60
65 bool CanReceiveItemIntoCargo (EntityAI item) { return true; }
66
71 bool CanSwapItemInCargo (EntityAI child_entity, EntityAI new_entity) { return true; }
72
73 proto native int GetUserReservedLocationCount ();
84 proto bool GetUserReservedLocation (int index, out EntityAI eai, out int row, out int col, out int w, out int h, out int flp);
85 proto native void SetUserReservedLocation (notnull EntityAI eai);
86 proto native void ClearUserReservedLocation (notnull EntityAI eai);
87};
88
89
90#ifdef PLATFORM_CONSOLE
91 class CargoList : CargoBase
92 {
96 proto native int GetMaxWeight ();
97
102 proto native int GetTotalWeight (EntityAI item);
103
107 proto native bool CanFitItemIntoCargo (EntityAI cargo);
108
112 override bool CanReceiveItemIntoCargo (EntityAI item)
113 {
114 return true;
115 //return CanFitItemIntoCargo(item);
116 }
117
121 proto native bool CanFitSwappedItemInCargo (EntityAI child_entity, EntityAI new_entity);
122
123 override bool CanSwapItemInCargo (EntityAI child_entity, EntityAI new_entity)
124 {
125 return CanFitSwappedItemInCargo(child_entity, new_entity);
126 }
127 };
128#else
129#ifdef SERVER_FOR_CONSOLE
130 class CargoList : CargoBase
131 {
135 proto native int GetMaxWeight ();
136
141 proto native int GetTotalWeight (EntityAI item);
142
146 proto native bool CanFitItemIntoCargo (EntityAI cargo);
147
151 override bool CanReceiveItemIntoCargo (EntityAI item)
152 {
153 return true;
154 //return CanFitItemIntoCargo(item);
155 }
156
160 proto native bool CanFitSwappedItemInCargo (EntityAI child_entity, EntityAI new_entity);
161
162 override bool CanSwapItemInCargo (EntityAI child_entity, EntityAI new_entity)
163 {
164 return CanFitSwappedItemInCargo(child_entity, new_entity);
165 }
166 };
167#else
169 {
173 proto native EntityAI FindEntityInCargoOn (int row, int col);
174 };
175#endif
176#endif
represents base for cargo storage for entities
Definition cargo.c:7
TODO doc.
Definition enscript.c:118
int GetItemSize()
Definition itembase.c:7507
override bool CanReceiveItemIntoCargo(EntityAI item)
Definition itembase.c:8981
EntityAI GetItem()