470 {
472 {
473 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed to write type");
474 return false;
475 }
476
478 {
480 {
481 break;
482 }
484 {
486 {
487 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=item");
488 return false;
489 }
490
493 {
494 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=pos");
495 return false;
496 }
497
498 float dir[4];
501 {
502 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=dir");
503 return false;
504 }
505
506 break;
507 }
509 {
511 {
512 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=parent");
513 return false;
514 }
516 {
517 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=item");
518 return false;
519 }
521 {
522 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=slot");
523 return false;
524 }
525 break;
526 }
528 {
530 {
531 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=parent");
532 return false;
533 }
535 {
536 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=item");
537 return false;
538 }
540 {
541 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=idx");
542 return false;
543 }
545 {
546 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=row");
547 return false;
548 }
550 {
551 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=col");
552 return false;
553 }
555 {
556 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=flp");
557 return false;
558 }
559 break;
560 }
562 {
564 {
565 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=parent");
566 return false;
567 }
569 {
570 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=item");
571 return false;
572 }
573 break;
574 }
576 {
578 {
579 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=parent");
580 return false;
581 }
583 {
584 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=item");
585 return false;
586 }
588 {
589 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=idx");
590 return false;
591 }
593 {
594 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=row");
595 return false;
596 }
598 {
599 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=col");
600 return false;
601 }
603 {
604 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=flp");
605 return false;
606 }
607
608 break;
609 }
610
612 {
614 {
615 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=parent");
616 return false;
617 }
619 {
620 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=item");
621 return false;
622 }
624 {
625 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=idx");
626 return false;
627 }
628 break;
629 }
630 default:
631 {
632 Error(
"WriteToContext - really unknown location type, this should not happen, type=" +
GetType());
633 return false;
634 }
635 }
636 return true;
637 }
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
proto bool Write(void value_out)
void Error(string err)
Messagebox with error message.