234 {
237 {
239 {
240 break;
241 }
243 {
246 float dir[4];
248 res = res + " pos=(" + pos[0] + ", " + pos[1] + ", " + pos[2] + ")";
249 res = res + " dir=(" + dir[0] + ", " + dir[1] + ", " + dir[2] + ", " + dir[3] + ")";
250 break;
251 }
253 {
256 res = res +
" slot=" +
GetSlot();
257 break;
258 }
260 {
264 break;
265 }
267 {
270 break;
271 }
273 {
277 break;
278 }
280 {
283 res = res +
" idx=" +
GetIdx();
284 break;
285 }
286 default:
287 {
288 res = res + "??";
289 break;
290 }
291 }
292 res = res + " }";
293 return res;
294 }
InventoryLocationType
types of Inventory Location
proto native EntityAI GetParent()
returns parent of current inventory location
proto native vector GetPos()
returns position of item in world if type is Ground
proto native void GetDir(out float dir[4])
returns direction of item in world if type is Ground
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo
proto native int GetType()
returns type of InventoryLocation
proto native int GetIdx()
returns index of cargo if current type is Cargo / ProxyCargo
proto native bool GetFlip()
returns flip status of cargo
proto native EntityAI GetItem()
returns item of current inventory location