Sandbox.ModAPI
IMyInventoryBag
Assembly: Sandbox.Common.dll
public interface IMyInventoryBag: IMyEntity, IMyEntity
Inventory bag spawned when character died, container breaks, or when entity from other inventory cannot be spawned then bag spawned with the item in its inventory.
Events
| Member | Description |
|---|---|
| OnClose | Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose . Inherited from IMyEntity |
| OnClosing | Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose . Inherited from IMyEntity |
| OnMarkForClose | Called when Close() is called. Order 1) OnMarkForClose 2) OnClosing 3) OnClose . Inherited from IMyEntity |
| OnPhysicsChanged | Called when havok rigid body physics are changed: inited, closed, modified. Inherited from IMyEntity |
Properties
| Member | Description |
|---|---|
| CastShadows | Gets or sets flag CastShadows Inherited from IMyEntity |
| Closed | True if the block has been removed from the world. Inherited from IMyEntity |
| Components | Gets blocks component logic container Inherited from IMyEntity |
| DebugAsyncLoading | Used for internal usage. Modders should not use it. Will be eventually removed Inherited from IMyEntity |
| DisplayName | Gets user friendly name of entity. May be null For block terminal name use DisplayNameText Inherited from IMyEntity |
| DisplayName | Gets or sets user friendly name of entity Inherited from IMyEntity |
| EntityId | Id of entity Inherited from IMyEntity |
| EntityId | Uniq id of entity. Inherited from IMyEntity |
| FastCastShadowResolve | Gets or sets flag CastShadows Inherited from IMyEntity |
| Flags | Gets or set some behavior of entity. EntityFlags Inherited from IMyEntity |
| GameLogic | Gets or sets game logic for object. If there is more than 1 game logic attached it should be wrapped into. Inherited from IMyEntity |
| HasInventory | Returns true if this entity has got at least one inventory. Note that one aggregate inventory can contain zero simple inventories => zero will be returned even if GetInventory() != null. Inherited from IMyEntity |
| Hierarchy | Gets or sets Hierarchy component Inherited from IMyEntity |
| InScene | Gets or set if grid is InScene. Objects that are not in scene are not updated and drawn. Inherited from IMyEntity |
| InvalidateOnMove | Gets if entity is invalidated on move When visual look of entity depends on position - then InvalidateOnMove should be true Inherited from IMyEntity |
| InventoryCount | Returns the count of the number of inventories this entity has. Inherited from IMyEntity |
| IsVolumetric | Always returns false Inherited from IMyEntity |
| LocalAABB | Gets or sets local axis aligned bounding box. Same as LocalAABBHr , LocalAABB Inherited from IMyEntity |
| LocalAABBHr | Gets local axis aligned bounding box. Same as LocalAABB , LocalAABB Inherited from IMyEntity |
| LocalMatrix | Gets or sets local matrix. When entity, has parent, it's world coordinates are calculated from localMatrix and parent world matrix Inherited from IMyEntity |
| LocalVolume | Gets or sets local volume. Same as LocalVolume Inherited from IMyEntity |
| LocalVolumeOffset | Gets or sets local volume offset. Same as LocalVolumeOffset Inherited from IMyEntity |
| MarkedForClose | Checked if Close() was called Inherited from IMyEntity |
| MaxGlassDistSq | Not used in game anymore Inherited from IMyEntity |
| Model | Gets model of block Inherited from IMyEntity |
| ModelCollision | Gets collision model of block Inherited from IMyEntity |
| Name | Some entities can have uniq name, and game can find them by name TryGetEntityByName(string, out IMyEntity) Inherited from IMyEntity |
| Name | Uniq name of entity. Can be used to find entity by name Inherited from IMyEntity |
| NearFlag | Gets or sets flag Near Inherited from IMyEntity |
| NeedsDraw | Gets or sets flag NeedsDraw Inherited from IMyEntity |
| NeedsDrawFromParent | Gets or sets flag NeedsDrawFromParent Inherited from IMyEntity |
| NeedsResolveCastShadow | Gets or sets flag NeedsResolveCastShadow Inherited from IMyEntity |
| NeedsUpdate | Gets or sets how often the entity should be updated. Inherited from IMyEntity |
| NeedsWorldMatrix | Gets or sets if WorldMatrix should be calculated when parent WorldMatrix is changed. Inherited from IMyEntity |
| Parent | Gets parent of entity or null, if this entity doesn't have parent. Ex: character sitting in cockpit, has parent - cockpit, cockpit has parent - cube grid, connected grids also has main grid, which would be parent for other grids. Inherited from IMyEntity |
| PersistentFlags | Gets or sets persistent flags that are used in rendering. Inherited from IMyEntity |
| Physics | Gets or sets physics for object Inherited from IMyEntity |
| PositionComp | Gets or sets position provider logic Inherited from IMyEntity |
| Render | Gets or sets render logic Inherited from IMyEntity |
| Save | Gets or sets Save . Entity won't be saved if Save is false Inherited from IMyEntity |
| ShadowBoxLod | Gets or sets flag ShadowBoxLod Inherited from IMyEntity |
| SkipIfTooSmall | Gets or sets flag SkipIfTooSmall Inherited from IMyEntity |
| StopPhysicsActivation | Inherited from IMyEntity |
| Storage | Custom storage for mods. Shared with all mods. Inherited from IMyEntity |
| Synchronized | Gets or sets if the entity should be synced. Inherited from IMyEntity |
| SyncObject | Gets SyncObject used for synchronizing data over network with Inherited from IMyEntity |
| Transparent | Gets or sets Transparency . When setting true entity would be 25% transparent Inherited from IMyEntity |
| Visible | Gets or sets flag Visible Inherited from IMyEntity |
| WorldAABB | Gets world axis-aligned bounding box Inherited from IMyEntity |
| WorldAABBHr | Gets world axis-aligned bounding box Inherited from IMyEntity |
| WorldMatrix | Gets world matrix of this entity Inherited from IMyEntity |
| WorldMatrix | Gets or sets world matrix. Inherited from IMyEntity |
| WorldMatrixInvScaled | Get scaled, inverted world matrix. Same as GetViewMatrix() , GetWorldMatrixNormalizedInv() , WorldMatrixNormalizedInv , but not normalized Inherited from IMyEntity |
| WorldMatrixNormalizedInv | Get normalized, inverted world matrix. Same as GetViewMatrix() , WorldMatrixNormalizedInv Inherited from IMyEntity |
| WorldVolume | Gets bounding sphere of this entity Inherited from IMyEntity |
| WorldVolumeHr | Gets bounding sphere of this entity Inherited from IMyEntity |
| IsCCDForProjectiles | Obsolete Inherited from IMyEntity |
| LocationForHudMarker | Obsolete Inherited from IMyEntity |
Methods
| Member | Description |
|---|---|
| BeforeSave() | Called before method GetObjectBuilder, when saving sector Inherited from IMyEntity |
| Close() | This method marks this entity for close which means, that Close will be called after all entities are updated Inherited from IMyEntity |
| DebugDraw() | Calls debug draw of entity Inherited from IMyEntity |
| DebugDrawInvalidTriangles() | Calls special debug draw, that highlighting invalid triangles in model Inherited from IMyEntity |
| Delete() | Performs real cleaning of entity. Should be called by game. Modders should prefer Close() method. Inherited from IMyEntity |
| DoOverlapSphereTest(float, Vector3D) | Checks if intersects Works only with IMyVoxelBase Inherited from IMyEntity |
| EnableColorMaskForSubparts(bool) | Allows subparts have different color than their parent Inherited from IMyEntity |
| GetChildren(List |
Gets children of entity. Child - entity, who's Parent is this entity Inherited from IMyEntity |
| GetDiffuseColor() | Gets render diffuse color Inherited from IMyEntity |
| GetDistanceBetweenCameraAndBoundingSphere() | Distance from camera to bounding sphere of this phys object. Result is always positive, even if camera is inside the sphere. (in meters) Inherited from IMyEntity |
| GetDistanceBetweenCameraAndPosition() | Distance from camera to position of entity. Inherited from IMyEntity |
| GetFriendlyName() | Not used. Actually not a friendly name Inherited from IMyEntity |
| GetIntersectionWithAABB(ref BoundingBoxD) | Return true if object intersects specified bounding box. Inherited from IMyEntity |
| GetIntersectionWithLine(ref LineD, out MyIntersectionResultLineTriangleEx?, IntersectionFlags) | Get intersection of model with provided line Inherited from IMyEntity |
| GetIntersectionWithLineAndBoundingSphere(ref LineD, float) | Calculates intersection of line with any bounding sphere in this model instance. Center of the bounding sphere will be returned. It takes boundingSphereRadiusMultiplier argument which serves for extending the influence (radius) for interaction with line. Inherited from IMyEntity |
| GetIntersectionWithSphere(ref BoundingSphereD) | Return true if object intersects specified sphere. Inherited from IMyEntity |
| GetInventory() | Simply get the MyInventoryBase component stored in this entity. Inherited from IMyEntity |
| GetInventory(int) | Search for inventory component with maching index. Inherited from IMyEntity |
| GetInventory() | Simply get the MyInventoryBase component stored in this entity. Inherited from IMyEntity |
| GetInventory(int) | Search for inventory component with matching index. Inherited from IMyEntity |
| GetLargestDistanceBetweenCameraAndBoundingSphere() | Largest distance from camera to bounding sphere of this phys object. Result is always positive, even if camera is inside the sphere. It's actually distance between camera and opposite side of the sphere Inherited from IMyEntity |
| GetObjectBuilder(bool) | Returns object builder - object representing block state, and allows restore it. Used in game save, or syncing over network. Inherited from IMyEntity |
| GetPosition() | Gets position in world coordinates Inherited from IMyEntity |
| GetSmallestDistanceBetweenCameraAndBoundingSphere() | Smallest distance between camera and bounding sphere of this phys object. Result is always positive, even if camera is inside the sphere. Inherited from IMyEntity |
| GetSubpart(string) | Gets subpart by subpart name Inherited from IMyEntity |
| GetTopMostParent(Type) | Gets top most Parent of specified type. Top most is entity that doesn't have parent (of specified type) Inherited from IMyEntity |
| GetTrianglesIntersectingSphere(ref BoundingSphere, Vector3?, float?, List<MyTriangle_Vertex_Normals>, int) | Return list of triangles intersecting specified sphere. Angle between every triangleVertexes normal vector and 'referenceNormalVector' is calculated, and if more than 'maxAngle', we ignore such triangleVertexes. Triangles are returned in 'retTriangles', and this list must be preallocated! IMPORTANT: Sphere must be in model space, so don't transform it! Inherited from IMyEntity |
| GetViewMatrix() | Get normalized, inverted world matrix. Same as GetWorldMatrixNormalizedInv() , WorldMatrixNormalizedInv Inherited from IMyEntity |
| GetWorldMatrixNormalizedInv() | Get normalized, inverted world matrix. Same as GetViewMatrix() , WorldMatrixNormalizedInv Inherited from IMyEntity |
| IsVisible() | Gets or result of function IsVisible() . Function inside check for IsVisible(IMyEntity) Inherited from IMyEntity |
| OnAddedToScene(object) | Adds entity to scene: init updates, render physics Inherited from IMyEntity |
| OnRemovedFromScene(object) | Remove entity and it's children from scene: stops updates and render, deactivates physics. Usually called when entity deleted Inherited from IMyEntity |
| SetColorMaskForSubparts(Vector3) | Sets subparts custom col Inherited from IMyEntity |
| SetEmissiveParts(string, Color, float) | Sets the emissive value of a specific emissive material on entity. Inherited from IMyEntity |
| SetEmissivePartsForSubparts(string, Color, float) | Sets the emissive value of a specific emissive material on all entity subparts. Inherited from IMyEntity |
| SetLocalMatrix(Matrix, object) | Sets local matrix. When entity, has parent, it's world coordinates are calculated from localMatrix and parent world matrix Inherited from IMyEntity |
| SetPosition(Vector3D) | Set WorldMatrix's Translation . Moves entity. Inherited from IMyEntity |
| SetTextureChangesForSubparts(Dictionary<MyStringId, MyTextureChange>) | Sets subparts custom skinning. Copy values from TextureChanges , then change needed keys. You can retrieve values for exact skin with following code:csharp<br />MyDefinitionManager.Static.GetAssetModifierDefinitionForRender(skinId);<br /><br />Inherited from IMyEntity |
| SetWorldMatrix(MatrixD, object) | Sets world matrix of entity. Inherited from IMyEntity |
| Teleport(MatrixD, object, bool) | When moving entity over large distances or when entity has children, using this method preferred over SetPosition(Vector3D) Inherited from IMyEntity |
| TryGetSubpart(string, out MyEntitySubpart) | Gets subpart by subpart name Inherited from IMyEntity |
| UpdateGamePruningStructure() | Update position of entity in MyGamePruningStructure. Calls:csharp<br />MyGamePruningStructure.Move(this)<br /><br />Inherited from IMyEntity |
| AddToGamePruningStructure() | Obsolete: Only used during Sandbox removal. Inherited from IMyEntity |
| RemoveFromGamePruningStructure() | Obsolete: Only used during Sandbox removal. Inherited from IMyEntity |
| SetTextureChangesForSubparts(Dictionary<string, MyTextureChange>) | Obsolete This calling is obsolete, use another version. Inherited from IMyEntity |
Implements:
Inheritors: