VRage.Game.ModAPI.Ingame
IMyInventory
Assembly: VRage.Game.dll
public interface IMyInventory
Describes inventory interface (PB scripting interface)
Properties
| Member | Description |
|---|---|
| CanPutItems | Gets if inventory can receive items or not. |
| CurrentMass | Returns total mass of items inside this inventory in Kg. |
| CurrentVolume | Returns total volume of items inside this inventory in m^3. |
| IsFull | Determines if inventory is absolutely full. |
| ItemCount | Returns number of occupied inventory slots. |
| MaxVolume | Sets maximum volume of items this inventory can contain in m^3. |
| Owner | Returns entity this inventory belongs to. |
| VolumeFillFactor | Gets the current volume fill factor of the inventory |
Methods
| Member | Description |
|---|---|
| CanItemsBeAdded(MyFixedPoint, MyItemType) | Determines if given amount of items fits into this inventory on top of existing items. |
| CanTransferItemTo(IMyInventory, MyItemType) | Determines if there is working conveyor connection for item of give type to be transferred to other inventory. |
| ContainItems(MyFixedPoint, MyItemType) | Determines if there is at least given amount of items of given type contained inside this inventory. |
| FindItem(MyItemType) | Tries to find an item of given type inside this inventory. |
| GetAcceptedItems(List |
Returns all items this inventory accepts. |
| GetItemAmount(MyItemType) | Sums up total amount of items of given type contained inside this inventory. |
| GetItemAt(int) | Returns info about item at give position. |
| GetItemByID(uint) | Returns info about item contained inside this inventory. |
| GetItems(List |
Collects all items present inside this inventory and returns snapshot of the current inventory state. |
| IsConnectedTo(IMyInventory) | Checks if two inventories are connected. |
| IsItemAt(int) | Determines if there is any item on given inventory slot. |
| TransferItemFrom(IMyInventory, MyInventoryItem, MyFixedPoint?) | Attempts to transfer item from one inventory to another. |
| TransferItemFrom(IMyInventory, int, int?, bool?, MyFixedPoint?) | Attempts to transfer item from one inventory to another. |
| TransferItemTo(IMyInventory, MyInventoryItem, MyFixedPoint?) | Attempts to transfer item from one inventory to another. |
| TransferItemTo(IMyInventory, int, int?, bool?, MyFixedPoint?) | Attempts to transfer item from one inventory to another. |