This repository was archived by the owner on Dec 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
VRage.Game.ModAPI.Ingame.IMyInventory
Morten Aune Lyrstad edited this page Apr 16, 2022
·
50 revisions
← Index ← Namespace Index
public interface IMyInventoryDescribes inventory interface (PB scripting interface)
Namespace: VRage.Game.ModAPI.Ingame
Assembly: VRage.Game.dll
| Member | Description |
|---|---|
| \MyFixedPoint CurrentMass { get; } | Returns total mass of items inside this inventory in Kg. |
| \MyFixedPoint CurrentVolume { get; } | Returns total volume of items inside this inventory in m^3. |
| \bool IsFull { get; } | Determines if inventory is absolutely full. |
| \int ItemCount { get; } | Returns number of occupied inventory slots. |
| \MyFixedPoint MaxVolume { get; } | Returns maximum volume of items this inventory can contain in m^3. |
| \IMyEntity Owner { get; } | Returns entity this inventory belongs to. |
| Member | Description |
|---|---|
| \bool CanItemsBeAdded(MyFixedPoint, MyItemType) | Determines if given amount of items fits into this inventory on top of existing items. |
| \bool CanTransferItemTo(IMyInventory, MyItemType) | Determines if there is working conveyor connection for item of give type to be transferred to other inventory. |
| \bool ContainItems(MyFixedPoint, MyItemType) | Determines if there is at least given amount of items of given type contained inside this inventory. |
| \MyInventoryItem? FindItem(MyItemType) | Tries to find an item of given type inside this inventory. |
| \void GetAcceptedItems(List\, \[Func\<MyItemType, bool>]) | Returns all items this inventory accepts. |
| \MyFixedPoint GetItemAmount(MyItemType) | Sums up total amount of items of given type contained inside this inventory. |
| \MyInventoryItem? GetItemAt(int) | Returns info about item at give position. |
| \MyInventoryItem? GetItemByID(uint) | Returns info about item contained inside this inventory. |
| \void GetItems(List\, \[Func\<MyInventoryItem, bool>]) | Collects all items present inside this inventory and returns snapshot of the current inventory state. |
| \bool IsConnectedTo(IMyInventory) | Checks if two inventories are connected. |
| \bool IsItemAt(int) | Determines if there is any item on given inventory slot. |
| \bool TransferItemFrom(IMyInventory, MyInventoryItem, \[MyFixedPoint?]) | Attempts to transfer item from one inventory to another. |
| \bool TransferItemFrom(IMyInventory, int, \[int?], \[bool?], \[MyFixedPoint?]) | Attempts to transfer item from one inventory to another. |
| \bool TransferItemTo(IMyInventory, MyInventoryItem, \[MyFixedPoint?]) | Attempts to transfer item from one inventory to another. |
| \bool TransferItemTo(IMyInventory, int, \[int?], \[bool?], \[MyFixedPoint?]) | Attempts to transfer item from one inventory to another. |
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!