Skip to content
On this page

Athena.systems.inventory.weight

Functions

getDataWeight

Usage

Athena.systems.inventory.weight.getDataWeight(data): number

Returns the total weight of a given data set.

Parameters

NameType
dataany[]

Returns

number

Defined in

server/systems/inventory/weight.ts:11


getTotalWeight

Usage

Athena.systems.inventory.weight.getTotalWeight(dataSets): number

Get the total weight for given data sets.

Parameters

NameType
dataSetsany[][]

Returns

number

Defined in

server/systems/inventory/weight.ts:34


isWeightExceeded

Usage

Athena.systems.inventory.weight.isWeightExceeded(dataSets, amount?): boolean

Determine if the weight is exceeded for a given data sets given the amount of weight it cannot exceed.

Parameters

NameTypeDefault value
dataSetsany[][]undefined
amount?number255

Returns

boolean

Defined in

server/systems/inventory/weight.ts:51


override

Usage

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

Used to override inventory item weight functionality

Parameters

NameType
functionName"getDataWeight"
callback(data: any[]) => number

Returns

any

Defined in

server/systems/inventory/weight.ts:93

Usage

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

Used to override inventory item weight functionality

Parameters

NameType
functionName"getTotalWeight"
callback(dataSets: any[][]) => number

Returns

any

Defined in

server/systems/inventory/weight.ts:94

Usage

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

Used to override inventory item weight functionality

Parameters

NameType
functionName"isWeightExceeded"
callback(dataSets: any[][], amount?: number) => boolean

Returns

any

Defined in

server/systems/inventory/weight.ts:95


update

Usage

Athena.systems.inventory.weight.update<T>(dataSet): player<T>[]

Update weight for a given data set, and all items.

Export

Type parameters

NameType
T{}

Parameters

NameType
dataSetStoredItem<T>[]

Returns

player<T>[]

Defined in

server/systems/inventory/weight.ts:72

Created by Stuyk | Est. 2020