508 {
510 {
512 if (!ctx.
Write(type))
513 {
514 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed to write temp type");
515 return false;
516 }
517 }
519 {
520 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed to write type");
521 return false;
522 }
523
525 {
527 {
528 break;
529 }
531 {
533 {
534 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=item");
535 return false;
536 }
537
540 {
541 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=pos");
542 return false;
543 }
544
545 float dir[4];
548 {
549 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=dir");
550 return false;
551 }
552
553 break;
554 }
556 {
558 {
559 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=parent");
560 return false;
561 }
563 {
564 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=item");
565 return false;
566 }
568 {
569 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=slot");
570 return false;
571 }
572 break;
573 }
575 {
577 {
578 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=parent");
579 return false;
580 }
582 {
583 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=item");
584 return false;
585 }
587 {
588 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=idx");
589 return false;
590 }
592 {
593 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=row");
594 return false;
595 }
597 {
598 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=col");
599 return false;
600 }
602 {
603 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=flp");
604 return false;
605 }
606 break;
607 }
609 {
611 {
612 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=parent");
613 return false;
614 }
616 {
617 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=item");
618 return false;
619 }
620 break;
621 }
623 {
625 {
626 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=parent");
627 return false;
628 }
630 {
631 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=item");
632 return false;
633 }
635 {
636 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=idx");
637 return false;
638 }
640 {
641 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=row");
642 return false;
643 }
645 {
646 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=col");
647 return false;
648 }
650 {
651 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=flp");
652 return false;
653 }
654
655 break;
656 }
657
659 {
661 {
662 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=parent");
663 return false;
664 }
666 {
667 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=item");
668 return false;
669 }
671 {
672 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed VHC, arg=idx");
673 return false;
674 }
675 break;
676 }
677
679 {
681 {
682 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed TMP, arg=parent");
683 return false;
684 }
685
687 {
688 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed TMP, arg=item");
689 return false;
690 }
691
693 {
694 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed TMP, idx=-1");
695 return false;
696 }
697
698 break;
699 }
700 default:
701 {
702 Error(
"WriteToContext - really unknown location type, this should not happen, type=" +
GetType());
703 return false;
704 }
705 }
706 return true;
707 }
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.