Skip to content
On this page

Athena.systems.inventory.slot

Functions

findOpen

Usage

Athena.systems.inventory.slot.findOpen(slotSize, data): number | undefined

Find an open slot that is available within a dataset.

Parameters

NameType
slotSizeany
dataStoredItem[]

Returns

number | undefined

Defined in

server/systems/inventory/slot.ts:14


getAt

Usage

Athena.systems.inventory.slot.getAt<CustomData>(slot, data): player<CustomData> | undefined

Get an item at a specific slot. Returns undefined if an item is unavailable in a slot.

Type parameters

NameType
CustomData{}

Parameters

NameType
slotnumber
dataStoredItem[]

Returns

player<CustomData> | undefined

Defined in

server/systems/inventory/slot.ts:47


override

Usage

Athena.systems.inventory.slot.override(functionName, callback): any

Used to override inventory item slot functionality

Parameters

NameType
functionName"findOpen"
callback(slotSize: any, data: StoredItem[]) => number | undefined

Returns

any

Defined in

server/systems/inventory/slot.ts:90

Usage

Athena.systems.inventory.slot.override(functionName, callback): any

Used to override inventory item slot functionality

Parameters

NameType
functionName"removeAt"
callback(slot: number, data: StoredItem[]) => player[] | undefined

Returns

any

Defined in

server/systems/inventory/slot.ts:91

Usage

Athena.systems.inventory.slot.override(functionName, callback): any

Used to override inventory item slot functionality

Parameters

NameType
functionName"getAt"
callback<CustomData>(slot: number, data: StoredItem[]) => player<CustomData> | undefined

Returns

any

Defined in

server/systems/inventory/slot.ts:92


removeAt

Usage

Athena.systems.inventory.slot.removeAt(slot, data): player[] | undefined

Remove a specific item from a specific slot.

Parameters

NameType
slotnumber
dataStoredItem[]

Returns

player[] | undefined

Returns undefined if the item was not found.

Defined in

server/systems/inventory/slot.ts:67

Created by Stuyk | Est. 2020