Athena.systems.inventory.weight ​
Functions ​
getDataWeight ​
Usage
Athena.systems.inventory.weight.getDataWeight(data
): number
Returns the total weight of a given data set.
Parameters ​
Name | Type |
---|---|
data | any [] |
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 ​
Name | Type |
---|---|
dataSets | any [][] |
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 ​
Name | Type | Default value |
---|---|---|
dataSets | any [][] | undefined |
amount? | number | 255 |
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
T | {} |
Parameters ​
Name | Type |
---|---|
dataSet | StoredItem <T >[] |
Returns ​
player
<T
>[]