Table of Contents

Class ItemStorageHelper

Namespace
Nautilus.Utility
Assembly
Nautilus.dll
A utility class that offers additional info about ItemsContainer instances.
public static class ItemStorageHelper
Inheritance
ItemStorageHelper
Inherited Members

Methods

GetAllowedTechTypes(ItemsContainer)

Gets the set of techtypes allowed in this container. This set can be altered. If the set is null or empty, then all items can be added.
public static HashSet<TechType> GetAllowedTechTypes(ItemsContainer container)

Parameters

container ItemsContainer
The container to check.

Returns

HashSet<TechType>
The collection of techtypes allowed in the container.

GetStorageLabel(ItemsContainer)

Get the inernal label for the storage container.
public static string GetStorageLabel(ItemsContainer container)

Parameters

container ItemsContainer
The container.

Returns

string
The label used and displayed in-game for the container.

GetTotalSlots(ItemsContainer)

The totals number of 1x1 slots in the container, as calculated by the container's width and height.
public static int GetTotalSlots(ItemsContainer container)

Parameters

container ItemsContainer
The container.

Returns

int

HasRoomForCached(ItemsContainer, int, int)

Using the cached container info, determines whether the specified container has room for an item of the specified size.
public static bool HasRoomForCached(ItemsContainer container, int width, int height)

Parameters

container ItemsContainer
The container to check.
width int
The item width.
height int
The item height.

Returns

bool
true if there is room for the item in the container,; otherwise, false.

HasRoomForCached(ItemsContainer, Vector2int)

Using the cached container info, determines whether the specified container has room for an item of the specified size.
public static bool HasRoomForCached(ItemsContainer container, Vector2int itemSize)

Parameters

container ItemsContainer
The container to check.
itemSize Vector2int
Size of the item.

Returns

bool
true if there is room for the item in the container,; otherwise, false.

IsEmpty(ItemsContainer)

Determines whether the specified container is empty.
public static bool IsEmpty(ItemsContainer container)

Parameters

container ItemsContainer
The items container to check.

Returns

bool
true if the specified container is empty; otherwise, false.

IsFull(ItemsContainer)

Determines whether the specified container is full.
public static bool IsFull(ItemsContainer container)

Parameters

container ItemsContainer
The items container to check.

Returns

bool
true if the specified container is full; otherwise, false.

See Also

StorageHelper