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 ​
Name | Type |
---|---|
CustomData | {} |
Parameters ​
Name | Type |
---|---|
storedItem | StoredItemEx <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 ​
Name | Type |
---|---|
CustomData | {} |
Parameters ​
Name | Type |
---|---|
storedItem | StoredItemEx <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 ​
Name | Type |
---|---|
CustomData | {} |
Parameters ​
Name | Type |
---|---|
baseItem | BaseItemEx <CustomData > |
quantity | number |
Returns ​
any