|
proto native bool | IsValid () |
| verify current set inventory location
|
|
proto native int | GetType () |
| returns type of InventoryLocation
|
|
proto native EntityAI | GetParent () |
| returns parent of current inventory location
|
|
proto native EntityAI | GetItem () |
| returns item of current inventory location
|
|
proto native int | GetSlot () |
| returns slot id if current type is Attachment
|
|
proto native int | GetIdx () |
| returns index 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 | GetCol () |
| returns column of cargo if current type is Cargo / ProxyCargo
|
|
proto native bool | GetFlip () |
| returns flip status of cargo
|
|
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 void | SetGround (EntityAI e, vector mat[4]) |
| sets current inventory location type to Ground with transformation mat
|
|
proto native void | SetGroundEx (EntityAI e, vector pos, float dir[4]) |
| sets current inventory location type to Ground with transformation mat
|
|
proto native void | SetAttachment (notnull EntityAI parent, EntityAI e, int slotId) |
| sets current inventory location type to Attachment with slot id set to <slotId>
|
|
proto native void | SetCargoAuto (notnull CargoBase cargo, EntityAI e, int row, int col, bool flip) |
| based on Cargo.IsProxyCargo uses SetProxyCargo or SetCargo respectively
|
|
proto native void | SetCargo (notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip) |
| sets current inventory location type to Cargo with coordinates (idx, row, col)
|
|
proto native void | SetProxyCargo (notnull EntityAI parent, EntityAI e, int idx, int row, int col, bool flip) |
| sets current inventory location type to ProxyCargo with coordinates (idx, row, col) @NOTE: typical usage is in building-like dummy structures, where furniture with cargo is part of the model, and is not a physical entity (like person or bag).
|
|
proto native void | SetHands (notnull EntityAI parent, EntityAI e) |
| sets current inventory location type to Hands
|
|
proto native void | SetParent (notnull EntityAI parent) |
|
proto native void | SetItem (notnull EntityAI item) |
|
proto native void | SetSlot (int slotId) |
|
proto native void | SetIndex (int idx) |
|
proto native void | SetRow (int row) |
|
proto native void | SetCol (int col) |
|
proto native void | SetFlip (bool flip) |
|
proto native void | Reset () |
|
proto native bool | CompareLocationOnly (notnull InventoryLocation other) |
|
proto native bool | CollidesWith (notnull InventoryLocation rhs) |
| checks if inventory locations collides each with other
|
|
proto native InventoryLocation | Copy (notnull InventoryLocation rhs) |
| copies location data to another location
|
|
proto native InventoryLocation | CopyLocationFrom (notnull InventoryLocation rhs, bool copyFlip) |
| copies location to another location without m_item member
|
|
string | DumpToString () |
|
bool | ReadFromContext (ParamsReadContext ctx) |
|
bool | WriteToContext (ParamsWriteContext ctx) |
|
Definition at line 432 of file InventoryLocation.c.
433 {
435 {
436 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed to write type");
437 return false;
438 }
439
441 {
443 {
444 break;
445 }
447 {
449 {
450 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=item");
451 return false;
452 }
453
456 {
457 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=pos");
458 return false;
459 }
460
461 float dir[4];
464 {
465 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed GND, arg=dir");
466 return false;
467 }
468
469 break;
470 }
472 {
474 {
475 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=parent");
476 return false;
477 }
479 {
480 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=item");
481 return false;
482 }
484 {
485 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed ATT, arg=slot");
486 return false;
487 }
488 break;
489 }
491 {
493 {
494 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=parent");
495 return false;
496 }
498 {
499 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=item");
500 return false;
501 }
503 {
504 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=idx");
505 return false;
506 }
508 {
509 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=row");
510 return false;
511 }
513 {
514 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=col");
515 return false;
516 }
518 {
519 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed CGO, arg=flp");
520 return false;
521 }
522 break;
523 }
525 {
527 {
528 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=parent");
529 return false;
530 }
532 {
533 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed HND, arg=item");
534 return false;
535 }
536 break;
537 }
539 {
541 {
542 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=parent");
543 return false;
544 }
546 {
547 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=item");
548 return false;
549 }
551 {
552 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=idx");
553 return false;
554 }
556 {
557 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=row");
558 return false;
559 }
561 {
562 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=col");
563 return false;
564 }
566 {
567 Error(
"InventoryLocation::WriteToContext - cannot write to context! failed PXY, arg=flp");
568 return false;
569 }
570
571 break;
572 }
573 default:
574 {
575 Error(
"WriteToContext - really unknown location type, this should not happen, type=" +
GetType());
576 return false;
577 }
578 }
579 return true;
580 }
void Error(string err)
Messagebox with error message.
References Error(), GetCol(), GetDir(), GetFlip(), GetIdx(), GetItem(), GetParent(), GetPos(), GetRow(), GetSlot(), and GetType().