Skip to content
On this page

Athena.systems.inventory.convert

Functions

toBaseItem

Usage

Athena.systems.inventory.convert.toBaseItem<CustomData>(storedItem): player<CustomData>

Convert a stored Item to a base item

Does not perform any inventory changes.

Export

Type parameters

NameType
CustomData{}

Parameters

NameType
storedItemStoredItemEx<CustomData>

Returns

player<CustomData>

Defined in

server/systems/inventory/convert.ts:35


toItem

Usage

Athena.systems.inventory.convert.toItem<CustomData>(storedItem): player<CustomData> | undefined

Converts a stored item into a full item.

Does not perform any inventory changes.

Returns undefined if base item was not found.

Export

Type parameters

NameType
CustomData{}

Parameters

NameType
storedItemStoredItemEx<CustomData>

Returns

player<CustomData> | undefined

Defined in

server/systems/inventory/convert.ts:15


toStoredItem

Usage

Athena.systems.inventory.convert.toStoredItem<CustomData>(baseItem, quantity): any

Convert a Base Item to a stored item

Does not perform any inventory changes.

Export

Type parameters

NameType
CustomData{}

Parameters

NameType
baseItemBaseItemEx<CustomData>
quantitynumber

Returns

any

Defined in

server/systems/inventory/convert.ts:50

Created by Stuyk | Est. 2020