Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRage.Game.ModAPI.Ingame.IMyInventory

Morten Aune Lyrstad edited this page Feb 17, 2020 · 50 revisions

IndexNamespace Index

IMyInventory Interface

public interface IMyInventory

Namespace: VRage.Game.ModAPI.Ingame
Assembly: VRage.Game.dll

Properties

Member Description
Owner { get; } Returns entity this inventory belongs to.
IsFull { get; } Determines if inventory is absolutely full.
CurrentMass { get; } Returns total mass of items inside this inventory in Kg.
MaxVolume { get; } Returns maximum volume of items this inventory can contain in m^3.
CurrentVolume { get; } Returns total volume of items inside this inventory in m^3.
ItemCount { get; } Returns number of occupied inventory slots.

Methods

Member Description
IsItemAt(int) Determines if there is any item on given inventory slot.
GetItemAmount(MyItemType) Sums up total amount of items of given type contained inside this inventory.
ContainItems(MyFixedPoint, MyItemType) Determines if there is at least given 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.
FindItem(MyItemType) Tries to find an item of given type inside this inventory.
CanItemsBeAdded(MyFixedPoint, MyItemType) Determines if given amount of items fits into this inventory on top of existing items.
GetItems(List, Func) Collects all items present inside this inventory and returns snapshot of the current inventory state.
TransferItemTo(IMyInventory, MyInventoryItem, MyFixedPoint?) Attempts to transfer item from one inventory to another.
TransferItemFrom(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.
TransferItemFrom(IMyInventory, int, int?, bool?, MyFixedPoint?) Attempts to transfer item from one inventory to another.
IsConnectedTo(IMyInventory) Checks if two inventories are connected.
CanTransferItemTo(IMyInventory, MyItemType) Determines if there is working conveyor connection for item of give type to be transferred to other inventory.
GetAcceptedItems(List, Func) Returns all items this inventory accepts.

Clone this wiki locally