Table of Contents

Class StorageHelperExtensions

Namespace
Nautilus.Utility
Assembly
Nautilus.dll
Extension methods to provide static calls for ItemsContainer into ItemStorageHelper methods.
public static class StorageHelperExtensions
Inheritance
StorageHelperExtensions
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

HasRoomCached(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 HasRoomCached(this 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.

HasRoomCached(ItemsContainer, Vector2int)

Using the cached container info, determines whether the specified container has room for an item of the specified size.
public static bool HasRoomCached(this 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(this 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(this ItemsContainer container)

Parameters

container ItemsContainer
The items container to check.

Returns

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