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 ​
Name | Type |
---|---|
slotSize | any |
data | StoredItem [] |
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 ​
Name | Type |
---|---|
CustomData | {} |
Parameters ​
Name | Type |
---|---|
slot | number |
data | StoredItem [] |
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
slot | number |
data | StoredItem [] |
Returns ​
player
[] | undefined
Returns undefined if the item was not found.